Faster Gaussian Lattice Sampling using Information Leakage Gaussian - - PowerPoint PPT Presentation

faster gaussian lattice sampling using
SMART_READER_LITE
LIVE PREVIEW

Faster Gaussian Lattice Sampling using Information Leakage Gaussian - - PowerPoint PPT Presentation

Faster Gaussian Lattice Sampling using Lazy FPA L. Ducas P.Q. Nguyen Introduction Lattices based Signatures Before Gaussian Sampling Preventing Faster Gaussian Lattice Sampling using Information Leakage Gaussian Sampling Our Work Lazy


slide-1
SLIDE 1

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Faster Gaussian Lattice Sampling using Lazy Floating-Point Arithmetic L´ eo Ducas, ´ Ecole Normale Sup´ erieure Phong Nguyen, INRIA & Tsinghua Univ. Asiacrypt 2012

2/33

slide-2
SLIDE 2

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Lattices

A lattice Λ is a discrete subgroup of Rn.

3/33

slide-3
SLIDE 3

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Basis of Lattices

Lattices have two kinds of basis: Good Basis (short) Derive bad basis Solve geometric problem as Approx-CVP Bad Basis (large) test membership t ∈ Λ generate random element in Λ Good setting for Public Key Cryptography !

4/33

slide-4
SLIDE 4

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Approximate the Closest Vector Problem

The Approx-CVP Problem: Given t ∈ Rn, find c ∈ Λ close to t Λ

5/33

slide-5
SLIDE 5

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Approximate the Closest Vector Problem

Problem: Given t ∈ Rn, find c ∈ Λ close to t Λ Zn

B−1 − →

6/33

slide-6
SLIDE 6

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Approximate the Closest Vector Problem

Solution: s = ⌈ t ·B−1⌋ · B (Baba¨ ı’s Round-Off [Bab86]) Λ Zn

B−1 − → ← − B

7/33

slide-7
SLIDE 7

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Approximate the Closest Vector Problem

Solution: s = ⌈ t ·B−1⌋ · B (Baba¨ ı’s Round-Off [Bab86]) Λ Zn

B−1 − → ← − B

8/33

slide-8
SLIDE 8

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Approximate the Closest Vector Problem

Solution: s = ⌈ t ·B−1⌋ · B (Baba¨ ı’s Round-Off [Bab86]) Quality of the solution depends on the basis B. Λ Zn

B−1 − → ← − B

9/33

slide-9
SLIDE 9

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

GGH and NTRUSign Signature Schemes

The Goldreich-Goldwasser-Halevi [GGH97] signature scheme: Secret Key: a short basis B of Λ NTRUSign [HGP+03] is an optimized instantiation of GGH, using compact lattices.

10/33

slide-10
SLIDE 10

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

GGH and NTRUSign Signature Schemes

The Goldreich-Goldwasser-Halevi [GGH97] signature scheme: Secret Key: a short basis B of Λ Public Key: a large basis of Λ NTRUSign [HGP+03] is an optimized instantiation of GGH, using compact lattices.

10/33

slide-11
SLIDE 11

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

GGH and NTRUSign Signature Schemes

The Goldreich-Goldwasser-Halevi [GGH97] signature scheme: Secret Key: a short basis B of Λ Public Key: a large basis of Λ Signature: t = H(m) ∈ Rn the hash of a message s = ⌈t · B−1⌋ · B the signature of m NTRUSign [HGP+03] is an optimized instantiation of GGH, using compact lattices.

10/33

slide-12
SLIDE 12

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

GGH and NTRUSign Signature Schemes

The Goldreich-Goldwasser-Halevi [GGH97] signature scheme: Secret Key: a short basis B of Λ Public Key: a large basis of Λ Signature: t = H(m) ∈ Rn the hash of a message s = ⌈t · B−1⌋ · B the signature of m Verification: Check that s ∈ Λ and s − H(m) is small NTRUSign [HGP+03] is an optimized instantiation of GGH, using compact lattices.

10/33

slide-13
SLIDE 13

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Gaussian Sampling: Why ?

The previous algorithm to find pre-image leaks information about the good basis B: Raw version broken in [NR09]

