an efficient and parallel gaussian sampler for lattices ...cpeikert/pubs/slides-pargauss.pdf · i...

60
An Efficient and Parallel Gaussian Sampler for Lattices Chris Peikert Georgia Tech CRYPTO 2010 1 / 10

Upload: others

Post on 19-Oct-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

An Efficient and ParallelGaussian Sampler for Lattices

Chris PeikertGeorgia Tech

CRYPTO 2010

1 / 10

Page 2: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Lattice-Based Crypto

L ⊂ Rn

b1

b2

=⇒

(Images courtesy xkcd.org)

4 Asymptotically efficient & highly parallelizable

4 Worst-case assumptions (& quantum-resistant?) [Ajtai’96,. . . ]

4 Many rich applications:F ‘Hash-and-sign’ signatures [GPV’08, CHKP’10, R’10, B’10]F (Hierarchical) IBE [GPV’08, CHKP’10, ABB’10a, ABB’10b]F Fully homomorphic encryption [G’09, SV’10, vDGHV’10]

2 / 10

Page 3: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Lattice-Based Crypto

L ⊂ Rn

p1

p2

=⇒

(Images courtesy xkcd.org)

4 Asymptotically efficient & highly parallelizable

4 Worst-case assumptions (& quantum-resistant?) [Ajtai’96,. . . ]

4 Many rich applications:F ‘Hash-and-sign’ signatures [GPV’08, CHKP’10, R’10, B’10]F (Hierarchical) IBE [GPV’08, CHKP’10, ABB’10a, ABB’10b]F Fully homomorphic encryption [G’09, SV’10, vDGHV’10]

2 / 10

Page 4: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Lattice-Based Crypto

L ⊂ Rn

b1

b2

p1

p2 =⇒

(Images courtesy xkcd.org)

4 Asymptotically efficient & highly parallelizable

4 Worst-case assumptions (& quantum-resistant?) [Ajtai’96,. . . ]

4 Many rich applications:F ‘Hash-and-sign’ signatures [GPV’08, CHKP’10, R’10, B’10]F (Hierarchical) IBE [GPV’08, CHKP’10, ABB’10a, ABB’10b]F Fully homomorphic encryption [G’09, SV’10, vDGHV’10]

2 / 10

Page 5: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Lattice-Based Crypto

L ⊂ Rn

b1

b2

p1

p2 =⇒

(Images courtesy xkcd.org)

4 Asymptotically efficient & highly parallelizable

4 Worst-case assumptions (& quantum-resistant?) [Ajtai’96,. . . ]

4 Many rich applications:F ‘Hash-and-sign’ signatures [GPV’08, CHKP’10, R’10, B’10]F (Hierarchical) IBE [GPV’08, CHKP’10, ABB’10a, ABB’10b]F Fully homomorphic encryption [G’09, SV’10, vDGHV’10]

2 / 10

Page 6: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Lattice-Based Crypto

L ⊂ Rn

b1

b2

p1

p2 =⇒

(Images courtesy xkcd.org)

4 Asymptotically efficient & highly parallelizable

4 Worst-case assumptions (& quantum-resistant?) [Ajtai’96,. . . ]

4 Many rich applications:F ‘Hash-and-sign’ signatures [GPV’08, CHKP’10, R’10, B’10]F (Hierarchical) IBE [GPV’08, CHKP’10, ABB’10a, ABB’10b]F Fully homomorphic encryption [G’09, SV’10, vDGHV’10]

2 / 10

Page 7: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Lattice-Based Crypto

L ⊂ Rn

b1

b2

p1

p2 =⇒

(Images courtesy xkcd.org)

4 Asymptotically efficient & highly parallelizable

4 Worst-case assumptions (& quantum-resistant?) [Ajtai’96,. . . ]

4 Many rich applications:F ‘Hash-and-sign’ signatures [GPV’08, CHKP’10, R’10, B’10]F (Hierarchical) IBE [GPV’08, CHKP’10, ABB’10a, ABB’10b]F Fully homomorphic encryption [G’09, SV’10, vDGHV’10]

2 / 10

Page 8: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Gaussian Sampling on LatticesI Given ‘good’ basis B and center c, sample discrete Gaussian on L

