SABER: Module-LWR based KEM Round 2 J. P. DAnvers A. Karmakar S. - - PowerPoint PPT Presentation

saber module lwr based kem
SMART_READER_LITE
LIVE PREVIEW

SABER: Module-LWR based KEM Round 2 J. P. DAnvers A. Karmakar S. - - PowerPoint PPT Presentation

SABER: Module-LWR based KEM Round 2 J. P. DAnvers A. Karmakar S. S. Roy F. Vercauteren KU Leuven August 22, 2019 0 Outline 1 Introduction 2 Round 2 changes 3 Implementations 4 Conclusion 1 SABER 1 Outline 1 Introduction 2 Round 2


slide-1
SLIDE 1

Round 2

SABER: Module-LWR based KEM

  • J. P. D’Anvers
  • A. Karmakar
  • S. S. Roy
  • F. Vercauteren

KU Leuven August 22, 2019

slide-2
SLIDE 2

Outline

1 Introduction 2 Round 2 changes 3 Implementations 4 Conclusion

1 SABER

slide-3
SLIDE 3

1 Outline

1 Introduction 2 Round 2 changes 3 Implementations 4 Conclusion

2 SABER

slide-4
SLIDE 4

1 General LWE based scheme

Alice Bob A A A ← U(Zl×l

q

) s s s,e e e ← small(Zl×1

q

) b b b = A A A · s s s + e e e b b b,A A A ✲ s s s′,e e e′,e e e′′ ← small(Z1×l

q

) b b b′T = A A AT · s s s′ + e e e′ v = b b b′ · s s s ✛ b b b′, v′ v′T = b b bT · s s s′ + e e e′′ + q

2m

m′ = ⌊ 2

q(v′ − v)⌉

3 SABER

slide-5
SLIDE 5

1 SABER

◮ Module:

  • Polynomial ring Rq = Zq[X]/(X256 + 1) with q = 213
  • Rank of module 2, 3, 4 depending on security level

⊕ Flexibility: only one polynomial multiplication

4 SABER

slide-6
SLIDE 6

1 SABER

Alice Bob A A A ← U(Rl×l

q

) s s s,e e e ← small(Rl×1

q

) b b b = A A A · s s s + e e e b b b,A A A ✲ s s s′,e e e′,e e e′′ ← small(R1×l

q

) b b b′T = A A AT · s s s′ + e e e′ v = b b b′ · s s s ✛ b b b′, v′ v′T = b b bT · s s s′ + e e e′′ + q

2m

m′ = ⌊ 2

q(v′ − v)⌉

5 SABER

slide-7
SLIDE 7

1 Module-LWR: SABER

◮ Module:

  • Polynomial ring Rq = Zq[X]/(X256 + 1) with q = 213
  • Rank of module 2, 3, 4 depending on security level

⊕ Flexibility: only one polynomial multiplication

◮ Learning with Rounding

⊕ No generation of e e e,e e e′,e e e′′ ⊕ Efficient bandwidth usage

6 SABER

slide-8
SLIDE 8

1 SABER

Alice Bob A A A ← U(Rl×l

q

) s s s ← small(Rl×1

q

) b b b = ⌊ p

qA

A A · s s s⌉ b b b,A A A ✲ s s s′ ← small(R1×l

q

) b b b′T = ⌊ p

qA

A AT · s s s′⌉ v = b b b′ · s s s ✛ b b b′, v′ v′T = ⌊ T

p b

b bT · s s s′ + T

2 m⌉

m′ = ⌊ 2

q(v′ − p T v)⌉

7 SABER

slide-9
SLIDE 9

1 Module-LWR: SABER

◮ Module:

  • Polynomial ring Rq = Zq[X]/(X256 + 1) with q = 213
  • Rank of module 2, 3, 4 depending on security level

⊕ Flexibility: only one polynomial multiplication

◮ Learning with Rounding

⊕ no generation of e e e,e e e′,e e e′′ ⊕ efficient bandwidth usage

◮ power-of-two

⊕ easy sampling ⊕ no modular arithmetic ⊕ easy rounding = add constant and chop ⊖ no NTT for fast multiplication ⊕ Toom-Cook ⊕ easier masking

8 SABER

slide-10
SLIDE 10

1 SABER

Alice Bob A A A ← U(Rl×l

q

) s s s ← small(Rl×1

q

) b b b = (A A A · s s s + h h h) ≫ log2( q

p)

b b b,A A A

s s s′ ← small(R1×l

q

) b b b′T = (A A AT · s s s′ + h h h) ≫ log2( q

p)

v = b b b′ · s s s

b b b′, v′ v′T = (b b bT · s s s′ + h1 + p

2m) ≫ log2( p T )

m′ = ⌊ 2

p(v′ − p T v)⌉

9 SABER

slide-11
SLIDE 11

1 SABER

◮ binomial secret distribution

