ffi ring-lwe encryption on 8-bit avr processors...short overview ring-lwe encryption scheme our...

102
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion . . Efficient Ring-LWE Encryption on 8-bit AVR Processors Zhe Liu 1 Hwajeong Seo 2 Sujoy Sinha Roy 3 Johann Großsch¨ adl 1 Howon Kim 2 Ingrid Verbauwhede 3 1 University of Luxembourg 2 Pusan National University 3 Katholieke Universiteit Leuven 2015/09/16 1 / 60

Upload: others

Post on 24-Aug-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.

......

Efficient Ring-LWE Encryptionon 8-bit AVR Processors

Zhe Liu1 Hwajeong Seo2 Sujoy Sinha Roy3

Johann Großschadl1 Howon Kim2 Ingrid Verbauwhede3

1University of Luxembourg2Pusan National University

3Katholieke Universiteit Leuven

2015/09/16

1 / 60

Page 2: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Outline

...1 Short Overview

...2 Ring-LWE Encryption Scheme

...3 Our ImplementationOptimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

...4 Implementation ResultsComparison with Related Work

...5 Conclusion

2 / 60

Page 3: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Outline

...1 Short Overview

...2 Ring-LWE Encryption Scheme

...3 Our ImplementationOptimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

...4 Implementation ResultsComparison with Related Work

...5 Conclusion

3 / 60

Page 4: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Lattice-based Cryptography

RSA and ECC: Integer Factorization and ECDLP

Hard problems can be solved by Shor’s algorithm

Lattice-based Cryptography: Hard for quantum computers

Ring-LWE Encryption schemes: proposed [EUROCRYPT’10]→ optimized [CHES’14] (reducing the polynomial arithmetic)

4 / 60

Page 5: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Lattice-based Cryptography

RSA and ECC: Integer Factorization and ECDLP

Hard problems can be solved by Shor’s algorithm

Lattice-based Cryptography: Hard for quantum computers

Ring-LWE Encryption schemes: proposed [EUROCRYPT’10]→ optimized [CHES’14] (reducing the polynomial arithmetic)

4 / 60

Page 6: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Implementation Platform

8-bit XMEGA128 MicrocontrollerWireless Sensor Networks; Internet of ThingsOperating Frequency: 32 MHz128KB Flash, 8KB RAM, 32 registersCore instruction: 8-bit mul/add (2/1 cycles)AES/DES Crypto Engine (for PRNG)

5 / 60

Page 7: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Previous Works

Hardware Implementations

Gottert et al. [CHES’12]: First hardware of Ring-LWE

Poppelmann et al. [Latincrypt’12] → Roy et al. [CHES’14]

Software Implementations on Embedded Processors

32-bit ARM processor:Oder et al. [DATE’14]: BLISS→ Boorghany et al. [ACM TEC’15]: NTRU, Ring-LWE→ De Clercq et al. [DATE’15]: Ring-LWE

8-bit AVR processor:Boorghany et al. [ACM TEC’15]: NTRU, Ring-LWE→ Poppelmann et al. [Latincrypt’15]: BLISS→ This work [CHES’15]: Ring-LWE

6 / 60

Page 8: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Previous Works

Hardware Implementations

Gottert et al. [CHES’12]: First hardware of Ring-LWE

Poppelmann et al. [Latincrypt’12] → Roy et al. [CHES’14]

Software Implementations on Embedded Processors

32-bit ARM processor:Oder et al. [DATE’14]: BLISS→ Boorghany et al. [ACM TEC’15]: NTRU, Ring-LWE→ De Clercq et al. [DATE’15]: Ring-LWE

8-bit AVR processor:Boorghany et al. [ACM TEC’15]: NTRU, Ring-LWE→ Poppelmann et al. [Latincrypt’15]: BLISS

→ This work [CHES’15]: Ring-LWE

6 / 60

Page 9: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Previous Works

Hardware Implementations

Gottert et al. [CHES’12]: First hardware of Ring-LWE

Poppelmann et al. [Latincrypt’12] → Roy et al. [CHES’14]

Software Implementations on Embedded Processors

32-bit ARM processor:Oder et al. [DATE’14]: BLISS→ Boorghany et al. [ACM TEC’15]: NTRU, Ring-LWE→ De Clercq et al. [DATE’15]: Ring-LWE

8-bit AVR processor:Boorghany et al. [ACM TEC’15]: NTRU, Ring-LWE→ Poppelmann et al. [Latincrypt’15]: BLISS→ This work [CHES’15]: Ring-LWE

