on the security margin of tinyjambu with refined
play

On the Security Margin of TinyJAMBU with Refined Differential and - PowerPoint PPT Presentation

On the Security Margin of TinyJAMBU with Refined Differential and Linear Cryptanalysis Dhiman Saha 1 Yu Sasaki 2 Danping Shi 3,4 Ferdinand Sibleyras 5 Siwei Sun 3,4 Yingjie Zhang 3,4 1 de.ci.phe.red Lab, Department of Electrical Engineering and


  1. On the Security Margin of TinyJAMBU with Refined Differential and Linear Cryptanalysis Dhiman Saha 1 Yu Sasaki 2 Danping Shi 3,4 Ferdinand Sibleyras 5 Siwei Sun 3,4 Yingjie Zhang 3,4 1 de.ci.phe.red Lab, Department of Electrical Engineering and Computer Science, IIT Bhilai 2 NTT Secure Platform Laboratories 3 State Key Laboratory of Information Security, Institute of Information Engineering, Chinese Academy of Sciences 4 University of Chinese Academy of Sciences 5 Inria FSE 2020

  2. High-level Description - AEAD Key Message Ciphertext Nonce Authentication Tag Associated Data

  3. TinyJAMBU ▸ Designed by Hongjun Wu and Tao Huang ▸ A small variant of JAMBU [WH15] ▸ A family of AEAD schemes ▸ Currently a Round-2 candidate in NIST LWC Table: Security goals of TinyJAMBU with unique nonce Version Encryption Authentication 112-bit 64-bit TinyJAMBU-128 168-bit 64-bit TinyJAMBU-192 224-bit 64-bit TinyJAMBU-256 WH15 - JAMBU Lightweight Authenticated Encryption Mode and AES-JAMBU. Submission to CAESAR, 2015 ▸

  4. Step 1: Initialization K 125 128 Init. 0 3 Nonce 3

  5. Inside Init. (Key Setup + Nonce Setup) Init. Nonce 0 Nonce 1 Nonce 2 K K K K K K 32 32 32 125 128 93 93 93 128 128 ˆ Init. P K P K P K P K 0 0 P K 3 3 3 3 Nonce 3 1 1 1 P K , ˆ P K → Keyed Permutations

  6. Step 2: Associated Data Processing A 0 A 1 K K K 125 32 32 128 93 93 Init. P K P K 0 3 3 3 Nonce 3 3 5

  7. Step 3: Encryption C 0 C 1 A 0 A 1 M 0 M 1 K K K K K 125 32 32 32 32 32 32 128 93 93 ˆ ˆ Init. P K P K 0 P K P K 61 61 3 3 3 3 3 Nonce 3 3 5 5 7

  8. Step 4: Finalization C 0 C 1 T 0 T 1 A 0 A 1 M 0 M 1 K K K K K K K 125 32 32 32 32 32 32 32 32 32 128 93 93 32 ˆ ˆ ˆ Init. P K P K P K 0 P K P K P K 61 61 61 3 3 3 3 3 64 Nonce 3 3 5 5 7 7

  9. The Three Variants of TinyJAMBU C 0 C 1 T 0 T 1 A 0 A 1 M 0 M 1 K K K K K K K 125 32 32 32 32 32 32 32 32 32 128 93 93 32 ˆ ˆ ˆ P K P K P K 0 Init. P K P K P K 61 61 61 3 3 3 3 3 64 Nonce 3 3 5 5 7 7 ▸ Note: The number of rounds of ˆ Sizes in bits # of rounds P K is AEAD ˆ State Key Nonce Tag P K P K much larger than that of P K 128 128 96 64 384 1024 TinyJAMBU-128 128 192 96 64 384 1152 TinyJAMBU-192 ▸ Used in Key Setup and Encryption 128 256 96 64 384 1280 TinyJAMBU-256

  10. The Internal Permutation ▸ NLFSR based keyed-permutation ▸ Computes only a single NAND gate as a non-linear component per round b ∈ F 2 NAND 127 91 85 70 47 0

  11. Previous Cryptanalysis and Research Challenges

  12. Cryptanalysis Courtesy: Designers Strategy Counts the number of active AND gates to find differential and linear trails with the minimum of such active gates by MILP Why is this insufficient? → Fast but inaccurate ▸ Ignores the correlation between multiple AND gates which can impact probabilities of the differential or linear trails [KLT15, AEL+18] ▸ Designers have ignored effect of differentials which can amplify the probabilities of the trails [AK18] ▸ For linear cryptanalysis designer only analyzed internal permutation assuming access to all input bits KLT15 - K¨ olbl et al. Observations on the SIMON block cipher family. CRYPTO 2015 ▸ AEL+18 - Ashur et al. Cryptanalysis of MORUS ASIACRYPT 2018 ▸ AK18 - Ankele and K¨ olbl. Mind the Gap - A Closer Look at the Security of Block Ciphers against Differential Cryptanalysis. SAC 2018 ▸

  13. A Note on Existing Literature on MILP Modeling ▸ Techniques exists to evaluate the exact probability by limiting the search space to only valid trails [SHW+15a, SHW+15b] What is the issue? → Accurate but too slow ▸ Such models involve too many variables and constraints ▸ Cannot be solved in practical time ▸ Good for verifying the validity of a given trail ▸ Not so efficient to find optimal ones [SHW+15a] SHW+15a - Sun et al. Constructing mixed-integer programming models whose feasible region is exactly the set of all valid differential ▸ characteristics of SIMON. ePrint 2015 SHW+15b - Sun et al. Extending the applicability of the mixed- integer programming technique in automatic differential cryptanalysis. ISC ▸ 2015

  14. A Note on Existing Literature on MILP Modeling ▸ Techniques exists to evaluate the exact probability by limiting the search space to only valid trails [SHW+15a, SHW+15b] What is the issue? → Accurate but too slow ▸ Such models involve too many variables and constraints ▸ Cannot be solved in practical time ▸ Good for verifying the validity of a given trail ▸ Not so efficient to find optimal ones [SHW+15a] Our Motivation: Strike a good balance of efficiency and accuracy while modeling SHW+15a - Sun et al. Constructing mixed-integer programming models whose feasible region is exactly the set of all valid differential ▸ characteristics of SIMON. ePrint 2015 SHW+15b - Sun et al. Extending the applicability of the mixed- integer programming technique in automatic differential cryptanalysis. ISC ▸ 2015

  15. Our Contributions

  16. Identifying Issues With Simple MILP Model What happens in the simple model? Table: Restrictions on the values of a and b in a ⋅ b = z when ∆ z = 1. If there is a difference on at least one of the two input bits, the output of the ∆ a ∆ b ∆ z = 1 iff AND gates has a difference with 0 0 Never probability 2 − 1 or does not with 0 1 a = 1 probability 2 − 1 1 0 b = 1 1 1 a = b ▸ It considers independently every AND gate and ▸ Treats every AND gate in the Simple model fails to capture these same way restrictions

  17. Introducing Refined Model b ∈ F 2 NAND 127 91 85 70 47 0 Main Observation The same value, as it is shifted, will enter twice in two different AND gates.

  18. The Internal State ( S 127 , ⋯ S 0 ) S 127 S 100 S 85 S 70 S 0 ( a ) ( b ) ( c )

  19. S 85 Enters AND gate Twice (First: b ⋅ c ) And Gate - 1 ( b ⋅ c ) S 127 S 100 S 85 S 70 S 0 ( a ) ( b ) ( c )

  20. After 15 rounds (Second: a ⋅ b ) And Gate - 1 ( b ⋅ c ) S 127 S 100 S 85 S 70 S 0 ( a ) ( b ) ( c ) S 100 S 85 S 70 And Gate - 2 ( a ⋅ b )

  21. First Order Correlations And Gate - 1 ( b ⋅ c ) S 127 S 100 S 85 S 70 S 0 ( a ) ( b ) ( c ) S 100 S 85 S 70 Correlation of a ⋅ b and b ⋅ c And Gate - 2 for some values a , b , c ( a ⋅ b )

  22. Case-1: Case-2: Dependency of two AND gates Difference Difference

  23. Case-2: Dependency of two AND gates Difference Difference Case-1:

  24. Dependency of two AND gates Difference Difference Case-1: Case-2:

  25. Dependency of two AND gates Difference Difference Case-1: Case-2: In this scenario Refined model ▸ Forces that both differences jointly propagate, or not, and ▸ Only counts this as a single active gate.

  26. The Refined Model ▸ It adds additional constraints on MILP model variables: top of the simple model ▸ d a modelizes ∆ a ▸ All chained AND gates are ▸ d ab modelizes ∆ ab recorded ▸ γ abc indicates if there’s a correlation between the two Example Recorded Chains - AND gates ab and bc . {( d ab , d a , d b ) , ( d bc , d b , d c ) ,... } Then for all consecutive couples Finally (( d ab , d a , d b ) , ( d bc , d b , d c )) the Subtract all values γ abc in the following constraint is added: objective function to only count γ abc = d a d b d c this once , whereas the simple d ab − d bc ≤ 1 − γ abc model would count two active d bc − d ab ≤ 1 − γ abc gates.

  27. Differential Cryptanalysis

  28. Trail Types in TinyJAMBU Submission Doc ▸ Designers searched for the differential trail that has the minimum number of active AND gates in the simple model Type 1: Input differences only exist in the 32 MSBs. No constraint on the output. Type 2: No constraint on the input. Output differences only exist in the 32 MSBs. Type 3: Both of the input and output differences only exist in the 32 MSBs. Type 4: No constraint. Designers Claim Proven Wrong in Refined Model ▸ Max. probability of the 384-round trail of Type 3 is 2 − 80 ▸ Max. probability of the 320-round characteristic of Type 4 is 2 − 13

  29. Attacks for the AEAD Setting Forgery for TinyJAMBU Mode Nonce 0 Nonce 1 Nonce 2 K K K K K ▸ Attack the nonce setup or ▸ The associated data 32 32 32 processing 128 93 93 93 128 ˆ P K P K P K P K 0 P K ▸ Recall P K → 384 Rounds 3 3 3 ▸ Use Type 3 trails 1 1 1 P K Exploiting ( ∆ i ∥ 0 96 ) �→ ( ∆ i + 1 ∥ 0 96 ) with probability p ▸ Also makes the case for MAC reforgeability [BC09] ▸ Unlike designers we also look at cluster of multiple trails BC09 - Black and Cochran. MAC reforgeability. FSE 2009 ▸

  30. Attacks for the AEAD Setting Observations on Full 384 Rounds ▸ Found contradiction for simple model ▸ 14 couples are correlated ▸ Refined model reports 88 active AND ▸ Prob. = 2 −( 88 − 14 ) = 2 − 74 gates Input: ∆ S 127 .. 0 01004800 00000000 00000000 00000000 ∆ S 255 .. 128 81044c80 24080304 d9200000 22090000 ∆ S 383 .. 256 81004082 00010200 83000010 26090240 Output: ∆ S 511 .. 384 81004082 00000000 00000000 00000000 103 distinct differential trails Overall Differential Prob. = 2 − 70 . 68 2 − 74 2 − 75 2 − 76 2 − 77 2 − 78 2 − 79 2 − 80 Probability # Trails 1 5 9 14 20 24 30

Recommend


More recommend