⊕ easy sampling

10 SABER

slide-12
SLIDE 12

1 SABER

◮ binomial secret distribution

⊕ easy sampling

◮ No error correcting code

⊕ simpler implementation ⊕ easier masking

10 SABER

slide-13
SLIDE 13

1 SABER - parameters

◮ Rq = Zq[X]/(X256 + 1) with q = 213 ◮ public key / ciphertext in Rp and RT with p = 210 and T = 24 ◮ Centered binomial distribution with 8 coins ([−4, 4]) 11 SABER

slide-14
SLIDE 14

1 SABER - parameters

◮ Rq = Zq[X]/(X256 + 1) with q = 213 ◮ public key / ciphertext in Rp and RT with p = 210 and T = 24 ◮ Centered binomial distribution with 8 coins ([−4, 4]) ◮ IND-CCA secure KEM version using FO-transformation 11 SABER

slide-15
SLIDE 15

1 SABER - parameters

◮ Rq = Zq[X]/(X256 + 1) with q = 213 ◮ public key / ciphertext in Rp and RT with p = 210 and T = 24 ◮ Centered binomial distribution with 8 coins ([−4, 4]) ◮ IND-CCA secure KEM version using FO-transformation ◮ Public Key: 992 Bytes ◮ Ciphertext: 1088 Bytes ◮ Failure probability: 2−136 ◮ Security: 185 bits 11 SABER

slide-16
SLIDE 16

1 SABER

Sec Cat fail prob Classical Quantum pk (B) sk (B) ciphertext (B) LightSaber-KEM: k = 2, n = 256, q = 213, p = 210, T = 23, µ = 10 1 2−120 126 115 672 1568 736 Saber-KEM: k = 3, n = 256, q = 213, p = 210, T = 24, µ = 8 3 2−136 199 181 992 2304 1088 FireSaber-KEM: k = 4, n = 256, q = 213, p = 210, T = 26, µ = 6 5 2−165 270 246 1312 3040 1472 Table: Security and correctness of Saber.KEM.

12 SABER

slide-17
SLIDE 17

2 Outline

1 Introduction 2 Round 2 changes 3 Implementations 4 Conclusion

13 SABER

slide-18
SLIDE 18

2 Changes for Round 2

◮ Generation of matrix A

A A

14 SABER

slide-19
SLIDE 19

2 Changes for Round 2

◮ Generation of matrix A

A A

  • multiplication with A

A A and A A AT

  • just-in-time possible for A

A A

  • speed-up preferred in encryption

14 SABER

slide-20
SLIDE 20

2 Serial vs parallel generation of A

◮ software

  • Keccak-Absorb() is more expensive than Keccak-Extract()
  • Hence, serial SHAKE is faster on non-vectorized microcontrollers
  • But, slower on Intel AVX

15 SABER

slide-21
SLIDE 21

2 Serial vs parallel generation of A

◮ software

  • Keccak-Absorb() is more expensive than Keccak-Extract()
  • Hence, serial SHAKE is faster on non-vectorized microcontrollers
  • But, slower on Intel AVX

◮ hardware

  • Keccak core consumes 33% of overall area [BPC19] (including

memory)

  • Keccak-Extract produces RND every 28 cycles
  • Polynomial multiplier consumes RND much slower than Keccak

can produce

  • Serial Keccak makes implementation simpler

15 SABER

slide-22
SLIDE 22

2 Changes for Round 2

◮ Generation of matrix A

A A

16 SABER

slide-23
SLIDE 23

2 Changes for Round 2

◮ Generation of matrix A

A A

◮ Rounding = add constant + chopping ◮ one of the constants changed for security proof 16 SABER

slide-24
SLIDE 24

2 Changes for Round 2

◮ Generation of matrix A

A A

◮ Rounding = add constant + chopping ◮ one of the constants changed for security proof ◮ (Debated) smaller secret variance ◮ e.g. trinary binomial distribution ◮ would reduce public key and ciphertext size with ±10% ◮ too aggressive 16 SABER

slide-25
SLIDE 25

3 Outline

1 Introduction 2 Round 2 changes 3 Implementations 4 Conclusion

17 SABER

slide-26
SLIDE 26

3 Software Implementations

◮ Haswell AVX2 (KU Leuven, Belgium [DKRV18])

  • IND-CCA encapsulation/decapsulation 122K, 120K cycles

18 SABER

slide-27
SLIDE 27

3 Software Implementations

◮ Haswell AVX2 (KU Leuven, Belgium [DKRV18])

  • IND-CCA encapsulation/decapsulation 122K, 120K cycles