F ‘Zero-knowledge’ operation: leaks no information about B [GPV’08]

cb1

b2

[B’93,R’03,AR’04,MR’04,. . . ]

Crypto ApplicationsI ‘Answering queries:’ signing, (H)IBE key extraction, (NI)ZK

I Worst-case / average-case reductions [GPV’08,P’09,LPR’10,G’10]

I Narrower Gaussian⇒ smaller keys⇒ more efficient schemes

3 / 10

Page 9: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Gaussian Sampling on LatticesI Given ‘good’ basis B and center c, sample discrete Gaussian on L

F ‘Zero-knowledge’ operation: leaks no information about B [GPV’08]

cb1

b2

[B’93,R’03,AR’04,MR’04,. . . ]

Crypto ApplicationsI ‘Answering queries:’ signing, (H)IBE key extraction, (NI)ZK

I Worst-case / average-case reductions [GPV’08,P’09,LPR’10,G’10]

I Narrower Gaussian⇒ smaller keys⇒ more efficient schemes

3 / 10

Page 10: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Gaussian Sampling on LatticesI Given ‘good’ basis B and center c, sample discrete Gaussian on L

F ‘Zero-knowledge’ operation: leaks no information about B [GPV’08]

cb1

b2

[B’93,R’03,AR’04,MR’04,. . . ]

Crypto ApplicationsI ‘Answering queries:’ signing, (H)IBE key extraction, (NI)ZK

I Worst-case / average-case reductions [GPV’08,P’09,LPR’10,G’10]

I Narrower Gaussian⇒ smaller keys⇒ more efficient schemes

3 / 10

Page 11: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Gaussian Sampling on LatticesI Given ‘good’ basis B and center c, sample discrete Gaussian on L

F ‘Zero-knowledge’ operation: leaks no information about B [GPV’08]

cb1

b2

[B’93,R’03,AR’04,MR’04,. . . ]

Crypto ApplicationsI ‘Answering queries:’ signing, (H)IBE key extraction, (NI)ZK

I Worst-case / average-case reductions [GPV’08,P’09,LPR’10,G’10]

I Narrower Gaussian⇒ smaller keys⇒ more efficient schemes

3 / 10

Page 12: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Gaussian Sampling on LatticesI Given ‘good’ basis B and center c, sample discrete Gaussian on L

F ‘Zero-knowledge’ operation: leaks no information about B [GPV’08]

cb1

b2

[B’93,R’03,AR’04,MR’04,. . . ]

Crypto ApplicationsI ‘Answering queries:’ signing, (H)IBE key extraction, (NI)ZK

I Worst-case / average-case reductions [GPV’08,P’09,LPR’10,G’10]

I Narrower Gaussian⇒ smaller keys⇒ more efficient schemes

3 / 10

Page 13: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

The GPV Sampling AlgorithmI ‘Nearest-plane’ algorithm w/ randomized rounding [Babai’86,Klein’00]

cb1

b2

Good News, and Bad News. . .

4 Narrow: width ≈ max‖bi‖ = max dist between adjacent ‘planes’

7 Not efficient: time = Ω(n3) , high-precision real arithmetic

7 Inherently sequential: n adaptive iterations

7 No efficiency improvement for ring-based crypto [NTRU’98,M’02,. . . ]

4 / 10

Page 14: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

The GPV Sampling AlgorithmI ‘Nearest-plane’ algorithm w/ randomized rounding [Babai’86,Klein’00]

cb1

b2

Good News, and Bad News. . .

4 Narrow: width ≈ max‖bi‖ = max dist between adjacent ‘planes’

7 Not efficient: time = Ω(n3) , high-precision real arithmetic

7 Inherently sequential: n adaptive iterations

7 No efficiency improvement for ring-based crypto [NTRU’98,M’02,. . . ]

4 / 10

Page 15: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

The GPV Sampling AlgorithmI ‘Nearest-plane’ algorithm w/ randomized rounding [Babai’86,Klein’00]

cb1

b2

Good News, and Bad News. . .

4 Narrow: width ≈ max‖bi‖ = max dist between adjacent ‘planes’

7 Not efficient: time = Ω(n3) , high-precision real arithmetic

7 Inherently sequential: n adaptive iterations

7 No efficiency improvement for ring-based crypto [NTRU’98,M’02,. . . ]

