Bootstrapping for Approximate Homomorphic Encryption Jung Hee - - PowerPoint PPT Presentation

bootstrapping for approximate homomorphic encryption
SMART_READER_LITE
LIVE PREVIEW

Bootstrapping for Approximate Homomorphic Encryption Jung Hee - - PowerPoint PPT Presentation

Bootstrapping for Approximate Homomorphic Encryption Jung Hee Cheon, Kyoohyung Han, Andrey Kim (Seoul National University) Miran Kim, Yongsoo Song (University of California, San Diego) Landscape of Homomorphic Encryption Landscape of


slide-1
SLIDE 1

Bootstrapping for Approximate Homomorphic Encryption

Jung Hee Cheon, Kyoohyung Han, Andrey Kim (Seoul National University) Miran Kim, Yongsoo Song (University of California, San Diego)

slide-2
SLIDE 2

Landscape of Homomorphic Encryption

slide-3
SLIDE 3

Landscape of Homomorphic Encryption

“Word Encryption” (BGV12, Bra12, FV12) Packing & SIMD operations on GF(pd) between RLWE ciphertexts Long latency (Bootstrapping)

slide-4
SLIDE 4

Landscape of Homomorphic Encryption

“Bitwise Encryption” (DM15, CGGI16)

  • Eval. of LUTs on {0,1}* with bootstrapping
  • n LWE ciphertext (<-> RLWE <- RGSW)

Large expansion rate (storage, cost) “Word Encryption” (BGV12, Bra12, FV12) Packing & SIMD operations on GF(pd) between RLWE ciphertexts Long latency (Bootstrapping)

slide-5
SLIDE 5

Landscape of Homomorphic Encryption

“Approximate Encryption” (CKKS17)

“Bitwise Encryption” (DM15, CGGI16)

  • Eval. of LUTs on {0,1}* with bootstrapping
  • n LWE ciphertext (<-> RLWE <- RGSW)

Large expansion rate (storage, cost) “Word Encryption” (BGV12, Bra12, FV12) Packing & SIMD operations on GF(pd) between RLWE ciphertexts Long latency (Bootstrapping)

slide-6
SLIDE 6

Approximate HE

§ Every approximate number contains an Error (from its unknown true value). Consider an RLWE error as part of it.

slide-7
SLIDE 7

Approximate HE

§ Every approximate number contains an Error (from its unknown true value). Consider an RLWE error as part of it. ct = Enc (M) if [<ct,sk>]q = M+e ≈ M.

slide-8
SLIDE 8

Approximate HE

§ Every approximate number contains an Error (from its unknown true value). Consider an RLWE error as part of it. ct = Enc (M) if [<ct,sk>]q = M+e ≈ M. § Approximate Rounding is easy!

slide-9
SLIDE 9

Approximate HE

§ Every approximate number contains an Error (from its unknown true value). Consider an RLWE error as part of it. ct = Enc (M) if [<ct,sk>]q = M+e ≈ M. § Approximate Rounding is easy! [<ct, sk>]q = M HomRnd : ct ↦ ct’ =「p-1 · ct 」 ⇒ [<ct’, sk>]q/p ≈ M/p (1.234) × (5.678) = (1,234 × 5,678) × 10-6 = (7,006,652) × 10-6 ≈ (7,007) × 10-3.

slide-10
SLIDE 10

Functionality of Approximate HE

Packing Technique § K = Q[x]/(Φm(x)), R = Z[x]/(Φm(x)). § Φm(X) = ∏i(x - ζi) for the primitive m-th roots of unity ζi. § Encoding map: (Mi)i ↦ M(X) such that M(ζi) = Mi Approximate addition, multiplication, and rounding § Every homomorphic operation includes a small noise Evaluation of Analytic Functions § exp (z), § z-1

slide-11
SLIDE 11

Landscape of Homomorphic Encryption

“Approximate Encryption” (CKKS17)

“Bitwise Encryption” (DM15, CGGI16)

  • Eval. of LUTs on {0,1}* with bootstrapping
  • n LWE ciphertext (<-> RLWE <- RGSW)

Large expansion rate (storage, cost) “Word Encryption” (BGV12, Bra12, FV12) Packing & SIMD operations on GF(pd) between RLWE ciphertexts Long latency (Bootstrapping)

slide-12
SLIDE 12

Landscape of Homomorphic Encryption

“Bitwise Encryption” (DM15, CGGI16)

  • Eval. of LUTs on {0,1}* with bootstrapping
  • n LWE ciphertext (<-> RLWE <- RGSW)

Large expansion rate (storage, cost) “Word Encryption” (BGV12, Bra12, FV12) Packing & SIMD operations on GF(pd) between RLWE ciphertexts Long latency (Bootstrapping)