11/33

slide-14
SLIDE 14

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Gaussian Sampling: Why ?

The previous algorithm to find pre-image leaks information about the good basis B: Raw version broken in [NR09] Heuristic countermeasures later broken [DN12]

11/33

slide-15
SLIDE 15

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Gaussian Sampling: Why ?

The previous algorithm to find pre-image leaks information about the good basis B: Raw version broken in [NR09] Heuristic countermeasures later broken [DN12] Gaussian Sampling [Kle00] proposed by Gentry et

  • al. [GPV08] as a provably secure countermeasure

11/33

slide-16
SLIDE 16

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

How to Provably prevents information leakage ?

Let H be a hash function modelized as a Random Oracle. The proof rely on statistical indistinguishability between: Real-World Simulation Get t = H(m) ∈ Rn Choose s ∈ Λ uniformly Find s ∈ Λ close to t Choose t = s + r for short r ∈ Rn using the good basis B Program the R.O. : H(m) ← t Output (t, s) Output (t, s)

12/33

slide-17
SLIDE 17

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Provably prevent information leakage

In the Simulation we set t = s + r for a certain distribution r ← D. In the Real-World we set t = H(m) ∈ Rn that is uniform. ⇒ Two constraints:

13/33

slide-18
SLIDE 18

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Provably prevent information leakage

In the Simulation we set t = s + r for a certain distribution r ← D. In the Real-World we set t = H(m) ∈ Rn that is uniform. ⇒ Two constraints: Smoothness: s + r for r ← D must be (almost) uniform

13/33

slide-19
SLIDE 19

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Provably prevent information leakage

In the Simulation we set t = s + r for a certain distribution r ← D. In the Real-World we set t = H(m) ∈ Rn that is uniform. ⇒ Two constraints: Smoothness: s + r for r ← D must be (almost) uniform Pre-image Sampling Correctness: In the Real-World, knowing a short basis B, and given t, the signer should sample s ∈ Λ such that follows the conditional distribution {s ← D + t|s ∈ Λ}

13/33

slide-20
SLIDE 20

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

trapdoor OWF with pre-image sampling

Formalized by Gentry et al. [GPV08].

Already used before [GPV08]: Rabin Signature Scheme

Let N = pq be an RSA modulus. The function x ∈ ZN → x2 ∈ ZN is a one-way function, The factorization (p, q) can be used as a trapdoor: recover √· by CRT over Zp and Zq Yet, each square have 4 pre-image. One should choose it uniformly at random to achieve smoothness

14/33

slide-21
SLIDE 21

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

trapdoor OWF with pre-image sampling

Formalized by Gentry et al. [GPV08].

For Lattice-based OWF: Gaussian Sampling

Best smoothness/width ratio Explicit and simple formulae for the Conditional Distribution Known algorithm to sample the conditional distribution using a short basis from Klein [Kle00] · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · Somehow, GPV is similar to Rabin Signature, with a non-trivial pre-image sampling algorithm.

14/33

slide-22
SLIDE 22

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

The issue: efficiency

Lattice Based Cryptography is usually praised for: Resistance to sub-exponential and quantum attacks Efficiently Parrallelizable Efficiently Parrallelizable Operation in a small modulus Zq

15/33

slide-23
SLIDE 23

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

The issue: efficiency

Lattice Based Cryptography is usually praised for: Resistance to sub-exponential and quantum attacks Efficiently Parrallelizable Operations in a small modulus Zq Q with large

  • perands

Some algorithms in fact require real numbers (Q or R), including Klein’s Algorithm! Parallelizability repaired by Peikert [Pei10]. What about Floating Point Arithmetic (FPA) to formalize, and maybe accelerate operations in Q ?

15/33

slide-24
SLIDE 24

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Our Results

In this work, we analyze and optimize the use of FPA in Klein’s Alg. as well as the offline part of Peikert’s Alg. First rigorous analysis of FPA for provable security

16/33

slide-25
SLIDE 25

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Our Results

In this work, we analyze and optimize the use of FPA in Klein’s Alg. as well as the offline part of Peikert’s Alg. First rigorous analysis of FPA for provable security Concrete requirement for the FPA variant of those Alg.