6 / 60

Page 10: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Motivation & Contributions

Motivation

Few 8-bit AVR implementation“Cryptosystem of the Future” for “Internet of the Future”

Contributions: Efficient implementation of Ring-LWE

Fast NTT computation: “MOV-and-ADD” + “SAMS2”Reducing the RAM consumption for coefficientEfficient techniques for Knuth-Yao sampler: “Byte-Scanning”

7 / 60

Page 11: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Motivation & Contributions

Motivation

Few 8-bit AVR implementation“Cryptosystem of the Future” for “Internet of the Future”

Contributions: Efficient implementation of Ring-LWE

Fast NTT computation: “MOV-and-ADD” + “SAMS2”Reducing the RAM consumption for coefficientEfficient techniques for Knuth-Yao sampler: “Byte-Scanning”

7 / 60

Page 12: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Outline

...1 Short Overview

...2 Ring-LWE Encryption Scheme

...3 Our ImplementationOptimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

...4 Implementation ResultsComparison with Related Work

...5 Conclusion

8 / 60

Page 13: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Ring-LWE Encryption Scheme

Key generation stage: Gen(a)Two error polynomials r1, r2 ∈ Rq from the discrete Gaussiandistribution Xσ by the Knuth-Yao sampler twice:

r1 = NTT(r1), r2 = NTT(r2), p = r1 − a · r2 ∈ Rq

Public key (a, p), Private key (r2) are obtained

9 / 60

Page 14: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Ring-LWE Encryption Scheme

Encryption stage: Enc(a, p, M)Message M ∈ {0, 1}n is encoded into a polynomial in the ring;Three error polynomials e1, e2, e3 ∈ Rq are sampled

(C1, C2) = (a · e1 + e2, p · e1 +NTT(e3 +M ′))

Decryption stage: Dec(C1, C2, r2)Inverse NTT has to be performed to recover M ′:

M ′ = INTT(r2 · C1 + C2)

and a decoder is to recover the original message M from M ′

10 / 60

Page 15: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Ring-LWE Encryption Scheme

Encryption stage: Enc(a, p, M)Message M ∈ {0, 1}n is encoded into a polynomial in the ring;Three error polynomials e1, e2, e3 ∈ Rq are sampled

(C1, C2) = (a · e1 + e2, p · e1 +NTT(e3 +M ′))

Decryption stage: Dec(C1, C2, r2)Inverse NTT has to be performed to recover M ′:

M ′ = INTT(r2 · C1 + C2)

and a decoder is to recover the original message M from M ′

10 / 60

Page 16: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Ring-LWE Encryption Scheme

Number Theoretic TransformPolynomial multiplication a(x) =

∑n−1i=0 aix

i ∈ Zq in the n-throots of unity ωi

n

Algorithm 1: Iterative Number Theoretic Transform

Require: Polynomial a(x), n-th root of unity ωEnsure: Polynomial a(x) = NTT(a)1: a← BitReverse(a)

2: for i from 2 by 2i to n do

3: ωi ← ωn/in , ω ← 1

4: for j from 0 by 1 to i/2− 1 do

5: for k from 0 by i to n − 1 do

6: 1⃝ U ← a[k + j ], 2⃝ V ← ω · a[k + j + i/2]7: 3⃝ a[k + j ]← U + V , 4⃝ a[k + j + i/2]← U − V8: end for9: ω ← ω · ωi

10: end for11: end for12: return a

11 / 60

Page 17: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Ring-LWE Encryption Scheme

Gaussian SamplerRandom walk by Discrete Distribution Generating tree

Algorithm 2: Low-level implementation of Knuth-Yao sampling

Require: Probability matrix Pmat , random number r , modulus qEnsure: Sample value s1: d ← 02: for col from 0 by 1 to MAXCOL do

3: d ← 2d + (r&1); r ← r ≫ 1

4: for row from MAXROW by −1 to 0 do

5: d ← d − Pmat [row ][col ]6: if d = −1 then7: if (r&1) = 1 then

8: return q − row

9: else10: return row11: end if12: end if13: end for14: end for15: return 0

12 / 60

Page 18: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Outline

...1 Short Overview

...2 Ring-LWE Encryption Scheme

...3 Our ImplementationOptimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

...4 Implementation ResultsComparison with Related Work

...5 Conclusion

13 / 60

Page 19: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Outline

