Sapphire: A Configurable Crypto-Processor for Post-Quantum Lattice-based Protocols
Utsav Banerjee*, Tenzin S. Ukyab, Anantha P. Chandrakasan
*utsav@mit.edu
Massachusetts Institute of Technology
for Post-Quantum Lattice-based Protocols Utsav Banerjee * , Tenzin S. - - PowerPoint PPT Presentation
Sapphire: A Configurable Crypto-Processor for Post-Quantum Lattice-based Protocols Utsav Banerjee * , Tenzin S. Ukyab, Anantha P. Chandrakasan * utsav@mit.edu Massachusetts Institute of Technology Post-Quantum Cryptography Current public key
Utsav Banerjee*, Tenzin S. Ukyab, Anantha P. Chandrakasan
Massachusetts Institute of Technology
Post-Quantum Crypto RSA, ECC, …
▪ Lattice-based (9 KEM + 3 Sign) ▪ Code-based (7 KEM) ▪ Hash-based (1 Sign) ▪ Multivariate (4 Sign) ▪ Supersingular isogeny (1 KEM) ▪ Zero-knowledge proofs (1 Sign)
2 of 25
LWE (Standard Lattices)
? ? ? ? ? ? ? ?
Ring-LWE (Ideal Lattices)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ?
Module-LWE (Module Lattices)
3 of 25
4 of 25
5 of 25
Reduction with fully configurable modulus:
Modular Multiplier Arch #1
❑ configurable parameters 𝑛, 𝑙, 𝑟 ❑ 𝑛 and 𝑟 up to 24 bits ❑ 16 ≤ 𝑙 ≤ 48 ❑ requires 2 explicit multipliers for reduction
6 of 25
Reduction with pseudo-configurable modulus: ❑ choice of 𝑟 from a set of primes ❑ reduction coded in digital logic ❑ requires no explicit multiplier for reduction ❑ up to 6× more energy-efficient
Modular Multiplier Arch #2
Mult. Reduction Logic
7 of 25
8 of 25
MSB(addr) = 0 LSB(addr) = 0
Mem #0
MSB(addr) = 0 LSB(addr) = 1
Mem #1
MSB(addr) = 1 LSB(addr) = 0
Mem #2
MSB(addr) = 1 LSB(addr) = 1
Mem #3 9 of 25
[Pease, J. ACM, 1968]
10 of 25
11 of 25
12 of 25
seed uniformly random 232 Binomial & Gaussian Sampling 0 +𝜏 −𝜏 0 +𝜃 −𝜃 Uniform Sampling Rejection Sampling 232 q Trinary Sampling +1
CS-PRNG
13 of 25
Chip Micrograph
IF EX WB
CLK RST
32
32 KB IMEM 64 KB DMEM
Memory Mapped Interface
32 32
ALU RV32IM Sapphire Crypto LWE Mem SHA-3
1 KB IMEM
Sampler
ADDR DATA
Ctrl
Off-chip memory load Peripherals – GPIO, SPI, UART
14 of 25
CCA-KEM LWE Frodo Ring-LWE NewHope Module-LWE CRYSTALS-Kyber Signature Ring-LWE qTesla Module-LWE CRYSTALS-Dilithium
PKE / KEM:
Encoding / Compression CCA-KEM CPA-PKE
Sign:
Encoding / Compression Sign
RISC-V S/W with SHA-3 H/W Lattice-Crypto H/W
15 of 25
n = 256 32 polynomials n = 512 16 polynomials n = 1024 8 polynomials
CRYSTALS-Kyber CRYSTALS-Dilithium NewHope-512 qTesla-I NewHope-1024 qTesla-III
16 of 25
Frodo-640 Frodo-976 n = 128 / 512 / 1024 n = 1024
17 of 25
100 101 102 103 104 105 106 107 108 109
Cycles
14× 16× 11× 12× 14× 13× 11× 34× 52× 34× 12× 19× 22× 22×
* Cycle counts for CCA-KEM-Encaps and Sign
18 of 25
* Measured using test chip operating at 1.1 V and 72 MHz
Design Platform Tech (nm) VDD (V) Freq (MHz) Protocol Area (kGE) Cycles Energy (µJ) This work ASIC 40 1.1 72 NewHope-512-CCA-KEM-Encaps NewHope-1024-CPA-PKE-Encrypt Kyber-512-CCA-KEM-Encaps Kyber-768-CPA-PKE-Encrypt Kyber-768-CCA-KEM-Encaps Frodo-640-CCA-KEM-Encaps Dilithium-II-Sign 106 136,077 106,611 131,698 94,440 177,540 11,609,668 514,246 10.02 12.00 9.37 10.31 12.80 1129.95 54.82 Basu et al. [BSNK19] † ASIC 65 1.2 169 200 158 NewHope-512-CCA-KEM-Encaps Kyber-512-CCA-KEM-Encaps Dilithium-II-Sign 1273 1341 1603 307,847 31,669 155,166 69.42 6.21 50.42 Albrecht et al. [AHH+18] SLE 78
Kyber-768-CPA-PKE-Encrypt Kyber-768-CCA-KEM-Encaps
5,117,996
FPGA
NewHope-1024-Simple-Encrypt
FPGA
Frodo-640-CCA-KEM-Encaps
FPGA
19 of 25
Test Board
20 of 25
Binomial Sampling Number Theoretic Transform Polynomial Coefficient-wise Multiplication Polynomial Coefficient-wise Addition
▪ Number Theoretic Transform ▪ Coefficient-wise Multiplication ▪ Coefficient-wise Addition
21 of 25
22 of 25
1. Generate secret message 𝜈𝑠 2. Encrypt 𝜈𝑠 to its corresponding ciphertext 𝑑𝑠 = (ො 𝑣𝑠, 𝑤𝑠
′)
3. Compute 𝑑𝑛 = ො 𝑣 + ො 𝑣𝑠, 𝑤′ + 𝑤𝑠
′ where c =
ො 𝑣, 𝑤′ is the original ciphertext 4. Decrypt 𝑑𝑛 to obtain 𝜈𝑛 = 𝜈 ⊕ 𝜈𝑠 where 𝜈 is the original message 5. Recover original message as 𝜈 = 𝜈𝑛 ⊕ 𝜈𝑠
[Reparaz et al, PQCrypto, 2016]
23 of 25
24 of 25
25 of 25