16/33

slide-26
SLIDE 26

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Our Results

In this work, we analyze and optimize the use of FPA in Klein’s Alg. as well as the offline part of Peikert’s Alg. First rigorous analysis of FPA for provable security Concrete requirement for the FPA variant of those Alg. Laziness/backtracking technique to improve the running time from ˜ O(n3) to ˜ O(n2) or even ˜ O(n) in some cases

16/33

slide-27
SLIDE 27

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Our Results

In this work, we analyze and optimize the use of FPA in Klein’s Alg. as well as the offline part of Peikert’s Alg. First rigorous analysis of FPA for provable security Concrete requirement for the FPA variant of those Alg. Laziness/backtracking technique to improve the running time from ˜ O(n3) to ˜ O(n2) or even ˜ O(n) in some cases Allow implementation using mostly double-float, thus benifiting from hardware acceleration

16/33

slide-28
SLIDE 28

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Floating Point Arithmetic Definition

Definition (Floating Point of Mantissa m)

A floating-point number ¯ f ∈ FPm is a triplet ¯ f = (s, e, v) where s ∈ {0, 1}, e ∈ Z and v ∈ {0 . . . 2m − 1}. It represents the real number R(¯ f ) = (−1)s · 2e−m · v ∈ R. FPA operations verify relative error bounds:

Property (FPA axioms)

Let ǫ = 21−m. All arithmetic operations ¯

  • ∈ {¯

+, ¯ −,¯ · , ¯ / } verify for any ¯ f1, ¯ f2 ∈ FPm: |R(¯ f1¯

  • ¯

f2) − (R(¯ f1) ◦ R(¯ f2))| ≤ |R(¯ f1) ◦ R(¯ f2)|ǫ

17/33

slide-29
SLIDE 29

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

FPA Efficiency, Theory

In theory, the cost of multipli- cation is O(m log m log log m), using Sch¨

  • nhage-Strassen

Algorithm (aka. FFT). m Cost of Multiplication

18/33

slide-30
SLIDE 30

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

FPA Efficiency, Theory

In theory, the cost of multipli- cation is O(m log m log log m), using Sch¨

  • nhage-Strassen

Algorithm (aka. FFT). m Cost of Multiplication

18/33

slide-31
SLIDE 31

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

FPA Efficiency, Practice

Yet, considering the constants and overhead , one rather use: Textbook mult. when m ≤ 640: ˜ O(m2)) Karatsuba mult when m ≤ 60000: ˜ O(m1.585) FFT otherwise m Cost of Multiplication Textbook Karatsuba FFT | | 640 60000

19/33

slide-32
SLIDE 32

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

FPA Efficiency, Practice

Yet, considering the constants and overhead , one rather use: Textbook mult. when m ≤ 640: ˜ O(m2)) Karatsuba mult when m ≤ 60000: ˜ O(m1.585) FFT otherwise m Cost of Multiplication Textbook Karatsuba FFT | | 640 60000

19/33

slide-33
SLIDE 33

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

FPA Efficiency, Practice for small m

Below machine precision, operations are implemented in hardware: they can be done in 1 cycle ! Beyond, there is an important overhead because of software implementation.

On x86-64 proc.

The speed ratio between double and quad-float is about 1 to 15! m Cost of Mult. (cycles) 1 10 20 30 53 114 | | |

20/33

slide-34
SLIDE 34

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Error Propagation during Klein’s Alg.

Val in FPm Val in Z × × × × . . . . . . = = = = + + + Final result c:

  • nly k < m correct bits

21/33

slide-35
SLIDE 35

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.15

22/33

slide-36
SLIDE 36

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.20

22/33

slide-37
SLIDE 37

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.25

22/33

slide-38
SLIDE 38

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.30

22/33

slide-39
SLIDE 39

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.35

22/33

slide-40
SLIDE 40

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.40

22/33

slide-41
SLIDE 41

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.45

22/33

slide-42
SLIDE 42

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.50

22/33

slide-43
SLIDE 43

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.55

22/33

slide-44
SLIDE 44

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.60

22/33

slide-45
SLIDE 45

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.65

22/33

slide-46
SLIDE 46

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