...1 Short Overview

...2 Ring-LWE Encryption Scheme

...3 Our ImplementationOptimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

...4 Implementation ResultsComparison with Related Work

...5 Conclusion

14 / 60

Page 20: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Parameter Selection (n, q, σ) for Ring-LWE

128-bit security level: (256, 7681, 11.31/√2π)

256-bit security level: (512, 12289, 12.18/√2π)

Discrete Gaussian sampler: 12σ

LUT based Twiddle Factor: ωn and ω · ωi [LATINCRYPT’12]

Negative wrapped convolution: Reduce coefficient [CHES’14]

Changing of the j and k-loops in the NTT [HOST’13]

Merging of the scaling operation by n−1 in INTT [CHES’14]

15 / 60

Page 21: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Parameter Selection (n, q, σ) for Ring-LWE

128-bit security level: (256, 7681, 11.31/√2π)

256-bit security level: (512, 12289, 12.18/√2π)

Discrete Gaussian sampler: 12σ

LUT based Twiddle Factor: ωn and ω · ωi [LATINCRYPT’12]

Negative wrapped convolution: Reduce coefficient [CHES’14]

Changing of the j and k-loops in the NTT [HOST’13]

Merging of the scaling operation by n−1 in INTT [CHES’14]

15 / 60

Page 22: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Parameter Selection (n, q, σ) for Ring-LWE

128-bit security level: (256, 7681, 11.31/√2π)

256-bit security level: (512, 12289, 12.18/√2π)

Discrete Gaussian sampler: 12σ

LUT based Twiddle Factor: ωn and ω · ωi [LATINCRYPT’12]

Negative wrapped convolution: Reduce coefficient [CHES’14]

Changing of the j and k-loops in the NTT [HOST’13]

Merging of the scaling operation by n−1 in INTT [CHES’14]

15 / 60

Page 23: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Parameter Selection (n, q, σ) for Ring-LWE

128-bit security level: (256, 7681, 11.31/√2π)

256-bit security level: (512, 12289, 12.18/√2π)

Discrete Gaussian sampler: 12σ

LUT based Twiddle Factor: ωn and ω · ωi [LATINCRYPT’12]

Negative wrapped convolution: Reduce coefficient [CHES’14]

Changing of the j and k-loops in the NTT [HOST’13]

Merging of the scaling operation by n−1 in INTT [CHES’14]

15 / 60

Page 24: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Parameter Selection (n, q, σ) for Ring-LWE

128-bit security level: (256, 7681, 11.31/√2π)

256-bit security level: (512, 12289, 12.18/√2π)

Discrete Gaussian sampler: 12σ

LUT based Twiddle Factor: ωn and ω · ωi [LATINCRYPT’12]

Negative wrapped convolution: Reduce coefficient [CHES’14]

Changing of the j and k-loops in the NTT [HOST’13]

Merging of the scaling operation by n−1 in INTT [CHES’14]

15 / 60

Page 25: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

MOV-and-ADD Coefficient Multiplication (Step1): 1 mul, 1 movw

aLaH

bLbH

aL × bL

r0r1

16 / 60

Page 26: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

MOV-and-ADD Coefficient Multiplication (Step2): 1 mul, 1 movw

aLaH

bLbH

aL × bL

aH × bH

r0r1r2r3

17 / 60

Page 27: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

MOV-and-ADD Coefficient Multiplication (Step3): 1 mul, 3 add

aLaH

bLbH

aL × bL

aH × bH

aH × bL

r0r1r2r3

18 / 60

Page 28: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

MOV-and-ADD Coefficient Multiplication (Step4): 1 mul, 3 add

aLaH

bLbH

aL × bL

aH × bH

aH × bL

aL × bH

r0r1r2r3

19 / 60

Page 29: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

MOV-and-ADD Coefficient Multiplication(Total): 4 mul, 2 movw, 6 add instructions (16 cycles)

aLaH

bLbH

aL × bL

aH × bH

aH × bL

aL × bH

r0r1r2r3

20 / 60

Page 30: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Approximation based reduction [ACM TEC’15]

Position of 1’s in (2w × 1/q) → p1, ..., pl

⌊z/q⌋ ∼=∑l

i=1(z ≫ (w − pi ))

z mod q ∼= z − q × ⌊z/q⌋⌊z/7681⌋ ∼= (z ≫ 13) + (z ≫ 17) + (z ≫ 21)

21 / 60

Page 31: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Approximation based reduction [ACM TEC’15]

