# rlwe

Published articles for rlwe.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Bicyclic Matrix-Matrix Multiplication in Fully Homomorphic Encryption

DevFeed: [Bicyclic Matrix-Matrix Multiplication in Fully Homomorphic Encryption](<https://devfeed.tech/articles/bicyclic-matrix-matrix-multiplication-in-fully-homomorphic-encryption-40492.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2025/11/17/bicyclic-matrix-matrix-multiplication-in-fully-homomorphic-encryption/>)

Published: 2025-11-17T16:41:28Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [FHE](<https://devfeed.tech/topics/fhe.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Code](<https://devfeed.tech/topics/code.md>), [GitHub](<https://devfeed.tech/topics/github.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [circuit](<https://devfeed.tech/tags/circuit.md>), [code](<https://devfeed.tech/tags/code.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [github](<https://devfeed.tech/tags/github.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [linear-algebra](<https://devfeed.tech/tags/linear-algebra.md>), [lwe](<https://devfeed.tech/tags/lwe.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rlwe](<https://devfeed.tech/tags/rlwe.md>)

### AI overview

This article explains the bicyclic method for matrix-matrix multiplication in fully homomorphic encryption. It introduces the method's packing scheme, relates it to Halevi-Shoup diagonal packing, and discusses properties including multiplicative depth, layout invariance, and rotation complexity. The implementation is provided in a GitHub repository in a file named bicyclic.py.

### Source excerpt

In an earlier article, I covered the basic technique for performing matrix-vector multiplication in fully homomorphic encryption (FHE), known as the Halevi-Shoup diagonal method. This article covers a more recent method for matrix-matrix multiplication known as the bicyclic method. The code implementing this method is in the same GitHub repository as the previous article, and the bicyclic method is in a file called bicyclic.py. The previous article linked above covers the general concepts behind "FHE packing," which I will assume as background knowledge for this article:

## Packing Matrix-Vector Multiplication in Fully Homomorphic Encryption

DevFeed: [Packing Matrix-Vector Multiplication in Fully Homomorphic Encryption](<https://devfeed.tech/articles/packing-matrix-vector-multiplication-in-fully-homomorphic-encryption-40487.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2024/09/06/packing-matrix-vector-multiplication-in-fhe/>)

Published: 2024-09-07T04:18:09Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [homomorphic encryption](<https://devfeed.tech/topics/homomorphic-encryption.md>), [FHE](<https://devfeed.tech/topics/fhe.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>), [layout](<https://devfeed.tech/topics/layout.md>), [parallel](<https://devfeed.tech/topics/parallel.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [arithmetic](<https://devfeed.tech/tags/arithmetic.md>), [code](<https://devfeed.tech/tags/code.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [data](<https://devfeed.tech/tags/data.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [github-repository](<https://devfeed.tech/tags/github-repository.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [layout](<https://devfeed.tech/tags/layout.md>), [linear-algebra](<https://devfeed.tech/tags/linear-algebra.md>), [lwe](<https://devfeed.tech/tags/lwe.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [packing](<https://devfeed.tech/tags/packing.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [rlwe](<https://devfeed.tech/tags/rlwe.md>), [simd](<https://devfeed.tech/tags/simd.md>), [strategies](<https://devfeed.tech/tags/strategies.md>)

### AI overview

This article explains packing for SIMD-style fully homomorphic encryption. It describes how to arrange plaintext data in RLWE ciphertexts so matrix-vector multiplication requires fewer alignment multiplications and rotations, then introduces two basic packing techniques and a computational model.

### Source excerpt

In my recent overview of homomorphic encryption, I underemphasized the importance of data layout when working with arithmetic (SIMD-style) homomorphic encryption schemes. In the FHE world, the name given to data layout strategies is called "packing," because it revolves around putting multiple plaintext data into RLWE ciphertexts in carefully-chosen ways that mesh well with the operations you'd like to perform. By "mesh well" I mean it reduces the number of extra multiplications and rotations required merely to align data elements properly, rather than doing the actual computation you care about.

## Converting Between Packings in SIMD-Style FHE

DevFeed: [Converting Between Packings in SIMD-Style FHE](<https://devfeed.tech/articles/shift-networks-40486.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2024/09/02/shift-networks/>)

Published: 2024-09-02T21:01:03Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [FHE](<https://devfeed.tech/topics/fhe.md>), [homomorphic encryption](<https://devfeed.tech/topics/homomorphic-encryption.md>), [data](<https://devfeed.tech/topics/data.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [compilers](<https://devfeed.tech/tags/compilers.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [github](<https://devfeed.tech/tags/github.md>), [graph-coloring](<https://devfeed.tech/tags/graph-coloring.md>), [heir](<https://devfeed.tech/tags/heir.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [packing](<https://devfeed.tech/tags/packing.md>), [permutation](<https://devfeed.tech/tags/permutation.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rlwe](<https://devfeed.tech/tags/rlwe.md>), [simd](<https://devfeed.tech/tags/simd.md>)

### AI overview

This article explains packing in SIMD-style fully homomorphic encryption and focuses on converting between established packings. It introduces a computational model involving RLWE ciphertext vectors, elementwise operations, cyclic rotations, and differing operation costs.

### Source excerpt

In my recent overview of homomorphic encryption, I underemphasized the importance of data layout when working with arithmetic (SIMD-style) homomorphic encryption schemes. In the FHE world, the name given to data layout strategies is called "packing," because it revolves around putting multiple plaintext data into RLWE ciphertexts in carefully-chosen ways that mesh well with the operations you'd like to perform. By "mesh well" I mean it reduces the number of extra multiplications and rotations required merely to align data elements properly, rather than doing the actual computation you care about.

## A High-Level Technical Overview of Fully Homomorphic Encryption

DevFeed: [A High-Level Technical Overview of Fully Homomorphic Encryption](<https://devfeed.tech/articles/a-high-level-technical-overview-of-fully-homomorphic-encryption-40484.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2024/05/04/fhe-overview/>)

Published: 2024-05-04T15:30:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [FHE](<https://devfeed.tech/topics/fhe.md>), [homomorphic encryption](<https://devfeed.tech/topics/homomorphic-encryption.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [toolchain](<https://devfeed.tech/topics/toolchain.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Post-quantum cryptography](<https://devfeed.tech/topics/post-quantum-cryptography.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [google](<https://devfeed.tech/tags/google.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [linear-algebra](<https://devfeed.tech/tags/linear-algebra.md>), [lwe](<https://devfeed.tech/tags/lwe.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [post-quantum-cryptography](<https://devfeed.tech/tags/post-quantum-cryptography.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rlwe](<https://devfeed.tech/tags/rlwe.md>), [technical](<https://devfeed.tech/tags/technical.md>)

### AI overview

A technical, high-level survey of fully homomorphic encryption (FHE), explaining how programs can operate on encrypted data without decrypting it. The article discusses the field's current limitations, key techniques, and its relationship to the HEIR compiler toolchain.

### Source excerpt

About two years ago, I switched teams at Google to focus on fully homomorphic encryption (abbreviated FHE, or sometimes HE). Since then I've got to work on a lot of interesting projects, learning along the way about post-quantum cryptography, compiler design, and the ins and outs of fully homomorphic encryption. If you've heard about FHE and you're a software person, you've probably heard two things: it lets you run programs directly on encrypted data without ever decrypting it; and it's still too slow to be useful for anything.

## Encoding Schemes in FHE

DevFeed: [Encoding Schemes in FHE](<https://devfeed.tech/articles/encoding-schemes-in-fhe-40476.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/09/18/encoding-schemes-in-fhe/>)

Published: 2023-09-18T11:08:39Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Encoding](<https://devfeed.tech/topics/encoding.md>), [FHE](<https://devfeed.tech/topics/fhe.md>), [homomorphic encryption](<https://devfeed.tech/topics/homomorphic-encryption.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Decoding](<https://devfeed.tech/topics/decoding.md>)

Tags: [bits](<https://devfeed.tech/tags/bits.md>), [complex-numbers](<https://devfeed.tech/tags/complex-numbers.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [decoding](<https://devfeed.tech/tags/decoding.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [learning-with-errors](<https://devfeed.tech/tags/learning-with-errors.md>), [lwe](<https://devfeed.tech/tags/lwe.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [number-theory](<https://devfeed.tech/tags/number-theory.md>), [programming](<https://devfeed.tech/tags/programming.md>), [residue-number-system](<https://devfeed.tech/tags/residue-number-system.md>), [rlwe](<https://devfeed.tech/tags/rlwe.md>), [scaling](<https://devfeed.tech/tags/scaling.md>), [scheme](<https://devfeed.tech/tags/scheme.md>)

### AI overview

This article explains how cleartexts are transformed into plaintexts through encoding, and reversed through decoding, in homomorphic encryption. It catalogs encoding approaches for different HE schemes, including bit-field encoding for LWE and considerations for noise, scaling, bit positions, and programmable bootstrapping in CGGI/TFHE.

### Source excerpt

In cryptography, we need a distinction between a cleartext and a plaintext. A cleartext is a message in its natural form. A plaintext is a cleartext that is represented in a specific way to prepare it for encryption in a specific scheme. The process of taking a cleartext and turning it into a plaintext is called encoding, and the reverse is called decoding. In homomorphic encryption, the distinction matters. Cleartexts are generally all integers, though the bit width of allowed integers can be restricted (e.

## Sample Extraction from RLWE to LWE

DevFeed: [Sample Extraction from RLWE to LWE](<https://devfeed.tech/articles/sample-extraction-from-rlwe-to-lwe-40463.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2023/02/27/sample-extraction-from-rlwe-to-lwe/>)

Published: 2023-02-27T08:00:00Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [FHE](<https://devfeed.tech/topics/fhe.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>)

Tags: [cryptography](<https://devfeed.tech/tags/cryptography.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [linear-algebra](<https://devfeed.tech/tags/linear-algebra.md>), [lwe](<https://devfeed.tech/tags/lwe.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rlwe](<https://devfeed.tech/tags/rlwe.md>), [scheme](<https://devfeed.tech/tags/scheme.md>)

### AI overview

A tutorial deriving sample extraction, an FHE technique that partially converts a ciphertext from the Ring Learning With Errors (RLWE) scheme to the Learning With Errors (LWE) scheme. It introduces the relevant LWE and RLWE encryption constructions and explains the role of error terms.

### Source excerpt

In this article I'll derive a trick used in FHE called sample extraction. In brief, it allows one to partially convert a ciphertext in the Ring Learning With Errors (RLWE) scheme to the Learning With Errors (LWE) scheme. Here are some other articles I've written about other FHE building blocks, though they are not prerequisites for this article. Modulus Switching in LWE Key Switching in LWE The Gadget Decomposition in FHE Negacyclic Polynomial Multiplication Estimating the Security of Ring Learning With Errors LWE and RLWE The first two articles in the list above define the Learning With Errors problem (LWE).

## Estimating the Security of Ring Learning with Errors (RLWE)

DevFeed: [Estimating the Security of Ring Learning with Errors (RLWE)](<https://devfeed.tech/articles/estimating-the-security-of-ring-learning-with-errors-rlwe-40461.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2022/12/28/estimating-the-security-of-ring-learning-with-errors-rlwe/>)

Published: 2022-12-28T14:52:01Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Security](<https://devfeed.tech/topics/security.md>), [Estimator](<https://devfeed.tech/topics/estimator.md>), [FHE](<https://devfeed.tech/topics/fhe.md>)

Tags: [cod](<https://devfeed.tech/tags/cod.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [estimator](<https://devfeed.tech/tags/estimator.md>), [lattice-cryptography](<https://devfeed.tech/tags/lattice-cryptography.md>), [learning-with-errors](<https://devfeed.tech/tags/learning-with-errors.md>), [lwe](<https://devfeed.tech/tags/lwe.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [programming](<https://devfeed.tech/tags/programming.md>), [ring-learning-with-errors](<https://devfeed.tech/tags/ring-learning-with-errors.md>), [rlwe](<https://devfeed.tech/tags/rlwe.md>), [sage](<https://devfeed.tech/tags/sage.md>), [security](<https://devfeed.tech/tags/security.md>), [test](<https://devfeed.tech/tags/test.md>), [top](<https://devfeed.tech/tags/top.md>)

### AI overview

The article explains how to estimate the security of lattice-based schemes based on Learning With Errors (LWE) and Ring Learning With Errors (RLWE). It introduces LWE parameters and describes how the Lattice Estimator estimates the costs of known lattice attacks for a given instance.

### Source excerpt

This article was written by my colleague, Cathie Yun. Cathie is an applied cryptographer and security engineer, currently working with me to make fully homomorphic encryption a reality at Google. She's also done a lot of cool stuff with zero knowledge proofs. In previous articles, we've discussed techniques used in Fully Homomorphic Encryption (FHE) schemes. The basis for many FHE schemes, as well as other privacy-preserving protocols, is the Learning With Errors (LWE) problem.