The previous result c is then used as the center of a discrete Gaussian: x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.70

22/33

slide-47
SLIDE 47

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

Uncertainty propagation

The output distribution can only be correct up to the correctness of the input center c. x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.7763

23/33

slide-48
SLIDE 48

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

1-dimensional Discrete Gaussian

Correction Requirement

We need the statistical distance between the desired distribution and the output distribution to be negligible. x ∈ Z Probability

  • 5
  • 4
  • 3
  • 2
  • 1

1 2 3 4 5 6

c = 1.7763

24/33

slide-49
SLIDE 49

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Precision Requirement

Therefore, to prove security of λ bits, we need to compute c such that its λ first bits are surely correct: m ≥ λ = 80.

Theorem (Sufficient Correctness Condition)

For any λ, the statistical distance between DΛ(B),σ,c and the output of KleinFPm(B, σ, c) is less than 2−λ if: m ≥ λ + polylog(λ)

Concrete Case

For security of λ = 80, with NTRUSign-type lattice, we require m ≈ 120.

25/33

slide-50
SLIDE 50

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Efficiency of the previous Algorithm

The previous result let us run Klein’s Alg. at precision m = λ + polylog(λ). Asymptotic running time is still ˜ O(λ3): only better than KleinQ by a constant

26/33

slide-51
SLIDE 51

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Efficiency of the previous Algorithm

The previous result let us run Klein’s Alg. at precision m = λ + polylog(λ). Asymptotic running time is still ˜ O(λ3): only better than KleinQ by a constant double-float are not suitable, and quad-float are barely enough

26/33

slide-52
SLIDE 52

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Efficiency of the previous Algorithm

The previous result let us run Klein’s Alg. at precision m = λ + polylog(λ). Asymptotic running time is still ˜ O(λ3): only better than KleinQ by a constant double-float are not suitable, and quad-float are barely enough We really do need that much precision for information theoretic reasons, but do we need it every single time ?

26/33

slide-53
SLIDE 53

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Rejection Sampling

The 1-dimensional discrete Gaussian is drawn using Rejection Sampling. Rejection Sampling: Draw uniform (x, y) ∈ If (x, y) ∈ return x Else, restart

  • 4 -3 -2 -1 0

1 2 3 4 5 6

27/33

slide-54
SLIDE 54

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Dealing with Uncertainty

First define a Rej. Sampling Algorithm with Trigger: given an error-bound δc on c, bound the uncertainty area . Rejection Sampling: Draw uniform (x, y) ∈ If (x, y) ∈ Trigger If (x, y) ∈ return x Else, restart

  • 4
  • 4 -3
  • 3 -2
  • 2 -1
  • 1 0

1 2 3 4 5 6

28/33

slide-55
SLIDE 55

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Our Optimized Algorithm: Lazyness/Backtracking

Use two FP types: high prec. m and low prec m′ < m. High prec. ⇒ negligible area (negligible error) Low prec. ⇒ small area (rare backtracking) Start Rej.-Sampling with Trigger, using low precision c

29/33

slide-56
SLIDE 56

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Our Optimized Algorithm: Lazyness/Backtracking

Use two FP types: high prec. m and low prec m′ < m. High prec. ⇒ negligible area (negligible error) Low prec. ⇒ small area (rare backtracking) Start Rej.-Sampling with Trigger, using low precision c With small probability, will trigger backtracking

29/33

slide-57
SLIDE 57

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Our Optimized Algorithm: Lazyness/Backtracking

Use two FP types: high prec. m and low prec m′ < m. High prec. ⇒ negligible area (negligible error) Low prec. ⇒ small area (rare backtracking) Start Rej.-Sampling with Trigger, using low precision c With small probability, will trigger backtracking Recompute the same c at high precision

29/33

slide-58
SLIDE 58

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Our Optimized Algorithm: Lazyness/Backtracking

Use two FP types: high prec. m and low prec m′ < m. High prec. ⇒ negligible area (negligible error) Low prec. ⇒ small area (rare backtracking) Start Rej.-Sampling with Trigger, using low precision c With small probability, will trigger backtracking Recompute the same c at high precision Return to Rej.-Sampling, with negligible area.