Position of 1’s in (2w × 1/q) → p1, ..., pl

⌊z/q⌋ ∼=∑l

i=1(z ≫ (w − pi ))

z mod q ∼= z − q × ⌊z/q⌋⌊z/7681⌋ ∼= (z ≫ 13) + (z ≫ 17) + (z ≫ 21)

21 / 60

Page 32: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Approximation based reduction [ACM TEC’15]

Position of 1’s in (2w × 1/q) → p1, ..., pl

⌊z/q⌋ ∼=∑l

i=1(z ≫ (w − pi ))

z mod q ∼= z − q × ⌊z/q⌋⌊z/7681⌋ ∼= (z ≫ 13) + (z ≫ 17) + (z ≫ 21)

21 / 60

Page 33: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Approximation based reduction [ACM TEC’15]

Position of 1’s in (2w × 1/q) → p1, ..., pl

⌊z/q⌋ ∼=∑l

i=1(z ≫ (w − pi ))

z mod q ∼= z − q × ⌊z/q⌋

⌊z/7681⌋ ∼= (z ≫ 13) + (z ≫ 17) + (z ≫ 21)

21 / 60

Page 34: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Approximation based reduction [ACM TEC’15]

Position of 1’s in (2w × 1/q) → p1, ..., pl

⌊z/q⌋ ∼=∑l

i=1(z ≫ (w − pi ))

z mod q ∼= z − q × ⌊z/q⌋⌊z/7681⌋ ∼= (z ≫ 13) + (z ≫ 17) + (z ≫ 21)

21 / 60

Page 35: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

SAMS2 (Step1-1): shifting (z ≫ 17)

(s1, s0)

r0r1r2r3

(r3,r2,r1) » 1

22 / 60

Page 36: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

SAMS2 (Step1-2): shifting (z ≫ 13)

(s1, s0)

(t1, t0)

r0r1r2r3

(r3,r2,r1) » 1

(s1,s0,sx) » 4

23 / 60

Page 37: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

SAMS2 (Step1-3): shifting (z ≫ 21)

(s1, s0)

(t1, t0)

u0

r0r1r2r3

(r3,r2,r1) » 1

(s1,s0,sx) » 4

24 / 60

Page 38: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

SAMS2 (Step2): addition (z ≫ 13) + (z ≫ 17) + (z ≫ 21)

(s1, s0)

(t1, t0)

u0

(s1, s0) + (t1, t0) + u0

r0r1r2r3

(r3,r2,r1) » 1

(s1,s0,sx) » 4

25 / 60

Page 39: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

SAMS2 (Step3): multiplication

(s1, s0)

(t1, t0)

u0

(s1, s0) + (t1, t0) + u0

0x1e

0x1e × [(s1, s0) + (t1, t0) + u0]

r0r1r2r3

(r3,r2,r1) » 1

(s1,s0,sx) » 4

26 / 60

Page 40: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

SAMS2 method, 1⃝: shifting; 2⃝: addition; 3⃝: multiplication

12

3

(s1, s0)

(t1, t0)

u0

(s1, s0) + (t1, t0) + u0

0x1e

0x1e × [(s1, s0) + (t1, t0) + u0]

r0r1r2r3

(r3,r2,r1) » 1

(s1,s0,sx) » 4

27 / 60

Page 41: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Incomplete modular arithmetic

Complete: s = a+ b mod qIncomplete: s = a+ b mod 2m where m = ⌈log2 q⌉

Taking q = 7681 as an example

Perform a normal coefficient additionCompare the results with 213

Conduct a subtraction of q where r > 213

The operands are kept in [0, 213 − 1]In the last iteration, the result back into the range [0, q − 1]

28 / 60

Page 42: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Incomplete modular arithmetic

Complete: s = a+ b mod q

Incomplete: s = a+ b mod 2m where m = ⌈log2 q⌉

Taking q = 7681 as an example

Perform a normal coefficient additionCompare the results with 213

Conduct a subtraction of q where r > 213

The operands are kept in [0, 213 − 1]In the last iteration, the result back into the range [0, q − 1]

28 / 60

Page 43: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Incomplete modular arithmetic

Complete: s = a+ b mod qIncomplete: s = a+ b mod 2m where m = ⌈log2 q⌉

Taking q = 7681 as an example

Perform a normal coefficient additionCompare the results with 213

Conduct a subtraction of q where r > 213