4 / 10

Page 16: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

The GPV Sampling AlgorithmI ‘Nearest-plane’ algorithm w/ randomized rounding [Babai’86,Klein’00]

cb1

b2

Good News, and Bad News. . .

4 Narrow: width ≈ max‖bi‖ = max dist between adjacent ‘planes’

7 Not efficient: time = Ω(n3) , high-precision real arithmetic

7 Inherently sequential: n adaptive iterations

7 No efficiency improvement for ring-based crypto [NTRU’98,M’02,. . . ]

4 / 10

Page 17: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

The GPV Sampling AlgorithmI ‘Nearest-plane’ algorithm w/ randomized rounding [Babai’86,Klein’00]

cb1

b2

Good News, and Bad News. . .

4 Narrow: width ≈ max‖bi‖ = max dist between adjacent ‘planes’

7 Not efficient: time = Ω(n3) , high-precision real arithmetic

7 Inherently sequential: n adaptive iterations

7 No efficiency improvement for ring-based crypto [NTRU’98,M’02,. . . ]

4 / 10

Page 18: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

The GPV Sampling AlgorithmI ‘Nearest-plane’ algorithm w/ randomized rounding [Babai’86,Klein’00]

cb1

b2

Good News, and Bad News. . .

4 Narrow: width ≈ max‖bi‖ = max dist between adjacent ‘planes’

7 Not efficient: time = Ω(n3) , high-precision real arithmetic

7 Inherently sequential: n adaptive iterations

7 No efficiency improvement for ring-based crypto [NTRU’98,M’02,. . . ]

4 / 10

Page 19: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

The GPV Sampling AlgorithmI ‘Nearest-plane’ algorithm w/ randomized rounding [Babai’86,Klein’00]

cb1

b2

Good News, and Bad News. . .

4 Narrow: width ≈ max‖bi‖ = max dist between adjacent ‘planes’

7 Not efficient: time = Ω(n3) , high-precision real arithmetic

7 Inherently sequential: n adaptive iterations

7 No efficiency improvement for ring-based crypto [NTRU’98,M’02,. . . ]

4 / 10

Page 20: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

The GPV Sampling AlgorithmI ‘Nearest-plane’ algorithm w/ randomized rounding [Babai’86,Klein’00]

cb1

b2

Good News, and Bad News. . .

4 Narrow: width ≈ max‖bi‖ = max dist between adjacent ‘planes’

7 Not efficient: time = Ω(n3) , high-precision real arithmetic

7 Inherently sequential: n adaptive iterations

7 No efficiency improvement for ring-based crypto [NTRU’98,M’02,. . . ]

4 / 10

Page 21: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

The GPV Sampling AlgorithmI ‘Nearest-plane’ algorithm w/ randomized rounding [Babai’86,Klein’00]

cb1

b2

Good News, and Bad News. . .

4 Narrow: width ≈ max‖bi‖ = max dist between adjacent ‘planes’

7 Not efficient: time = Ω(n3) , high-precision real arithmetic

7 Inherently sequential: n adaptive iterations

7 No efficiency improvement for ring-based crypto [NTRU’98,M’02,. . . ]

4 / 10

Page 22: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our Contributions

1 A new Gaussian sampling algorithm for lattices.

Key Features

F Simple & efficient: ≈ 4n2 online adds and mults, modulo a small integer

Even better: O(n) time for ring-based schemes!

F Fully parallelizable: n2/P operations on each of P ≤ n2 processors

F High quality: for crypto lattices, same∗ Gaussian width as GPV

2 A general ‘convolution theorem’ for discrete Gaussians.

Other applications: LWE error distribution,bi-deniable encryption [OP’10], . . .

5 / 10

Page 23: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our Contributions

1 A new Gaussian sampling algorithm for lattices.

Key Features

F Simple & efficient: ≈ 4n2 online adds and mults, modulo a small integer

Even better: O(n) time for ring-based schemes!

F Fully parallelizable: n2/P operations on each of P ≤ n2 processors

F High quality: for crypto lattices, same∗ Gaussian width as GPV

2 A general ‘convolution theorem’ for discrete Gaussians.

Other applications: LWE error distribution,bi-deniable encryption [OP’10], . . .