“Approximate Encryption” (CKKS17) Packing & SIMD operation over the real/complex numbers (add, mult + rounding) between RLWE ciphertexts

slide-13
SLIDE 13

Application Researches of HE (2017~)

§ Machine Learning & Neural Networks: 7 § Biomedical & Health data analysis: 3 § Bioinformatics: 3 § Genomic data analysis: 3 § Cyber Physical System & Internet of Things: 4 § Smart Grid: 3 § Image processing: 3 § Voting: 2 § Advertising: 2 [Kim-Song-Kim-Lee-Cheon’18] iDASH Privacy & Security Competition 2017 Six minutes to train a logistic regression model from encrypted dataset of size 1579 * (18+1). > 80 %

slide-14
SLIDE 14

Bootstrapping of Approximate HE

Bootstrapping = Evaluation of Decryption circuit ?

slide-15
SLIDE 15

Bootstrapping of Approximate HE

Bootstrapping = Evaluation of Decryption circuit ? §Homomorphic operation of approximate HE induces a small “noise”:

slide-16
SLIDE 16

Bootstrapping of Approximate HE

Bootstrapping = Evaluation of Decryption circuit ? §Homomorphic operation of approximate HE induces a small “noise”: Dec (ct) = M => HomEval ( Dec (ct) ) = Enc (M + e) Refreshed ciphertext encrypts an approximate value.

slide-17
SLIDE 17

Bootstrapping of Approximate HE

Bootstrapping = Evaluation of Decryption circuit ? §Homomorphic operation of approximate HE induces a small “noise”: Dec (ct) = M => HomEval ( Dec (ct) ) = Enc (M + e) Refreshed ciphertext encrypts an approximate value.

§ Dec (ct, sk) = <ct, sk> (mod q).

slide-18
SLIDE 18

Bootstrapping of Approximate HE

Bootstrapping = Evaluation of Decryption circuit ? §Homomorphic operation of approximate HE induces a small “noise”: Dec (ct) = M => HomEval ( Dec (ct) ) = Enc (M + e) Refreshed ciphertext encrypts an approximate value.

§ Dec (ct, sk) = <ct, sk> (mod q). Idea 1: <ct, sk> = q · t + M for some small |t| < K = |sk|1. ct = Enc (q · t + M) with a ciphertext modulus q’ >> q.

slide-19
SLIDE 19

Bootstrapping of Approximate HE

Bootstrapping = Evaluation of Decryption circuit ? §Homomorphic operation of approximate HE induces a small “noise”: Dec (ct) = M => HomEval ( Dec (ct) ) = Enc (M + e) Refreshed ciphertext encrypts an approximate value.

§ Dec (ct, sk) = <ct, sk> (mod q). Idea 1: <ct, sk> = q · t + M for some small |t| < K = |sk|1. ct = Enc (q · t + M) with a ciphertext modulus q’ >> q. How to (efficiently) evaluate the modular reduction (q · t + M) ↦ M ?

slide-20
SLIDE 20

Evaluation of Modular Reduction

§ Goal: Represent modular reduction (q · t + M) ↦ M as a circuit over the complex numbers.

slide-21
SLIDE 21

Evaluation of Modular Reduction

§ Goal: Represent modular reduction (q · t + M) ↦ M as a circuit over the complex numbers. § Naive solution: Lagrange interpolation on the domain (-Kq, Kq)

slide-22
SLIDE 22

Evaluation of Modular Reduction

§ Goal: Represent modular reduction (q · t + M) ↦ M as a circuit over the complex numbers. § Naive solution: Lagrange interpolation on the domain (-Kq, Kq) Efficiency Degree d = O(Kq), Complexity O(d) operations - exp. on the depth!

slide-23
SLIDE 23

Evaluation of Modular Reduction

§ Goal: Represent modular reduction (q · t + M) ↦ M as a circuit over the complex numbers. § Naive solution: Lagrange interpolation on the domain (-Kq, Kq) Efficiency Degree d = O(Kq), Complexity O(d) operations - exp. on the depth! Correctness Large error on the boundary

slide-24
SLIDE 24

Evaluation of Modular Reduction

§ Goal: Represent modular reduction (q · t + M) ↦ M as a circuit over the complex numbers.

slide-25
SLIDE 25

Evaluation of Modular Reduction

§ Goal: Represent modular reduction (q · t + M) ↦ M as a circuit over the complex numbers. § Modular Reduction is discontinuous when |M| = q/2.

slide-26
SLIDE 26

Evaluation of Modular Reduction

§ Goal: Represent modular reduction (q · t + M) ↦ M as a circuit over the complex numbers. § Modular Reduction is discontinuous when |M| = q/2. Idea 2: Start bootstrapping when |M| << q.