The operands are kept in [0, 213 − 1]In the last iteration, the result back into the range [0, q − 1]

28 / 60

Page 44: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Incomplete modular arithmetic

Complete: s = a+ b mod qIncomplete: s = a+ b mod 2m where m = ⌈log2 q⌉

Taking q = 7681 as an example

Perform a normal coefficient additionCompare the results with 213

Conduct a subtraction of q where r > 213

The operands are kept in [0, 213 − 1]In the last iteration, the result back into the range [0, q − 1]

28 / 60

Page 45: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Incomplete modular arithmetic

Complete: s = a+ b mod qIncomplete: s = a+ b mod 2m where m = ⌈log2 q⌉

Taking q = 7681 as an example

Perform a normal coefficient addition

Compare the results with 213

Conduct a subtraction of q where r > 213

The operands are kept in [0, 213 − 1]In the last iteration, the result back into the range [0, q − 1]

28 / 60

Page 46: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Incomplete modular arithmetic

Complete: s = a+ b mod qIncomplete: s = a+ b mod 2m where m = ⌈log2 q⌉

Taking q = 7681 as an example

Perform a normal coefficient additionCompare the results with 213

Conduct a subtraction of q where r > 213

The operands are kept in [0, 213 − 1]In the last iteration, the result back into the range [0, q − 1]

28 / 60

Page 47: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Incomplete modular arithmetic

Complete: s = a+ b mod qIncomplete: s = a+ b mod 2m where m = ⌈log2 q⌉

Taking q = 7681 as an example

Perform a normal coefficient additionCompare the results with 213

Conduct a subtraction of q where r > 213

The operands are kept in [0, 213 − 1]In the last iteration, the result back into the range [0, q − 1]

28 / 60

Page 48: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Incomplete modular arithmetic

Complete: s = a+ b mod qIncomplete: s = a+ b mod 2m where m = ⌈log2 q⌉

Taking q = 7681 as an example

Perform a normal coefficient additionCompare the results with 213

Conduct a subtraction of q where r > 213

The operands are kept in [0, 213 − 1]

In the last iteration, the result back into the range [0, q − 1]

28 / 60

Page 49: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Incomplete modular arithmetic

Complete: s = a+ b mod qIncomplete: s = a+ b mod 2m where m = ⌈log2 q⌉

Taking q = 7681 as an example

Perform a normal coefficient additionCompare the results with 213

Conduct a subtraction of q where r > 213

The operands are kept in [0, 213 − 1]In the last iteration, the result back into the range [0, q − 1]

28 / 60

Page 50: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Reducing the RAM for coefficients (Step 1): Initialized registers

29 / 60

Page 51: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 2): 13-bit coefficient (a0) is stored

a0

30 / 60

Page 52: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 3): Other coefficients (a1∼12) are stored

a12a11a10a9a8a7a6a5a4a3a2a1a0

31 / 60

Page 53: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 4): Coefficient (a13) is stored

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13

32 / 60

Page 54: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 5): Remaining coefficients (a14∼15) are stored

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13 a14 a15

33 / 60

Page 55: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Updating coefficient (a12)

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13 a14 a15

34 / 60

Page 56: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 1): Clear the lower 13-bit

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13 a14 a15

35 / 60

Page 57: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 2): Add with target register

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13 a14 a15

36 / 60

Page 58: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Updating coefficient (a13)

37 / 60

Page 59: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 1): Divide the coefficient into 5 limbs

38 / 60

Page 60: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 2): Shift the coefficient

» 13

» 10

» 7

» 4

» 1

39 / 60

Page 61: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 3): Select the memory

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13 a14 a15

40 / 60

Page 62: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 4): Clear the 14th bit

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13 a14 a15

41 / 60

Page 63: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 5): Add with target register

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13 a14 a15

42 / 60

Page 64: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 6): Select the memory

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13 a14 a15

43 / 60

Page 65: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 7): Clear the higher 3-bit

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13 a14 a15

44 / 60

Page 66: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

(Step 8): Add with target register

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13 a14 a15

45 / 60

Page 67: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization Techniques for NTT Computation

Optimized Storages: 16 13-bit elements in 26 bytes

a12a11a10a9a8a7a6a5a4a3a2a1a0

a13 a14 a15

46 / 60

Page 68: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Outline

...1 Short Overview

...2 Ring-LWE Encryption Scheme

...3 Our ImplementationOptimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

...4 Implementation ResultsComparison with Related Work

...5 Conclusion

47 / 60

