We summarize and compare TFHE, BFV, CKKS, and BGV as follows:
Hard Problem Basis | |
TFHE | LWE |
BFV | |
CKKS | RLWE |
BGV | |
Unit Data Type | |
TFHE | Vector |
BFV | |
CKKS | Polynomial |
BGV | |
Plaintext | |
TFHE | Number # is a power of 2 |
BFV | Polynomial # is a prime, and is a power of 2 |
CKKS | Polynomial # is a power of 2 |
BGV | Polynomial # is a prime, and is a power of 2 |
Secret Key
| |
TFHE | Vector # is a uniform random distribution |
BFV | |
CKKS | Polynomial , where we set |
BGV | |
Ciphertext
| |
TFHE | (Vector , Number ) = , # , and divides |
BFV | |
CKKS | (Polynomial ) = , # |
BGV | |
Noise | |
TFHE | Number # is a Gaussian random distribution |
BFV | |
CKKS | Polynomial |
BGV | |
Scaling Factor
| |
TFHE | Used for , where # divides |
BFV | Used for , where # is a prime |
CKKS | Used for , where |
# is the lowest multiplicative level’s ciphertext modulus | |
BGV | Used for , where # is a prime |
Encryption
| |
TFHE | where , , |
# After using each time, throw it away | |
BFV | where , , |
CKKS | # After using each time, throw it away |
BGV | where , , |
# After using each time, throw it away | |
Cryptographic Relation
| |
TFHE | , where # divides |
BFV | , where # is a prime |
CKKS | , where |
# is the lowest multiplicative level’s ciphertext modulus | |
BGV | , where # is a prime |
Decryption Formula
| |
TFHE | |
# gets eliminated if | |
BFV | |
# gets eliminated if | |
CKKS | |
# The final noise remains as (increase to reduce it) | |
BGV | |
# gets removed if | |
Ciphertext Modulus
| |
TFHE | A single number # , and divides |
BFV | A single number # |
CKKS | An -multiplicative-level modulus chain |
# each , and each is a CRT modulus | |
having the property: (for ) | |
BGV | An -multiplicative-level modulus chain |
# each , and each is a CRT modulus | |
having the property: | |
Ciphertext-to-Ciphertext Addition
| |
TFHE | - Ciphertext |
- Ciphertext | |
BFV | - Ciphertext |
- Ciphertext | |
CKKS | - Ciphertext |
- Ciphertext | |
BGV | - Ciphertext |
- Ciphertext | |
Ciphertext-to-Plaintext Addition
| |
TFHE | - Ciphertext |
- Plaintext number | |
BFV | - Ciphertext |
- Plaintext polynomial | |
CKKS | - Ciphertext |
- Plaintext polynomial | |
BGV | - Ciphertext |
- Plaintext polynomial | |
Ciphertext-to-Plaintext Multiplication
| |
TFHE | - Ciphertext |
- Plaintext number | |
BFV | - Ciphertext |
- Plaintext polynomial | |
CKKS | - Ciphertext |
- Plaintext polynomial | |
1. Basic Multiplication | |
1. | |
2. Rescaling by : | |
BGV | - Ciphertext |
- Plaintext polynomial | |
Ciphertext-to-Ciphertext Multiplication
| |
TFHE | - Ciphertext |
- Ciphertext | |
1. Programmable Bootstrapping: | |
1. Convert into . | |
2. Homomorphic Multiplication: | |
2. Compute | |
BFV | - Ciphertext |
- Ciphertext | |
1. ModRaise from to | |
1. - Ciphertext | |
1. - Ciphertext | |
2. Polynomial Multiplication: | |
1. | |
3. Relinearization: | |
3. Relinearization: | |
4. Rescaling by : | |
CKKS | - Ciphertext |
- Ciphertext | |
1. Polynomial Multiplication: | |
1. | |
2. Relinearization: | |
3. Relinearization: | |
3. Rescaling by : | |
BGV | - Ciphertext |
- Ciphertext | |
1. Polynomial Multiplication: | |
1. | |
2. Relinearization: | |
3. Relinearization: | |
3. (Optional) Rescaling by : | |
# means rounding to the nearest multiple of | |
# The future noise growth rate gets reduced if the ciphertext is rescaled | |
Maximum Possible Multiplications (without Bootstrapping)
| |
TFHE | Unlimited with programming bootstrapping (but not possible without it) |
BFV | Unlimited |
CKKS | As many times as the length of the modulus chain |
BGV | As many times as the length of the modulus chain |
Key Switching
| |
TFHE | Key-switching from : |
BFV | Key-switching from : |
CKKS | |
BGV | Key-switching from : |
Modulus Drop (ModDrop)
| |
CKKS | - Ciphertext with the multiplicative level : |
BGV | - Ciphertext with the multiplicative level : |
- | |
Encoding and Decoding the Plaintext
| |
TFHE | No need, because each plaintext is a single number |
BFV | Must convert the input slots into polynomial coefficients to support batch processing: |
CKKS | - Encoding input slots into polynomial coefficients: |
BGV | - Decoding polynomial coefficients into input slots: |
Input Slot Rotation
| |
TFHE | Not applicable, because its plaintext is a single number (i.e., a single slot) |
BFV | Given , |
to rotate the input slots by positions to the left: | |
CKKS | 1. Update to , |
(where ) | |
2. Key-switch to . | |
BGV | Given , |
to rotate the input slots by positions to the left: | |
1. Update to , | |
2. Key-switch to . | |
Bootstrapping Goal
| |
TFHE | To reset the noise. |
BFV | |
CKKS | To reset the ciphertext modulus from . |
BGV | |
Bootstrapping Details
| |
TFHE | 1. Modulus Switch from to convert , |
where . # where divides | |
2. Blind Rotation: Homomorphically rotate the GLWE-encrypted look-up table | |
polynomial by positions to the left. This is done by | |
by homomorphically deriving as follows: | |
3. Coefficient Extraction: The rotated encrypted polynomial ’s constant term value is | |
. Extract this encrypted constant term as from . | |
BFV | 1. Modulus Switch from to convert |
2. Homomorphic Decryption: | |
, where | |
3. CoeffToSlot: Multiply to the ciphertext by to move | |
the plaintext coefficients of to the input slots. | |
4. EvalExp: Given the digit extraction polynomial , homomorphically compute: | |
, and then the output gets stored in the plaintext slots. | |
5. SlotToCoeff: Multiply to the ciphertext by to move to the | |
polynomial coefficient positions and get . | |
6. Scaling Factor Re-interpretation: View as | |
, an encryption of with the scaling factor | |
Bootstrapping Details
| |
CKKS | 1. ModRaise: View the ciphertext as |
2. CoeffToSlot: Move the coefficients of to the input slots. | |
3. EvalExp: Homomorphically evaluate the polynomial approximation of | |
the sine function with period at , | |
which outputs an encryption of in the plaintext slots. | |
4. SlotToCoeff: Move to the polynomial coefficient positions | |
to get . | |
BGV | 1. Modulus Switch from to convert |
, where | |
2. Ciphertext Coefficient Multiplication by : | |
Compute (where ) | |
, which the ciphertext with noise . | |
3. ModRaise: | |
, which is the ciphertext . | |
4. CoeffToSlot: Multiply to the ciphertext by to move | |
the plaintext coefficients of to the input slots. | |
5. EvalExp: Given the digit extraction polynomial , homomorphically compute: | |
, and then the output gets stored in the plaintext slots. | |
6. Homomorphic Multiplication by to all slots to update the plaintext | |
from to . | |
7. SlotToCoeff: Multiply to the ciphertext by to move to the | |
polynomial coefficient positions to get . | |
8. Noise Term Re-interpretation: View as | |
, an encryption of with noise having the | |
noise scaling factor (i.e., plaintext modulus) . | |
Noise Management
| |
THFE | Their bootstrapping resets the noise. |
BFV | |
CKKS | - The noise grows without stopping, because its bootstrapping resets only the |
modulus chain. To slow down the noise growth, we should increase the plaintext’s | |
scaling factor . | |
- CKKS’s EvalExp cannot use the digit extraction polynomial to remove the noise, | |
because CKKS’s plaintext is not in a modulus ring, but is a real number. | |
BGV | BGV’s modulus switch has the special property of resetting the noise, and BGV’s |
bootstrapping resets the modulus chain to enable indefinite modulus switches. | |