slide-27
SLIDE 27

Evaluation of Modular Reduction

§ Goal: Represent modular reduction (q · t + M) ↦ M as a circuit over the complex numbers. § Modular Reduction is discontinuous when |M| = q/2. Idea 2: Start bootstrapping when |M| << q. Use the formula M ≈ (q/2π) · sin [(2π/q) (q · t + M)].

slide-28
SLIDE 28

Evaluation of Sine

§ Goal: Evaluate M ≈ (q/2π) · sin θ for θ = (2π/q) (q · t + M) such that |θ|< 2 π K

slide-29
SLIDE 29

Evaluation of Sine

§ Goal: Evaluate M ≈ (q/2π) · sin θ for θ = (2π/q) (q · t + M) such that |θ|< 2 π K § Naive solution: Taylor series approximation sin θ = θ – (θ3/6) + (θ5/120) – …

slide-30
SLIDE 30

Evaluation of Sine

§ Goal: Evaluate M ≈ (q/2π) · sin θ for θ = (2π/q) (q · t + M) such that |θ|< 2 π K § Naive solution: Taylor series approximation sin θ = θ – (θ3/6) + (θ5/120) – … Degree d = O(Kq) to achieve Rd = O(1). Complexity O(Kq) operations.

slide-31
SLIDE 31

Evaluation of Sine

§ Goal: Evaluate M ≈ (q/2π) · sin θ for θ = (2π/q) (q · t + M) such that |θ|< 2 π K § How to reduce the complexity?

slide-32
SLIDE 32

Evaluation of Sine

§ Goal: Evaluate M ≈ (q/2π) · sin θ for θ = (2π/q) (q · t + M) such that |θ|< 2 π K § How to reduce the complexity? Idea 3: Double-angle formula cos θ = cos2(θ/2) – sin2(θ/2), sin θ = 2 cos(θ/2) · sin(θ/2).

slide-33
SLIDE 33

Evaluation of Sine

§ Goal: Evaluate M ≈ (q/2π) · sin θ for θ = (2π/q) (q · t + M) such that |θ|< 2 π K § How to reduce the complexity? Idea 3: Double-angle formula cos θ = cos2(θ/2) – sin2(θ/2), sin θ = 2 cos(θ/2) · sin(θ/2). Low-degree Taylor series of cos(θ/2r), sin(θ/2r) for some r = O(log (Kq)) & Recursive evaluation (r iterations) to get an approximate value of (sin θ).

slide-34
SLIDE 34

Evaluation of Sine

§ Goal: Evaluate M ≈ (q/2π) · sin θ for θ = (2π/q) (q · t + M) such that |θ|< 2 π K § How to reduce the complexity? Idea 3: Double-angle formula cos θ = cos2(θ/2) – sin2(θ/2), sin θ = 2 cos(θ/2) · sin(θ/2). Low-degree Taylor series of cos(θ/2r), sin(θ/2r) for some r = O(log (Kq)) & Recursive evaluation (r iterations) to get an approximate value of (sin θ). § Efficiency Depth: L = r + O(1) = O(log (Kq)). Complexity: O(L) operations. Linear on the depth!

slide-35
SLIDE 35

Summary

§ ct = Enc(M) (mod q) is an encryption of (q · t + M) in a large modulus. § Approximation of Modular reduction (q · t + M)q = M using a trigonometric function. § Recursive evaluation strategy to reduce the computational costs.

slide-36
SLIDE 36

Summary

§ ct = Enc(M) (mod q) is an encryption of (q · t + M) in a large modulus. § Approximation of Modular reduction (q · t + M)q = M using a trigonometric function. § Recursive evaluation strategy to reduce the computational costs. ü No Bootstrapping Key. ü Linear Complexity on the depth L = O( log(|sk|1 · q) ) of decryption circuit. ü Small Memory : 1 ciphertext encrypting exp (i · θ) = cos θ + i sin θ. ü Implication : Machine Learning, Cyber-Physical System

slide-37
SLIDE 37

Comparison & Experimental Results

HS15, CH18 Coeff To Slots ~ O(1) per slot Bit/Digit Extraction Slots To Coeff ~ O(1) per slot Ours Sine Evaluation DM15,CGGI16 Accumulator: O(n) operation / 1 slot §Digit Extraction:

6s (Z127). 30s (Z1272). 15s (Z26). 239s (Z28).

§Sine Evaluation: 12.5s (12-bit precision). 68s (24-bit precision). [Song-Han-Kim-Kim-Cheon 18] Full Residue Number System: 8x ~ 12x speedup §Accumulator: 0.06s (1 bit). 10s (6 bits)

slide-38
SLIDE 38