Page 69: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization of the Knuth-Yao Sampler

Algorithm 3: Bit Scanning1: for row from MAXROW by −1 to 0 do

2: d ← d − Pmat [row ][col ] {Bit wise computations}3: . . . omit . . .4: end for

Algorithm 4: Byte Scanning1: for row from MAXROW by −8 to 0 do

2: if (Pmat [row ][col ] ∥ . . . ∥Pmat [row − 7][col ]) > 0 then

3: sum =∑row−7

i=row (Pmat [i ][col ])4: d ← d − sum {Byte wise computations}5: . . . omit . . .

6: end if7: end for

Byte scanning saves 7 branch operations at the expense of 1 sub

48 / 60

Page 70: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization of the Knuth-Yao Sampler

Comparison between BitScanning and ByteScanning

Bit Scanning Byte Scanning

49 / 60

Page 71: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization of the Knuth-Yao Sampler

(Step 1):BitScanning (1-bit), ByteScanning (1-byte)

Bit Scanning Byte Scanning

50 / 60

Page 72: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization of the Knuth-Yao Sampler

(Step 2):BitScanning (2-bit), ByteScanning (2-byte)

Bit Scanning Byte Scanning

51 / 60

Page 73: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization of the Knuth-Yao Sampler

Pseudo Random Number Generation

AES block cipher with counter modeATxmega128A1 supports AES engine (375 cycles)SW requires 1.9K cycles and 2KB ROM

Parallel Computations

AES engine and processor are executed simultaneouslyPRNG and KY sampling in same time

52 / 60

Page 74: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization of the Knuth-Yao Sampler

Pseudo Random Number Generation

AES block cipher with counter mode

ATxmega128A1 supports AES engine (375 cycles)SW requires 1.9K cycles and 2KB ROM

Parallel Computations

AES engine and processor are executed simultaneouslyPRNG and KY sampling in same time

52 / 60

Page 75: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization of the Knuth-Yao Sampler

Pseudo Random Number Generation

AES block cipher with counter modeATxmega128A1 supports AES engine (375 cycles)

SW requires 1.9K cycles and 2KB ROM

Parallel Computations

AES engine and processor are executed simultaneouslyPRNG and KY sampling in same time

52 / 60

Page 76: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization of the Knuth-Yao Sampler

Pseudo Random Number Generation

AES block cipher with counter modeATxmega128A1 supports AES engine (375 cycles)SW requires 1.9K cycles and 2KB ROM

Parallel Computations

AES engine and processor are executed simultaneouslyPRNG and KY sampling in same time

52 / 60

Page 77: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization of the Knuth-Yao Sampler

Pseudo Random Number Generation

AES block cipher with counter modeATxmega128A1 supports AES engine (375 cycles)SW requires 1.9K cycles and 2KB ROM

Parallel Computations

AES engine and processor are executed simultaneouslyPRNG and KY sampling in same time

52 / 60

Page 78: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization of the Knuth-Yao Sampler

Pseudo Random Number Generation

AES block cipher with counter modeATxmega128A1 supports AES engine (375 cycles)SW requires 1.9K cycles and 2KB ROM

Parallel Computations

AES engine and processor are executed simultaneously

PRNG and KY sampling in same time

52 / 60

Page 79: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Optimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

.. Optimization of the Knuth-Yao Sampler

Pseudo Random Number Generation

AES block cipher with counter modeATxmega128A1 supports AES engine (375 cycles)SW requires 1.9K cycles and 2KB ROM

Parallel Computations

AES engine and processor are executed simultaneouslyPRNG and KY sampling in same time

52 / 60

Page 80: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Outline

...1 Short Overview

...2 Ring-LWE Encryption Scheme

...3 Our ImplementationOptimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

...4 Implementation ResultsComparison with Related Work

...5 Conclusion

53 / 60

Page 81: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Performance Evaluation

0

500000

1000000

1500000

2000000

2500000

3000000

3500000

4000000

4500000

Key_Gen Enc Dec

Execution time (in clock cycles)

HS-256 ME-256 HS-512 ME-512

High speed (HS) is 2.3x faster than memory efficient (ME)

ME version requires sophisticated memory alignments

54 / 60

Page 82: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Performance Evaluation

0

500000

1000000

1500000

2000000

2500000

3000000

3500000

4000000

4500000

Key_Gen Enc Dec

Execution time (in clock cycles)

HS-256 ME-256 HS-512 ME-512