5 / 10

Page 24: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our Contributions

1 A new Gaussian sampling algorithm for lattices.

Key Features

F Simple & efficient: ≈ 4n2 online adds and mults, modulo a small integer

Even better: O(n) time for ring-based schemes!

F Fully parallelizable: n2/P operations on each of P ≤ n2 processors

F High quality: for crypto lattices, same∗ Gaussian width as GPV

2 A general ‘convolution theorem’ for discrete Gaussians.

Other applications: LWE error distribution,bi-deniable encryption [OP’10], . . .

5 / 10

Page 25: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our Contributions

1 A new Gaussian sampling algorithm for lattices.

Key Features

F Simple & efficient: ≈ 4n2 online adds and mults, modulo a small integer

Even better: O(n) time for ring-based schemes!

F Fully parallelizable: n2/P operations on each of P ≤ n2 processors

F High quality: for crypto lattices, same∗ Gaussian width as GPV

2 A general ‘convolution theorem’ for discrete Gaussians.

Other applications: LWE error distribution,bi-deniable encryption [OP’10], . . .

5 / 10

Page 26: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our Contributions

1 A new Gaussian sampling algorithm for lattices.

Key Features

F Simple & efficient: ≈ 4n2 online adds and mults, modulo a small integer

Even better: O(n) time for ring-based schemes!

F Fully parallelizable: n2/P operations on each of P ≤ n2 processors

F High quality: for crypto lattices, same∗ Gaussian width as GPV

2 A general ‘convolution theorem’ for discrete Gaussians.

Other applications: LWE error distribution,bi-deniable encryption [OP’10], . . .

5 / 10

Page 27: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our Contributions

1 A new Gaussian sampling algorithm for lattices.

Key Features

F Simple & efficient: ≈ 4n2 online adds and mults, modulo a small integer

Even better: O(n) time for ring-based schemes!

F Fully parallelizable: n2/P operations on each of P ≤ n2 processors

F High quality: for crypto lattices, same∗ Gaussian width as GPV

2 A general ‘convolution theorem’ for discrete Gaussians.

Other applications: LWE error distribution,bi-deniable encryption [OP’10], . . .

5 / 10

Page 28: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

A First AttemptI [Babai’86] ‘simple rounding:’ c 7→ B · bB−1 · ce

$

. (Fast & Parallel!)

I Deterministic rounding is insecure [NguyenRegev’06] . . .

. . . but what about randomized rounding?

cb1

b2

I Non-spherical distribution: has covariance

Σ := Expx

[x · xt] ≈ B · Bt.

Covariance can be measured — and it leaks B! (up to rotation)

6 / 10

Page 29: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

A First AttemptI [Babai’86] ‘simple rounding:’ c 7→ B · bB−1 · ce

$

. (Fast & Parallel!)

I Deterministic rounding is insecure [NguyenRegev’06] . . .

. . . but what about randomized rounding?

cb1

b2

I Non-spherical distribution: has covariance

Σ := Expx

[x · xt] ≈ B · Bt.

Covariance can be measured — and it leaks B! (up to rotation)

6 / 10

Page 30: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

A First AttemptI [Babai’86] ‘simple rounding:’ c 7→ B · bB−1 · ce

$

. (Fast & Parallel!)

I Deterministic rounding is insecure [NguyenRegev’06] . . .

. . . but what about randomized rounding?

cb1

b2

I Non-spherical distribution: has covariance

Σ := Expx

[x · xt] ≈ B · Bt.

Covariance can be measured — and it leaks B! (up to rotation)

6 / 10

Page 31: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

A First AttemptI [Babai’86] ‘simple rounding:’ c 7→ B · bB−1 · ce$. (Fast & Parallel!)

I Deterministic rounding is insecure [NguyenRegev’06] . . .

. . . but what about randomized rounding?

cb1

b2

I Non-spherical distribution: has covariance

Σ := Expx

[x · xt] ≈ B · Bt.

Covariance can be measured — and it leaks B! (up to rotation)

6 / 10

Page 32: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

A First AttemptI [Babai’86] ‘simple rounding:’ c 7→ B · bB−1 · ce$. (Fast & Parallel!)

I Deterministic rounding is insecure [NguyenRegev’06] . . .

