➢ Common-Z trick (7 --> 6) Point Addition: Point Doubling: ● 7 registers in total: ( X 1 , Z 1 ) + ( X 2 , Z 2 ) 2( X 1 , Z 1 ) ( x 0 , X 1 , Z 1 , X 2 , Z 2 , T 1 , T 2 ) ● Further reduction: T 1 ← x 0 T 1 ← c ( x 0 , X 1 , X 2 , Z, T 1 , T 2 ) X 1 ← X 1 2 X 1 ← X 1 · X 2 Z 1 ← Z 1 2 Z 1 ← Z 1 · X 2 X 1 ← X 1 ·Z 2 T 1 ← Z 1 · T 1 T 2 ← X 1 · Z 1 X 2 ← X 2 ·Z 1 Z 1 ← X 1 · Z 1 Z 1 ← X 1 +Z 1 Z ← Z 1 ·Z 2 T 1 ← T 1 2 Z 1 ← Z 1 2 ● Cost for one iteration: X 1 ← X 1 2 X 1 ← T 1 · Z 1 X 1 ← X 1 +T 1 X 1 ← X 1 +T 2 6M+5S → 7M+4S Register: 7 Register: 3 Mul. : 4 Mul. : 2 Sqr. : 1 Sqr. : 4 56
➢ Circular-shift register file 57 Slides courtesy: Yongki Lee
➢ Power & Energy 58
➢ Power & Energy To support the computations 59
➢ Power & Energy To support the computations To support a reasonable reading distance 60
➢ Power & Energy 61
➢ Power & Energy P d = α C V 2 f Dynamic Switch Vdd Clock Output Power Activity Frequency capacitance 62
➢ A bit-serial multiplier Input : A(x)= { a m-1 ,a m-2 …a 1 ,a 0 }, B(x)= { b m-1 ,b m-2 …b 1 ,b 0 } , and P(x)= { 1,p m-1 …p 1 ,1 } Output : C(x) = A(x)B(x ) mod P(x) 1: C(x) ← 0; 2: for i = m-1 to 0 do 3: C(x) ← xC(x)+ b i A(x); C(x) ← C(x) mod P(x); 4: end for Return: C(x) 63
➢ A bit-serial multiplier A(x) Input : A(x)= { a m-1 ,a m-2 …a 1 ,a 0 }, B(x)= { b m-1 ,b m-2 …b 1 ,b 0 } , b i and P(x)= { 1,p m-1 …p 1 ,1 } Output : C(x) = A(x)B(x ) mod P(x) 1: C(x) ← 0; C(x) 2: for i = m-1 to 0 do 3: C(x) ← xC(x)+ b i A(x); C(x) ← C(x) mod P(x); 4: end for C out (x) Return: C(x) Bit-serial multiplier [ Delay: ≈ m cycles ] 64
➢ Power & Energy A(x) b i C(x) A(x) b i Bit-serial Mul. C(x) Bit-serial Mul. ... Bit-serial Mul. C out (x) Digit-serial Multiplier Bit-serial multiplier [ Delay: ≈ m/d cycles ] [ Delay: ≈ m cycles ] 65
➢ Power & Energy Target : One point multiplication within 0.25s 66
➢ Power & Energy Target : One point multiplication within 0.25s 120 100 80 Area [kGE] Cycles [x10^4] Freq [x10kHz] 60 Power [uw] Energy [uJ] 40 20 0 1 2 3 4 5 Digit-size of the multiplier 67
➢ Physical attacks 68
➢ Physical attacks Side-Channel Analysis 69
➢ Physical attacks Side-Channel Analysis Fault Analysis 70
➢ Power analysis Oscilloscope VDD +3,3V ECC ECC Processor Processor R GND 71
➢ Simple power analysis k = (k l-1 ,k l-2 ,...,k 0 ) Left-to-right binary method for point multiplication R ← O for i=l-1 downto 0 do R ← [2] R if k i = 1 then R ← R + P end if end for 72
➢ Simple power analysis k = (k l-1 ,k l-2 ,...,k 0 ) Left-to-right binary method for point multiplication R ← O for i=l-1 downto 0 do R ← [2] R if k i = 1 then R ← R + P end if end for 73
➢ Montgomery Ladder? Algorithm 1: Montgomery Powering Ladder Input: k= {1, k t -1 ,.., k 0 } and point P Output: [ k ] P 1: P 1 ← P , P 2 ← [2] P 2: for i=t-1 to 0 do 3: if k i =1 then P 1 ← P 1 + P 2 , P 2 ← [2] P 2 else P 2 ← P 1 + P 2 , P 1 ← [2] P 1 4: end for Return P 1 74
➢ Montgomery Ladder? Algorithm 1: Montgomery Powering Ladder Input: k= {1, k t -1 ,.., k 0 } and point P Output: [ k ] P 1: P 1 ← P , P 2 ← [2] P 2: for i=t-1 to 0 do 3: if k i =1 then P 1 ← P 1 + P 2 , P 2 ← [2] P 2 else P 2 ← P 1 + P 2 , P 1 ← [2] P 1 4: end for Return P 1 75
➢ Montgomery Ladder? Algorithm 1: Montgomery Powering Ladder Input: k= {1, k t -1 ,.., k 0 } and point P Output: [ k ] P 1: P 1 ← P , P 2 ← [2] P 2: for i=t-1 to 0 do 3: if k i =1 then P 1 ← P 1 + P 2 , P 2 ← [2] P 2 else P 2 ← P 1 + P 2 , P 1 ← [2] P 1 4: end for Return P 1 76
➢ Differential power analysis 77
➢ Differential power analysis Power k Model 78
➢ Differential power analysis P 1 , P 2 , ..., P n Power k Model [ k ] P 1 , [ k ] P 2 , ...,[ k ] P n [ k ] P 1 [ k ] P 2 ... ... [ k ] P n 79
➢ Differential power analysis P 1 , P 2 , ..., P n Power k Key guess k = k' Model [ k ] P 1 , [ k ] P 2 , ...,[ k ] P n [ k ] P 1 [ k ] P 2 ... ... [ k ] P n 80
➢ Differential power analysis P 1 , P 2 , ..., P n P 1 , P 2 , ..., P n Power k Key guess k = k' Model [ k ] P 1 , [ k ] P 2 , ...,[ k ] P n [ k' ] P 1 , [ k' ] P 2 , ...,[ k' ] P n [ k ] P 1 [ k ] P 2 ... ... [ k ] P n 81
➢ Differential power analysis P 1 , P 2 , ..., P n P 1 , P 2 , ..., P n Power k Key guess k = k' Model [ k ] P 1 , [ k ] P 2 , ...,[ k ] P n [ k' ] P 1 , [ k' ] P 2 , ...,[ k' ] P n [ k ] P 1 [ k' ] P 1 [ k ] P 2 [ k' ] P 2 ... ... ... ... [ k ] P n [ k' ] P n 82
➢ Differential power analysis P 1 , P 2 , ..., P n P 1 , P 2 , ..., P n Power k Key guess k = k' Model [ k ] P 1 , [ k ] P 2 , ...,[ k ] P n [ k' ] P 1 , [ k' ] P 2 , ...,[ k' ] P n [ k ] P 1 [ k' ] P 1 [ k ] P 2 [ k' ] P 2 ... ... ... ... [ k ] P n [ k' ] P n 83
➢ Fault analysis 84
➢ Fault analysis 85
➢ Fault analysis (weak curve) [Biehl+'00] Q= [ k ] P P(x P ,y P ) k 86
➢ Fault analysis (weak curve) [Biehl+'00] Q= [ k ] P P(x P ,y P ) k The specified curve is: E : y 2 + a 1 xy + a 3 y = x 3 + a 2 x 2 + a 4 x + a 6, and P ( x P ,y P ) is on E. Inject a fault: P( x P ,y P ) → P'( x P ,y ' P ), E' : y 2 + a 1 xy + a 3 y = x 3 + a 2 x 2 + a 4 x + a' 6, 87
➢ Fault analysis (weak curve) [Biehl+'00] Q= [ k ] P P(x P ,y P ) k The specified curve is: E : y 2 + a 1 xy + a 3 y = x 3 + a 2 x 2 + a 4 x + a 6, and P ( x P ,y P ) is on E. Inject a fault: P( x P ,y P ) → P'( x P ,y ' P ), E' : y 2 + a 1 xy + a 3 y = x 3 + a 2 x 2 + a 4 x + a' 6, 88
➢ Fault analysis (weak curve) [Biehl+'00] Q= [ k ] P P(x P ,y P ) k The specified curve is: E : y 2 + a 1 xy + a 3 y = x 3 + a 2 x 2 + a 4 x + a 6, and P ( x P ,y P ) is on E. Not used for PA/PD Inject a fault: P ( x P ,y P ) → P' ( x P ,y ' P ), E' : y 2 + a 1 xy + a 3 y = x 3 + a 2 x 2 + a 4 x + a' 6, 89
➢ Point validation Q= [ k ] P P(x P ,y P ) k PV: Before the point multiplication : 1, check the integrity of curve E . 2, check if P is on the curve or not. 90
➢ Point validation Q= [ k ] P P(x P ,y P ) k PV: Before the point multiplication : 1, check the integrity of curve E . 2, check if P is on the curve or not. But: Can the adversary inject faults after the validation step? 91
➢ Fault analysis (twist curve) [Fouque+'08] Consider a curve defined on F p : E : y 2 z = x 3 + a xz 2 + bz 3 . y coordinates is not needed for Montgomery ladder. The twist of E : E' : ε y 2 z = x 3 + a xz 2 + bz 3 , where ε is quadratic non-residue in F p. Let ( x P , - ) be a point on E , then a random fault on x P may lead to a point on E' with a probability of 1/2. So, it is necessary to perform PV after point multiplication. 92
➢ Fault analysis (twist curve) [Fouque+'08] Consider a curve defined on F p : E : y 2 z = x 3 + a xz 2 + bz 3 . y coordinates is not needed for Montgomery ladder. The twist of E : E' : ε y 2 z = x 3 + a xz 2 + bz 3 , where ε is quadratic non-residue in F p. Let ( x P , - ) be a point on E , then a random fault on x P may lead to a point on E' with a probability of 1/2. So, it is necessary to perform PV after point multiplication. 93
➢ Fault analysis (twist curve) [Fouque+'08] Consider a curve defined on F p : E : y 2 z = x 3 + a xz 2 + bz 3 . y coordinates is not needed for Montgomery ladder. The twist of E : E' : ε y 2 z = x 3 + a xz 2 + bz 3 , where ε is quadratic non-residue in F p. Let ( x P , - ) be a point on E , then a random fault on x P may lead to a point on E' with a probability of 1/2. So, it is necessary to perform PV after point multiplication. 94
➢ Fault analysis (twist curve) [Fouque+'08] Consider a curve defined on F p : E : y 2 z = x 3 + a xz 2 + bz 3 . y coordinates is not needed for Montgomery ladder. The twist of E : E' : ε y 2 z = x 3 + a xz 2 + bz 3 , where ε is quadratic non-residue in F p. Let ( x P , - ) be a point on E , then a random fault on x P may lead to a point on E' with a probability of 1/2. So, it is necessary to perform PV after point multiplication. But: Can the adversary inject faults before the validation step? 95
√ : Effective x : Attacked - : Not related H : helps the attack ? : Not clear or not published * : Implementation dependent Passive attacks Active attacks Safe-error Weak curve Differential SPA Temp- DPA Doubl. RPA Carry M C Invalid Invalid Twist Sign Diff. TA late Attack ZPA based type type Point curve curve change Fault √ - - ? - - - - - - - - - Indistinguishable PA/PD √ - - x - - - H - - - - - Double-add-always √ - - x ? - √* - - - H √ - Montgomery ladder ┴ √ - - x x - √* - - - √ - - Montgomery ladder ┬ - ? √ ? √ x - - - - ? ? ? Random key splitting - x x x √ x - - - - - ? ? Scalar randomization - x x x √ - - - ? *? - - ? Base point blinding - √ √ ? x - - - - - - - ? Randomized proj. coord. - ? √ ? x - - - - - - - ? Randomized EC Iso. - ? √ ? x - - - - - - - ? Randomized Field Iso. - - - - - - - H √ ? √┬ H √ Point validity check - - - - - - - - - √ - - Curve integrity check - - - - - - - H - ? - √* √ Coherence check 96
➢ Attacking points ● Tag's private key: x ● Tag's public key : X (=[ -x ] P ) Reader (Verifier) Tag (Prover) r 1 = TRNG( ) R 1 R 1 = [ r 1 ] P r 2 r 2 = TRNG( ) v v=xr 2 + r 1 mod n If [ v ] P + [ r 2 ] X == R 1 Then accept The Schnorr Protocol 97
➢ Attacking points ● Tag's private key: x ● Tag's public key : X (=[ -x ] P ) Reader (Verifier) Tag (Prover) r 1 = TRNG( ) R 1 R 1 = [ r 1 ] P r 2 r 2 = TRNG( ) v v=xr 2 + r 1 mod n If [ v ] P + [ r 2 ] X == R 1 Then accept The Schnorr Protocol 98
➢ Attacking points ● Tag's private key: x ● Tag's public key : X (=[ -x ] P ) Reader (Verifier) Tag (Prover) r 1 = TRNG( ) R 1 R 1 = [ r 1 ] P r 2 r 2 = TRNG( ) v v=xr 2 + r 1 mod n If [ v ] P + [ r 2 ] X == R 1 Then accept The Schnorr Protocol 99
➢ Attacking points ● Tag's private key: x ● Tag's public key : X (=[ -x ] P ) Reader (Verifier) Tag (Prover) r 1 = TRNG( ) R 1 R 1 = [ r 1 ] P r 2 r 2 = TRNG( ) v v=xr 2 + r 1 mod n If [ v ] P + [ r 2 ] X == R 1 Then accept The Schnorr Protocol 100
Recommend
More recommend