29/33

slide-59
SLIDE 59

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Efficiency of this Our Optimized Algorithm

Choosing m′ carefully, we can show that this new algorithm runs in ˜ O(λ2).

30/33

slide-60
SLIDE 60

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Efficiency of this Our Optimized Algorithm

Choosing m′ carefully, we can show that this new algorithm runs in ˜ O(λ2). Same technique (+ other tricks) applies to Peikert’s Offline Algorithm, for which we can reach quasi-linear complexity.

30/33

slide-61
SLIDE 61

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Efficiency of this Our Optimized Algorithm

Choosing m′ carefully, we can show that this new algorithm runs in ˜ O(λ2). Same technique (+ other tricks) applies to Peikert’s Offline Algorithm, for which we can reach quasi-linear complexity. Choosing m′ = 53 (double-precision) for known crypto-grade lattice is enough: most operations are done in 1 cycle !

30/33

slide-62
SLIDE 62

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Summary of this work

Provide another step toward practicality of Lattice-Based Cryptography.

31/33

slide-63
SLIDE 63

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Summary of this work

Provide another step toward practicality of Lattice-Based Cryptography. First (?) application of numerical analysis to provable security

31/33

slide-64
SLIDE 64

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Summary of this work

Provide another step toward practicality of Lattice-Based Cryptography. First (?) application of numerical analysis to provable security Give concrete conditions rather than asymptotic: implementation-ready

31/33

slide-65
SLIDE 65

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Summary of this work

Provide another step toward practicality of Lattice-Based Cryptography. First (?) application of numerical analysis to provable security Give concrete conditions rather than asymptotic: implementation-ready Integrate and analyze Lazyness technique: efficiency improved in practice by a factor about 15

31/33

slide-66
SLIDE 66

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

Thank you !

Questions ?

32/33

slide-67
SLIDE 67

Faster Gaussian Lattice Sampling using Lazy FPA

  • L. Ducas

P.Q. Nguyen Introduction

Lattices based Signatures Before Gaussian Sampling Preventing Information Leakage Gaussian Sampling Our Work

A FPA variant of Klein’s Algorithm

Floating Point Arithmetic FPA usage in Klein’s Alg. Impact of errors, and precision requirement

An Optimized FPA variant of Klein’s Algorithm

General Rejection Sampling Introducing Lazyness in Rej. Sampling Efficiency

Conclusion

  • L. Babai, On Lov´

asz lattice reduction and the nearest lattice point problem, Combinatorica 6 (1986), 1–13.

  • L. Ducas and P. Q. Nguyen, Learning a zonotope and more: Cryptanalysis of NTRUSign

countermeasures, Advances in Cryptology – Proceedings of ASIACRYPT ’12, LNCS, Springer, 2012.

  • O. Goldreich, S. Goldwasser, and S. Halevi, Public-key cryptosystems from lattice reduction

problems, Proc. of Crypto ’97, LNCS, vol. 1294, IACR, Springer-Verlag, 1997, Full version vailable at ECCC as TR96-056., pp. 112–131. Craig Gentry, Chris Peikert, and Vinod Vaikuntanathan, Trapdoors for hard lattices and new cryptographic constructions, Proc. STOC ’08, ACM, 2008, pp. 197–206.

  • J. Hoffstein, N. A. Howgrave Graham, J. Pipher, J. H. Silverman, and W. Whyte, NTRUSIGN:

Digital signatures using the NTRU lattice, Proc. of CT-RSA, LNCS, vol. 2612, Springer-Verlag, 2003.

  • P. Klein, Finding the closest lattice vector when it’s unusually close, Proc. of SODA ’00,

ACM–SIAM, 2000.

  • P. Q. Nguyen and O. Regev,

Learning a Parallelepiped: Cryptanalysis of GGH and NTRU Signatures, J. Cryptology 22 (2009),

  • no. 2, 139–160, Preliminary version in EUROCRYPT 2006.

Chris Peikert, An efficient and parallel gaussian sampler for lattices, Proc. CRYPTO ’10, Lecture Notes in Computer Science, vol. 6223, Springer, 2010, pp. 80–97. 33/33