. . . but what about randomized rounding?

cb1

b2

I Non-spherical distribution: has covariance

Σ := Expx

[x · xt] ≈ B · Bt.

Covariance can be measured — and it leaks B! (up to rotation)

6 / 10

Page 33: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

A First AttemptI [Babai’86] ‘simple rounding:’ c 7→ B · bB−1 · ce$. (Fast & Parallel!)

I Deterministic rounding is insecure [NguyenRegev’06] . . .

. . . but what about randomized rounding?

cb1

b2

I Non-spherical distribution: has covariance

Σ := Expx

[x · xt] ≈ B · Bt.

Covariance can be measured — and it leaks B! (up to rotation)

6 / 10

Page 34: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

A First AttemptI [Babai’86] ‘simple rounding:’ c 7→ B · bB−1 · ce$. (Fast & Parallel!)

I Deterministic rounding is insecure [NguyenRegev’06] . . .

. . . but what about randomized rounding?

cb1

b2

I Non-spherical distribution: has covariance

Σ := Expx

[x · xt] ≈ B · Bt.

Covariance can be measured — and it leaks B! (up to rotation)

6 / 10

Page 35: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Inspiration: Some Facts About Gaussians1 Continuous Gaussian⇐⇒ positive definite covariance matrix Σ.

(pos def: ut Σ u > 0 for all unit u.)

Spherical Gaussian⇐⇒ covariance s2 I.

2 Convolution of Gaussians:

+ =

Σ1 + Σ2 = Σ = s2 I

3 Given Σ1, how small can s be? For Σ2 := s2 I− Σ1,

ut Σ2 u = s2 − ut Σ1 u > 0 ⇐⇒ s2 > maxλi(Σ1)

When Σ1 = B Bt, any s > s1(B) := max singular val of B.

7 / 10

Page 36: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Inspiration: Some Facts About Gaussians1 Continuous Gaussian⇐⇒ positive definite covariance matrix Σ.

(pos def: ut Σ u > 0 for all unit u.)

Spherical Gaussian⇐⇒ covariance s2 I.

2 Convolution of Gaussians:

+ =

Σ1 + Σ2 = Σ = s2 I

3 Given Σ1, how small can s be? For Σ2 := s2 I− Σ1,

ut Σ2 u = s2 − ut Σ1 u > 0 ⇐⇒ s2 > maxλi(Σ1)

When Σ1 = B Bt, any s > s1(B) := max singular val of B.

7 / 10

Page 37: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Inspiration: Some Facts About Gaussians1 Continuous Gaussian⇐⇒ positive definite covariance matrix Σ.

(pos def: ut Σ u > 0 for all unit u.)

Spherical Gaussian⇐⇒ covariance s2 I.

2 Convolution of Gaussians:

+ =

Σ1 + Σ2 = Σ = s2 I

3 Given Σ1, how small can s be? For Σ2 := s2 I− Σ1,

ut Σ2 u = s2 − ut Σ1 u > 0 ⇐⇒ s2 > maxλi(Σ1)

When Σ1 = B Bt, any s > s1(B) := max singular val of B.

7 / 10

Page 38: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Inspiration: Some Facts About Gaussians1 Continuous Gaussian⇐⇒ positive definite covariance matrix Σ.

(pos def: ut Σ u > 0 for all unit u.)

Spherical Gaussian⇐⇒ covariance s2 I.

2 Convolution of Gaussians:

+ =

Σ1 + Σ2 = Σ = s2 I

3 Given Σ1, how small can s be? For Σ2 := s2 I− Σ1,

ut Σ2 u = s2 − ut Σ1 u > 0 ⇐⇒ s2 > maxλi(Σ1)

When Σ1 = B Bt, any s > s1(B) := max singular val of B.

7 / 10

Page 39: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Inspiration: Some Facts About Gaussians1 Continuous Gaussian⇐⇒ positive definite covariance matrix Σ.

(pos def: ut Σ u > 0 for all unit u.)

Spherical Gaussian⇐⇒ covariance s2 I.

2 Convolution of Gaussians:

+ =

Σ1 + Σ2 = Σ = s2 I

3 Given Σ1, how small can s be? For Σ2 := s2 I− Σ1,