High speed (HS) is 2.3x faster than memory efficient (ME)

ME version requires sophisticated memory alignments

54 / 60

Page 83: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Performance Evaluation

0

500000

1000000

1500000

2000000

2500000

3000000

3500000

4000000

4500000

Key_Gen Enc Dec

Execution time (in clock cycles)

HS-256 ME-256 HS-512 ME-512

High speed (HS) is 2.3x faster than memory efficient (ME)

ME version requires sophisticated memory alignments

54 / 60

Page 84: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Memory Evaluation

0

1000

2000

3000

4000

5000

6000

7000

Key_Gen Enc Dec Total

RAM requirements (in bytes)

HS-256 ME-256 HS-512 ME-512

Compared to HS, ME version reduces the RAM by 21 %

HS and ME consume the 8K RAM by 77 % and 56 %

55 / 60

Page 85: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Memory Evaluation

0

1000

2000

3000

4000

5000

6000

7000

Key_Gen Enc Dec Total

RAM requirements (in bytes)

HS-256 ME-256 HS-512 ME-512

Compared to HS, ME version reduces the RAM by 21 %

HS and ME consume the 8K RAM by 77 % and 56 %

55 / 60

Page 86: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Memory Evaluation

0

1000

2000

3000

4000

5000

6000

7000

Key_Gen Enc Dec Total

RAM requirements (in bytes)

HS-256 ME-256 HS-512 ME-512

Compared to HS, ME version reduces the RAM by 21 %

HS and ME consume the 8K RAM by 77 % and 56 %

55 / 60

Page 87: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Outline

...1 Short Overview

...2 Ring-LWE Encryption Scheme

...3 Our ImplementationOptimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

...4 Implementation ResultsComparison with Related Work

...5 Conclusion

56 / 60

Page 88: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Comparison with Related Work

Implementation Key-Gen Enc Dec

Boorghany (256) 2,770K 3,042K 1,368K

Poppelmann (256) n/a 1,314K 381K

This work (HS-256) 589K 671K 275K

Poppelmann (512) n/a 3,279K 1,019K

This work (HS-512) 2,165K 2,617K 686K

Boorghany et al.: 4.5x faster (ENC, 256)

Poppelmann et al.: 2x and 1.25x faster (ENC, 256/512)

57 / 60

Page 89: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Comparison with Related Work

Implementation Key-Gen Enc Dec

Boorghany (256) 2,770K 3,042K 1,368K

Poppelmann (256) n/a 1,314K 381K

This work (HS-256) 589K 671K 275K

Poppelmann (512) n/a 3,279K 1,019K

This work (HS-512) 2,165K 2,617K 686K

Boorghany et al.: 4.5x faster (ENC, 256)

Poppelmann et al.: 2x and 1.25x faster (ENC, 256/512)

57 / 60

Page 90: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Comparison with Related Work

Implementation Key-Gen Enc Dec

Boorghany (256) 2,770K 3,042K 1,368K

Poppelmann (256) n/a 1,314K 381K

This work (HS-256) 589K 671K 275K

Poppelmann (512) n/a 3,279K 1,019K

This work (HS-512) 2,165K 2,617K 686K

Boorghany et al.: 4.5x faster (ENC, 256)

Poppelmann et al.: 2x and 1.25x faster (ENC, 256/512)

57 / 60

Page 91: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Comparison with Related Work

Implementation Scheme Enc Dec

Liu et al. RSA-1024 n/a 75,680K

Dull et al. (HS) ECC-255 27,800K 13,900K

Dull et al. (ME) ECC-255 28,293K 14,146K

Aranha et al. ECC-233 11,796K 5,898K

This work (HS) LWE-256 671K 275K

This work (ME) LWE-256 1,532K 673K

RSA: 278x faster (DEC, 1024)

ECC: 41x faster (ENC, 255)

58 / 60

Page 92: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Comparison with Related Work

Implementation Scheme Enc Dec

Liu et al. RSA-1024 n/a 75,680K

Dull et al. (HS) ECC-255 27,800K 13,900K

Dull et al. (ME) ECC-255 28,293K 14,146K

Aranha et al. ECC-233 11,796K 5,898K

This work (HS) LWE-256 671K 275K

This work (ME) LWE-256 1,532K 673K

RSA: 278x faster (DEC, 1024)

ECC: 41x faster (ENC, 255)

58 / 60

Page 93: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

Comparison with Related Work