◮ ARM Cortex-M (KU Leuven, Belgium [KMRV18])

  • Cortex-M4 (Speed)
  • encapsulation/decapsulation 1444 / 1543 K cycles
  • Cortex-M4 (Speed / Memory)
  • encapsulation/decapsulation 1530 / 1635 K cycles
  • encapsulation/decapsulation 7019 / 8115 bytes memory
  • Cortex-M0 (Memory)
  • encapsulation/decapsulation 6328 / 7509 K cycles
  • encapsulation/decapsulation 5119 / 6215 bytes memory

18 SABER

slide-28
SLIDE 28

3 Hardware Implementations I

◮ High-speed HW (University of Birmingham, UK)

  • Instruction-set coprocessor architecture with all SABER

components on HW

  • Generic HDL code: suitable for ASIC and FPGA implementation
  • IND-CPA encryption/decryption = 6/1.6 K cycles
  • IND-CCA encapsulation/decapsulation = ≈ 7/8.5 K cycles

19 SABER

slide-29
SLIDE 29

3 Hardware Implementations I

◮ High-speed HW (University of Birmingham, UK)

  • Instruction-set coprocessor architecture with all SABER

components on HW

  • Generic HDL code: suitable for ASIC and FPGA implementation
  • IND-CPA encryption/decryption = 6/1.6 K cycles
  • IND-CCA encapsulation/decapsulation = ≈ 7/8.5 K cycles

◮ Lightweight HW/SW codesign (KU Leuven, Belgium)

  • Encapsulation/decapsulation require ≈ 4.2 ms

19 SABER

slide-30
SLIDE 30

3 Hardware Implementations I

◮ High-speed HW (University of Birmingham, UK)

  • Instruction-set coprocessor architecture with all SABER

components on HW

  • Generic HDL code: suitable for ASIC and FPGA implementation
  • IND-CPA encryption/decryption = 6/1.6 K cycles
  • IND-CCA encapsulation/decapsulation = ≈ 7/8.5 K cycles

◮ Lightweight HW/SW codesign (KU Leuven, Belgium)

  • Encapsulation/decapsulation require ≈ 4.2 ms

◮ High-speed HW/SW codesign (George Mason University, USA /

Military University of Technology, Poland [HOKG18])

  • Encapsulation/decapsulation require ≈ 0.069 ms

19 SABER

slide-31
SLIDE 31

3 Hardware Implementations II

◮ ASIC implementation (Tsinghua University, China)

  • Still in development
  • Polynomial multiplication
  • Area: 220626 um2 (307193GE)
  • Max Freq: 400 MHz
  • Power: 4.34 mW

20 SABER

slide-32
SLIDE 32

3 Masking

◮ First order masking can be achieved by arithmetic masking in

polynomial multiplication and Boolean masking for decoding.

◮ Saber uses power-of-two modulus ◮ Thus masking methods can be combined by Debraize’s arithmetic

to boolean conversion [Deb12]

◮ Time with masking roughly doubles. 21 SABER

slide-33
SLIDE 33

4 Outline

1 Introduction 2 Round 2 changes 3 Implementations 4 Conclusion

22 SABER

slide-34
SLIDE 34

4 Conclusion

SABER is:

◮ Flexible 23 SABER

slide-35
SLIDE 35

4 Conclusion

SABER is:

◮ Flexible ◮ Simple 23 SABER

slide-36
SLIDE 36

4 Conclusion

SABER is:

◮ Flexible ◮ Simple ◮ Efficient 23 SABER

slide-37
SLIDE 37

4 Conclusion

SABER is:

◮ Flexible ◮ Simple ◮ Efficient ◮ More work in the pipeline 23 SABER

slide-38
SLIDE 38

4 References I

Utsav Banerjee, Abhishek Pathak, and Anantha P. Chandrakasan. An Energy-Efficient Configurable Lattice Cryptography Processor for the Quantum-Secure Internet of Things. In IEEE International Solid-State Circuits Conference, pages 46–48, 2019. Blandine Debraize. Efficient and provably secure methods for switching from arithmetic to boolean masking. In Cryptographic Hardware and Embedded Systems – CHES 2012, volume 7428 LNCS, 2012. Jan-Pieter D’Anvers, Angshuman Karmakar, Sujoy Sinha Roy, and Frederik Vercauteren. Saber: Module-LWR Based Key Exchange, CPA-Secure Encryption and CCA-Secure KEM. In AFRICACRYPT 2018, pages 282–305, 2018.

24 SABER

slide-39
SLIDE 39

4 References II

James Howe, Tobias Oder, Markus Krausz, and Tim G¨ uneysu. Standard Lattice-Based Key Encapsulation on Embedded Devices. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2018, 8 2018. Angshuman Karmakar, Jose Maria Bermudo Mera, Sujoy Sinha Roy, and Ingrid Verbauwhede. Saber on ARM: CCA-secure module lattice-based key encapsulation on ARM. IACR Transactions on Cryptographic Hardware and Embedded Systems, 2018, 8 2018.

25 SABER

slide-40
SLIDE 40

4 Questions?

26 SABER