ut Σ2 u = s2 − ut Σ1 u > 0 ⇐⇒ s2 > maxλi(Σ1)

When Σ1 = B Bt, any s > s1(B) := max singular val of B.

7 / 10

Page 40: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Inspiration: Some Facts About Gaussians1 Continuous Gaussian⇐⇒ positive definite covariance matrix Σ.

(pos def: ut Σ u > 0 for all unit u.)

Spherical Gaussian⇐⇒ covariance s2 I.

2 Convolution of Gaussians:

+ =

Σ1 + Σ2 = Σ = s2 I

3 Given Σ1, how small can s be? For Σ2 := s2 I− Σ1,

ut Σ2 u = s2 − ut Σ1 u > 0 ⇐⇒ s2 > maxλi(Σ1)

When Σ1 = B Bt, any s > s1(B) := max singular val of B.

7 / 10

Page 41: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt

Σ2

cb1

b2

8 / 10

Page 42: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt Σ2

cb1

b2c′

8 / 10

Page 43: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt Σ2

cb1

b2c′

8 / 10

Page 44: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt Σ2

cb1

b2c′

‘Convolution’ TheoremAlgorithm generates the discrete, spherical Gaussian over L.

(NB: not really a convolution, since step 2 depends on step 1.

Proof uses ‘smoothing parameter’ [MR’04] to reduce to an actual convolution.)

8 / 10

Page 45: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt Σ2

cb1

b2c′

‘Convolution’ TheoremAlgorithm generates the discrete, spherical Gaussian over L.

(NB: not really a convolution, since step 2 depends on step 1.

Proof uses ‘smoothing parameter’ [MR’04] to reduce to an actual convolution.)

8 / 10

Page 46: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt Σ2

cb1

b2c′

Optimizing for Crypto Applications

1 Precompute offline: Σ2, B−1, perturbation(s)

2 Use integer perturbations and arithmetic

3 Exploit ‘q-ary’ lattices: mod q operations, offline rounding

4 Batch multi-sample using fast matrix mult

8 / 10

Page 47: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt Σ2

cb1

b2c′

Optimizing for Crypto Applications

1 Precompute offline: Σ2, B−1, perturbation(s)

2 Use integer perturbations and arithmetic

3 Exploit ‘q-ary’ lattices: mod q operations, offline rounding

4 Batch multi-sample using fast matrix mult

8 / 10

Page 48: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt Σ2

cb1

b2c′

Optimizing for Crypto Applications

1 Precompute offline: Σ2, B−1, perturbation(s)

2 Use integer perturbations and arithmetic

3 Exploit ‘q-ary’ lattices: mod q operations, offline rounding

4 Batch multi-sample using fast matrix mult

8 / 10

Page 49: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt Σ2

cb1

b2c′

Optimizing for Crypto Applications

1 Precompute offline: Σ2, B−1, perturbation(s)

2 Use integer perturbations and arithmetic

3 Exploit ‘q-ary’ lattices: mod q operations, offline rounding

4 Batch multi-sample using fast matrix mult8 / 10

Page 50: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt Σ2

cb1

b2

p1

p2

Some PerspectiveI Resembles ‘perturbation’ heuristic of NTRUSign [HHG+’03]. But. . .

I NTRU perturbations are deterministic & inherently online. And. . .

I They may be insecure anyway [MPSW’10].

8 / 10

Page 51: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt Σ2

cb1

b2

p1

p2

Some PerspectiveI Resembles ‘perturbation’ heuristic of NTRUSign [HHG+’03]. But. . .

I NTRU perturbations are deterministic & inherently online. And. . .

I They may be insecure anyway [MPSW’10].

8 / 10

Page 52: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

Our New Sampling AlgorithmI Given basis B, center c, and s > s1(B),

1 Perturb c with covariance Σ2 := s2 I− Σ1

2 Randomly round: return B · bB−1 · c′e$

Σ1 = B Bt Σ2

cb1

b2

p1

p2

Some PerspectiveI Resembles ‘perturbation’ heuristic of NTRUSign [HHG+’03]. But. . .

I NTRU perturbations are deterministic & inherently online. And. . .

I They may be insecure anyway [MPSW’10].

8 / 10

Page 53: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

How Does the Quality Compare?