.. Comparison with Related Work

Implementation Scheme Enc Dec

Liu et al. RSA-1024 n/a 75,680K

Dull et al. (HS) ECC-255 27,800K 13,900K

Dull et al. (ME) ECC-255 28,293K 14,146K

Aranha et al. ECC-233 11,796K 5,898K

This work (HS) LWE-256 671K 275K

This work (ME) LWE-256 1,532K 673K

RSA: 278x faster (DEC, 1024)

ECC: 41x faster (ENC, 255)

58 / 60

Page 94: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Outline

...1 Short Overview

...2 Ring-LWE Encryption Scheme

...3 Our ImplementationOptimization Techniques for NTT ComputationOptimization of the Knuth-Yao Sampler

...4 Implementation ResultsComparison with Related Work

...5 Conclusion

59 / 60

Page 95: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Conclusion

Compact Ring-LWE encryption for 8-bit platform

Fast NTT computation: “MOV-and-ADD” + “SAMS2”Reducing the RAM consumption for coefficientEfficient techniques for Knuth-Yao sampler: “Byte-Scanning”

Faster than RSA (278x) and ECC (41x)

More information:

Software is available (contacting the authors)

Thank you for your attention

60 / 60

Page 96: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Conclusion

Compact Ring-LWE encryption for 8-bit platform

Fast NTT computation: “MOV-and-ADD” + “SAMS2”

Reducing the RAM consumption for coefficientEfficient techniques for Knuth-Yao sampler: “Byte-Scanning”

Faster than RSA (278x) and ECC (41x)

More information:

Software is available (contacting the authors)

Thank you for your attention

60 / 60

Page 97: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Conclusion

Compact Ring-LWE encryption for 8-bit platform

Fast NTT computation: “MOV-and-ADD” + “SAMS2”Reducing the RAM consumption for coefficient

Efficient techniques for Knuth-Yao sampler: “Byte-Scanning”

Faster than RSA (278x) and ECC (41x)

More information:

Software is available (contacting the authors)

Thank you for your attention

60 / 60

Page 98: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Conclusion

Compact Ring-LWE encryption for 8-bit platform

Fast NTT computation: “MOV-and-ADD” + “SAMS2”Reducing the RAM consumption for coefficientEfficient techniques for Knuth-Yao sampler: “Byte-Scanning”

Faster than RSA (278x) and ECC (41x)

More information:

Software is available (contacting the authors)

Thank you for your attention

60 / 60

Page 99: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Conclusion

Compact Ring-LWE encryption for 8-bit platform

Fast NTT computation: “MOV-and-ADD” + “SAMS2”Reducing the RAM consumption for coefficientEfficient techniques for Knuth-Yao sampler: “Byte-Scanning”

Faster than RSA (278x) and ECC (41x)

More information:

Software is available (contacting the authors)

Thank you for your attention

60 / 60

Page 100: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Conclusion

Compact Ring-LWE encryption for 8-bit platform

Fast NTT computation: “MOV-and-ADD” + “SAMS2”Reducing the RAM consumption for coefficientEfficient techniques for Knuth-Yao sampler: “Byte-Scanning”

Faster than RSA (278x) and ECC (41x)

More information:

Software is available (contacting the authors)

Thank you for your attention

60 / 60

Page 101: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Conclusion

Compact Ring-LWE encryption for 8-bit platform

Fast NTT computation: “MOV-and-ADD” + “SAMS2”Reducing the RAM consumption for coefficientEfficient techniques for Knuth-Yao sampler: “Byte-Scanning”

Faster than RSA (278x) and ECC (41x)

More information:

Software is available (contacting the authors)

Thank you for your attention

60 / 60

Page 102: ffi Ring-LWE Encryption on 8-bit AVR Processors...Short Overview Ring-LWE Encryption Scheme Our Implementation Implementation Results Conclusion.. ffi Ring-LWE Encryption on 8-bit

..........

.....

.....................................................................

.....

......

.....

.....

.

Short OverviewRing-LWE Encryption Scheme

Our ImplementationImplementation Results

Conclusion

.. Conclusion

Compact Ring-LWE encryption for 8-bit platform

Fast NTT computation: “MOV-and-ADD” + “SAMS2”Reducing the RAM consumption for coefficientEfficient techniques for Knuth-Yao sampler: “Byte-Scanning”

Faster than RSA (278x) and ECC (41x)

More information:

Software is available (contacting the authors)

Thank you for your attention

60 / 60