Narrower is Better!I GPV: width ≈ ‖B‖ := max Gram-Schmidt length of B ≤ max‖bi‖

I New: width ≈ s1(B) := max singular value of B

Bad News, and Good News. . .

7 In general,‖B‖ ≤ s1(B) ≤ n · ‖B‖

(Both inequalities are tight.)

4 We show: for random cryptographic bases [AP’09,CHKP’10],

‖B‖ ≈ s1(B)

because bases are ‘well-rounded.’

9 / 10

Page 54: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

How Does the Quality Compare?

Narrower is Better!I GPV: width ≈ ‖B‖ := max Gram-Schmidt length of B ≤ max‖bi‖

I New: width ≈ s1(B) := max singular value of B

Bad News, and Good News. . .

7 In general,‖B‖ ≤ s1(B) ≤ n · ‖B‖

(Both inequalities are tight.)

4 We show: for random cryptographic bases [AP’09,CHKP’10],

‖B‖ ≈ s1(B)

because bases are ‘well-rounded.’

9 / 10

Page 55: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

How Does the Quality Compare?

Narrower is Better!I GPV: width ≈ ‖B‖ := max Gram-Schmidt length of B ≤ max‖bi‖

I New: width ≈ s1(B) := max singular value of B

Bad News, and Good News. . .7 In general,

‖B‖ ≤ s1(B) ≤ n · ‖B‖

(Both inequalities are tight.)

4 We show: for random cryptographic bases [AP’09,CHKP’10],

‖B‖ ≈ s1(B)

because bases are ‘well-rounded.’

9 / 10

Page 56: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

How Does the Quality Compare?

Narrower is Better!I GPV: width ≈ ‖B‖ := max Gram-Schmidt length of B ≤ max‖bi‖

I New: width ≈ s1(B) := max singular value of B

Bad News, and Good News. . .7 In general,

‖B‖ ≤ s1(B) ≤ n · ‖B‖

(Both inequalities are tight.)

4 We show: for random cryptographic bases [AP’09,CHKP’10],

‖B‖ ≈ s1(B)

because bases are ‘well-rounded.’

9 / 10

Page 57: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

EpilogueI In an upcoming work [MP’10], we tackle basis generation and

Gaussian sampling jointly.

⇒ Simple constructions, optimal constants, practical algorithms

I Implementation: 1000s of samples / sec at moderate security.(Without batching or parallelism!)

⇒ Essentially as fast as the public-key operation.

⇒ Bottleneck: n2 cost inherent to general lattices.

Ring-based schemes will be much faster!

I Stay tuned . . .

Thanks!

10 / 10

Page 58: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

EpilogueI In an upcoming work [MP’10], we tackle basis generation and

Gaussian sampling jointly.

⇒ Simple constructions, optimal constants, practical algorithms

I Implementation: 1000s of samples / sec at moderate security.(Without batching or parallelism!)

⇒ Essentially as fast as the public-key operation.

⇒ Bottleneck: n2 cost inherent to general lattices.

Ring-based schemes will be much faster!

I Stay tuned . . .

Thanks!

10 / 10

Page 59: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

EpilogueI In an upcoming work [MP’10], we tackle basis generation and

Gaussian sampling jointly.

⇒ Simple constructions, optimal constants, practical algorithms

I Implementation: 1000s of samples / sec at moderate security.(Without batching or parallelism!)

⇒ Essentially as fast as the public-key operation.

⇒ Bottleneck: n2 cost inherent to general lattices.

Ring-based schemes will be much faster!

I Stay tuned . . .

Thanks!

10 / 10

Page 60: An Efficient and Parallel Gaussian Sampler for Lattices ...cpeikert/pubs/slides-pargauss.pdf · I Narrower Gaussian )smaller keys )more efficient schemes 3/10 . Gaussian Sampling

EpilogueI In an upcoming work [MP’10], we tackle basis generation and

Gaussian sampling jointly.

⇒ Simple constructions, optimal constants, practical algorithms

I Implementation: 1000s of samples / sec at moderate security.(Without batching or parallelism!)

⇒ Essentially as fast as the public-key operation.

⇒ Bottleneck: n2 cost inherent to general lattices.

Ring-based schemes will be much faster!

I Stay tuned . . .

Thanks!10 / 10