Share
Embed
Rotational Cryptanalysis of Salsa Coreย Function
This slide was presented at ISC 2020.
Ryoma Ito
December 17, 2020
Transcript
35 slides
-
Ryoma Ito NICT, Japan ISC 2020 December 17, 2020 Rotational
Cryptanalysis of Salsa Core Function Keywords: ARX, Stream Cipher, Salsa, Rotational Cryptanalysis -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Salsa stream cipher Salsa n ARX-based stream cipher u ARX: Addition-Rotation-XOR construction n designed by Bernstein in 2005 n one of the finalists for the eSTREAM software portfolio 2 Introduction (1/8) -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Salsa Core Function 3 Introduction (2/8) โ 7 ๐ ๐ ๐ ๐ ๐โฒ ๐โฒ ๐โฒ ๐โฒ โ 18 โ 13 โ 9 -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Salsa Core Function 4 Introduction (3/8) โ 7 ๐ ๐ ๐ ๐ ๐โฒ ๐โฒ ๐โฒ ๐โฒ โ 18 โ 13 โ 9 Addition Rotation XOR Addition โฆ 4 Additions 4 Rotations 4 XORs -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Salsa stream cipher and Rotational Cryptanalysis Salsa n ARX-based stream cipher u ARX: Addition-Rotation-XOR construction n designed by Bernstein in 2005 n one of the finalists for the eSTREAM software portfolio 5 Introduction (4/8) Rotational Cryptanalysis [KN10, KNP+15] n A probabilistic attack that follows the evolution of a so-called rotational pair through the rounds of a function (or a cipher) u Rotational pair: ๐, โ ๐ = ๐, ๐ โ ๐ , ๐, โ ๐ = ๐, ๐ โ ๐ u Rotational probability: Pr ๐น(๐) = ๐น โ ๐ , Pr ๐น(๐) = ๐น โ ๐ [KN10] Dmitry Khovratovich and Ivica Nikolic. Rotational Cryptanalysis of ARX. FSE 2010. [KNP+15] Dmitry Khovratovich et al. Rotational Cryptanalysis of ARX Revisited. FSE 2015. -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Motivations: Rotational Cryptanalysis of Salsa Core Function Cryptanalysis of Salsa n mainly differential cryptanalysis u attack only up to 8 rounds (out of 20 rounds) n No study has yet applied rotational cryptanalysis to ARX-based stream ciphers including ChaCha (https://eprint.iacr.org/2020/1049, received 31 Aug 2020) 6 Introduction (5/8) -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Motivations: Rotational Cryptanalysis of Salsa Core Function Cryptanalysis of Salsa n mainly differential cryptanalysis u attack only up to 8 rounds (out of 20 rounds) n No study has yet applied rotational cryptanalysis to ARX-based stream ciphers including ChaCha (https://eprint.iacr.org/2020/1049, received 31 Aug 2020) 7 Introduction (6/8) Rotational Cryptanalysis of ARX-based Stream Ciphers n practically difficult to obtain a rotational pair of all inputs. u Salsa and ChaCha utilize constant as one of their inputs. n The core function of one encryption scheme is often implemented in another to design symmetric-key primitives. u e.g., SOSEMANUK โ Serpent, BLAKE2 โ ChaCha, SNOW-V โ AES n It is important to clarify whether Salsa core function has a fatal weakness to rotational cryptanalysis. -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Summary of Our Results 8 Introduction (7/8) Table 1. A comparison between the previous and our results (r = 1). โปlog2 # of modular additions 1 2 3 4 5 6 7 8 [KN10, Theorem 2] -1.4 -2.8 -4.2 -5.7 -7.1 -8.5 -9.9 -11.3 [KNP+15, Lemma 2] -1.4 -3.6 -6.3 -9.3 -12.7 -16.3 -20.1 -24.1 Experimental results -1.415 -2.263 -3.263 -4.206 -5.169 -6.126 -7.086 -8.043 Theoretical results -1.415 -2.263 -3.111 -3.959 -7.918 Rotational Probabilities of Salsa-type ARX Primitive -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Summary of Our Results 9 Introduction (7/8) Rotational Distinguisher* for Salsa/ChaCha Permutations** Table 1. A comparison between the previous and our results (r = 1). โปlog2 # of modular additions 1 2 3 4 5 6 7 8 [KN10, Theorem 2] -1.4 -2.8 -4.2 -5.7 -7.1 -8.5 -9.9 -11.3 [KNP+15, Lemma 2] -1.4 -3.6 -6.3 -9.3 -12.7 -16.3 -20.1 -24.1 Experimental results -1.415 -2.263 -3.263 -4.206 -5.169 -6.126 -7.086 -8.043 Theoretical results -1.415 -2.263 -3.111 -3.959 -7.918 Rotational Probabilities of Salsa-type ARX Primitive *Distinguisher is to distinguish the cipher from a random function/permutation. **The permutations can allow us to set the arbitrary input values. Table 2. A comparison of the rotational distinguisher for Salsa/ChaCha permutations. # of rounds Probability (log2 ) Ref Salsa permutation 32 -506.752 (< -512.0) ChaCha permutation 8 -489.6 (< -512.0) 17 -487.6 (< -512.0) [ePrint] -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Outline of the Talk 10 1. Preliminaries n Salsa stream cipher n Rotational Cryptanalysis 2. Rotational Cryptanalysis of the Salsa Core Function n Experimental Observations n Our lemmas, theorem, and prediction n Experimental Verifications 3. A Weakness of the Salsa Permutation 4. Conclusion -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Salsa stream cipher 11 n 256-bit key: ๐!, โฆ , ๐" n 64-bit nonce: ๐ฃ! , ๐ฃ# n 64-bit counter: ๐ก! , ๐ก# n 128-bit constant: ๐!, ๐#, ๐$, ๐% Preliminaries (1/7) Initial state matrix ๐ ! = ๐ฅ! ! ๐ฅ# ! ๐ฅ& ! ๐ฅ' ! ๐ฅ$ ! ๐ฅ% ! ๐ฅ( ! ๐ฅ" ! ๐ฅ) ! ๐ฅ* ! ๐ฅ#$ ! ๐ฅ#% ! ๐ฅ#! ! ๐ฅ## ! ๐ฅ#& ! ๐ฅ#' ! = ๐! ๐! ๐% ๐# ๐# ๐$ ๐ฃ! ๐ฃ# ๐ก! ๐ก# ๐' ๐( ๐$ ๐& ๐" ๐% -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Salsa stream cipher 12 n columnrounds (in the odd number rounds): ๐ฅ! " , ๐ฅ# " , ๐ฅ$ " , ๐ฅ%& " , ๐ฅ' " , ๐ฅ( " , ๐ฅ%) " , ๐ฅ% " , ๐ฅ%! " , ๐ฅ%# " , ๐ฅ& " , ๐ฅ* " , ๐ฅ%' " , ๐ฅ) " , ๐ฅ+ " , ๐ฅ%% " n rowrounds (in the even number rounds): ๐ฅ! " , ๐ฅ% " , ๐ฅ& " , ๐ฅ) " , ๐ฅ' " , ๐ฅ* " , ๐ฅ+ " , ๐ฅ# " , ๐ฅ%! " , ๐ฅ%% " , ๐ฅ$ " , ๐ฅ( " , ๐ฅ%' " , ๐ฅ%& " , ๐ฅ%) " , ๐ฅ%# " n output 512-bit keystream block: ๐ = ๐ ! + ๐ + Preliminaries (2/7) The quarterround function (Salsa Core Function) vector ๐ฅ, " , ๐ฅ- " , ๐ฅ. " , ๐ฅ/ " is updated as below: ๐ฅ- "0% = ๐ฅ, " + ๐ฅ/ " โ 7 โจ๐ฅ- " , ๐ฅ. "0% = ๐ฅ- "0% + ๐ฅ, " โ 9 โจ๐ฅ. " , ๐ฅ/ "0% = ๐ฅ. "0% + ๐ฅ- "0% โ 13 โจ๐ฅ/ " , ๐ฅ, "0% = ๐ฅ/ "0% + ๐ฅ. "0% โ 18 โจ๐ฅ, " . -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Rotational Cryptanalysis 13 Preliminaries (3/7) Lemma 1 ([Daum05, Corollary 4.12]) 1. If we suppose an ๐-bit word ๐ด to be fixed and an ๐-bit word ๐ต to be chosen uniformly at random, then we obtain Pr ๐ด + ๐ต โ ๐ = ๐ด โ ๐ + ๐ต โ ๐ = ๐!๐ ๐๐!๐ โ ๐จ๐น ๐๐ โ ๐จ๐ณ , where ๐ด& = ๐'!(, โฆ , ๐'!) and ๐ด* = ๐'!)!(, โฆ , ๐+ for ๐ด. 2. If we suppose two ๐-bit words ๐ด and ๐ต to be chosen uniformly at random, then we obtain Pr ๐ด + ๐ต โ ๐ = ๐ด โ ๐ + ๐ต โ ๐ = ๐ ๐ ๐ + ๐๐!๐ + ๐!๐ + ๐!๐ . For ๐ = 32 and ๐ = 1, we obtain the rotational probabilities for the first and second types of modular addition in Lemma 1 as ๐!๐.๐๐๐ and ๐!๐.๐๐๐. Rotational probabilities of rotation and XOR: Pr ๐ด โ ๐( โ ๐1 = ๐ด โ ๐1 โ ๐( = ๐ , Pr ๐ดโจ๐ต โ ๐ = ๐ด โ ๐ โจ ๐ต โ ๐ = ๐ . -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Rotational Cryptanalysis 14 Preliminaries (4/7) Theorem 1 ([KN10, Theorem 2]): Let ๐ be the number of modular additions in an ARX-based primitive that has an arbitrary number of rotations and XORs. Then, the rotational probability of the ARX- based primitive is ๐2 ๐ , where ๐2 denotes the rotational probability of modular addition depending on the word size ๐ and the rotation amount ๐. Fact1: The rotational probability of the ARX-based primitive can be obtained by simply counting the number of the second type of modular additions in Lemma 1. -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Rotational Cryptanalysis 15 Preliminaries (5/7) Fact2: The rotational probability may not follow Theorem 1 when the output of modular addition becomes the input of another, called chained modular addition. Theorem 1 ([KN10, Theorem 2]): Let ๐ be the number of modular additions in an ARX-based primitive that has an arbitrary number of rotations and XORs. Then, the rotational probability of the ARX- based primitive is ๐2 ๐ , where ๐2 denotes the rotational probability of modular addition depending on the word size ๐ and the rotation amount ๐. Fact1: The rotational probability of the ARX-based primitive can be obtained by simply counting the number of the second type of modular additions in Lemma 1. -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Rotational Cryptanalysis: example of chained modular addition 16 Preliminaries (6/7) -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Rotational Cryptanalysis 17 Preliminaries (7/7) Fact2: The rotational probability may not follow Theorem 1 when the output of modular addition becomes the input of another, called chained modular addition. Theorem 1 ([KN10, Theorem 2]): Let ๐ be the number of modular additions in an ARX-based primitive that has an arbitrary number of rotations and XORs. Then, the rotational probability of the ARX- based primitive is ๐2 ๐ , where ๐2 denotes the rotational probability of modular addition depending on the word size ๐ and the rotation amount ๐. Fact1: The rotational probability of the ARX-based primitive can be obtained by simply counting the number of the second type of modular additions in Lemma 1. Lemma 2 ([KNP+15, Lemma 2]) Let ๐(, โฆ , ๐4 be ๐-bit words chosen at random and let ๐ be the rotation amount. Then Pr( ๐( + ๐1 โ ๐ = ๐( โ ๐ + ๐1 โ ๐ โง โฏ โง ๐( + โฏ + ๐4 โ ๐ = ๐( โ ๐ + โฏ + ๐4 โ ๐ ) = ๐ ๐๐๐ ๐ + ๐๐ โ ๐ ๐๐ โ ๐ ๐ + ๐๐!๐ โ ๐ ๐๐!๐ โ ๐ . -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Outline of the Talk 18 1. Preliminaries n Salsa stream cipher n Rotational Cryptanalysis 2. Rotational Cryptanalysis of the Salsa Core Function n Experimental Observations n Our lemmas, theorem, and prediction n Experimental Verifications 3. A Weakness of the Salsa Permutation 4. Conclusion -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Experimental Observations: Toy Model Construct a toy model of the Salsa core function n a word size of 8 bits (instead of 32 bits) u The rotational probability can be obtained from all the input/output rotational pairs with 232 trials, which can execute an exhaustive search. 19 Rotational Cryptanalysis of the Salsa Core Function (1/9) The quarterround function (Toy model of the Salsa Core Function) The function family ๐5 is defined by ๐5 ๐, ๐, ๐, ๐ = ๐ + ๐ โ ๐ โจ๐. Then ๐ = ๐( ๐, ๐, ๐, 7 = ๐ + ๐ โ 7 โจ๐, ๐ = ๐1 ๐, ๐, ๐, 5 = ๐ + ๐ โ 5 โจ๐, ๐ = ๐6 ๐, ๐, ๐, 3 = ๐ + ๐ โ 3 โจ๐, ๐ = ๐7 ๐, ๐, ๐, 1 = ๐ + ๐ โ 1 โจ๐. The function family ๐น5 is defined as follows: ๐น( = ๐(, ๐น1 = ๐1 โ ๐(, ๐น6 = ๐6 โ ๐1 โ ๐(, ๐น7 = ๐7 โ ๐6 โ ๐1 โ ๐( -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Experimental Observations: Toy Model 20 Rotational Cryptanalysis of the Salsa Core Function (2/9) โ 7 ๐ ๐ ๐ ๐ ๐โฒ ๐โฒ ๐โฒ ๐โฒ โ 1 โ 3 โ 5 ๐( ๐1 ๐6 ๐7 ๐น( ๐น1 ๐น6 ๐น7 -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Experimental Observations Rotational Probabilities of Functions ๐ญ๐ , ๐ญ๐ , ๐ญ๐ , ๐ญ๐* 21 Rotational Cryptanalysis of the Salsa Core Function (3/9) Pr ๐น( ๐, ๐, ๐, ๐ = ๐น( โ ๐, ๐, โ ๐, โ ๐ , Pr ๐น1 ๐, ๐, ๐, ๐ = ๐น1 โ ๐, ๐, โ ๐, โ ๐ , Pr ๐น6 ๐, ๐, ๐, ๐ = ๐น6 โ ๐, ๐, โ ๐, โ ๐ , Pr ๐น7 ๐, ๐, ๐, ๐ = ๐น7 โ ๐, ๐, โ ๐, โ ๐ . *Symbol โโโ represents the left rotation by one bit. **The Salsa core function has no chained modular addition; rotational probability may not follow Lemma 2. Table 3. A comparison between the previous and our observations (r = 1). โปlog2 Rotational probabilities ๐น! ๐น" ๐น# ๐น$ Theorem 1** -1.404 -2.808 -4.212 -5.616 Experimental observations -1.404 -2.246 -3.241 -4.197 Our lemmas and theorem Lemma 3 Lemma 4 Theorem 2 -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Rotational Probability of Function Family ๐ญ๐ 22 Rotational Cryptanalysis of the Salsa Core Function (4/9) Properties of the Salsa Core Function 1. One variable remains the same and becomes the input of the two consecutive modular additions. 2. The rotational probability throughout the function matches the one after the output of the last modular addition. โ 7 ๐ ๐ ๐ ๐ ๐โฒ ๐โฒ ๐โฒ ๐โฒ โ 5 -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Rotational Probability of Function ๐ญ๐ 23 Rotational Cryptanalysis of the Salsa Core Function (5/9) Lemma 3 Let ๐ โ , ๐, ๐ be a rotational probability of the first type of modular addition in Lemma 1, that is, ๐ท ๐จ, ๐, ๐ = ๐%๐ ๐๐%๐ โ ๐จ๐น ๐๐ โ ๐จ๐ณ . Then, the rotational probability of function ๐น" is given as follows: Pr ๐น1 ๐, ๐, ๐, ๐ = ๐น1 โ ๐, ๐, โ ๐, โ ๐ = 2!' K 8โ +,( 3 ๐ ๐, ๐, 1 M ๐ ๐, ๐, 1 , where Symbol โโโ represents the left rotation by one bit, and thus the rotation amount is r = 1. (Proof Sketch) Our proof is based on two properties of the Salsa core function. 1. One variable remains the same and becomes the input of the two consecutive modular additions. u We use the rotational probability for the first type of modular addition in Lemma 1. 2. The rotational probability throughout the function matches the one after the output of the last modular addition. โก -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Rotational Probability of Functions ๐ญ๐ and ๐ญ๐ 24 Rotational Cryptanalysis of the Salsa Core Function (6/9) Lemma 4 The rotational probability of function ๐ญ๐ is given by Pr ๐< = => ๐4 => ๐5 M Pr ๐@ , where Pr ๐@ is given by Lemma 3 and Pr ๐6 is given by Pr ๐( in the proof of Lemma 3. ๐6: ๐( ๐, ๐, ๐, 7 = ๐( โ ๐, โ ๐, ๐, 7 , ๐@: ๐น1 ๐, ๐, ๐, ๐ = ๐น1 โ ๐, ๐, โ ๐, โ ๐ , ๐<: ๐น6 ๐, ๐, ๐, ๐ = ๐น6 โ ๐, ๐, โ ๐, โ ๐ , ๐A: ๐น7 ๐, ๐, ๐, ๐ = ๐น7 โ ๐, ๐, โ ๐, โ ๐ . Theorem 2 The rotational probability of function ๐ญ๐ is given by Pr ๐A = => ๐4 => ๐5 M Pr ๐< , where Pr ๐< is given by Lemma 4, Pr ๐@ is given by Lemma 3, and Pr ๐6 is given by Pr ๐( in the proof of Lemma 3. -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Experimental Verifications 25 Rotational Cryptanalysis of the Salsa Core Function (7/9) Theorem 1 ([KN10, Theorem 2]): Let ๐ be the number of modular additions in an ARX-based primitive that has an arbitrary number of rotations and XORs. Then, the rotational probability of the ARX- based primitive is ๐2 ๐ , where ๐2 denotes the rotational probability of modular addition depending on the word size ๐ and the rotation amount ๐. Fact1: The rotational probability of the ARX-based primitives can be obtained by simply counting the number of the second type of modular additions in Lemma 1. -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Experimental Verifications 26 Rotational Cryptanalysis of the Salsa Core Function (8/9) Prediction 1: Let ๐ be the number of Salsa core functions that has four modular additions. Then, the rotational probability of the Salsa-type ARX primitive is ๐2 ๐ , where ๐2 denotes the rotational probability of the Salsa core function depending on the word size ๐ and the rotation amount ๐. Fact3: If our prediction is correct, we can easily analyze the rotational probability of the Salsa-type ARX primitives by simply counting the number of Salsa core functions. Theorem 1 ([KN10, Theorem 2]): Let ๐ be the number of modular additions in an ARX-based primitive that has an arbitrary number of rotations and XORs. Then, the rotational probability of the ARX- based primitive is ๐2 ๐ , where ๐2 denotes the rotational probability of modular addition depending on the word size ๐ and the rotation amount ๐. Fact1: The rotational probability of the ARX-based primitives can be obtained by simply counting the number of the second type of modular additions in Lemma 1. -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Experimental Verifications 27 Rotational Cryptanalysis of the Salsa Core Function (9/9) Table 4. A comparison between the experimental and theoretical values (log2 ) for the original version of the Salsa core function when the rotation amount is r = 1. The value in parentheses is the predicted value based on Prediction 1. # of modular additions 1 2 3 4 5 6 7 8 Experimental value -1.415 -2.263 -3.263 -4.206 -5.169 -6.126 -7.086 -8.043 Theoretical value -1.415 -2.263 -3.111 -3.959 -- -- -- (-7.918) # of modular additions 9 10 11 12 13 14 15 16 Experimental value -9.000 -9.959 -10.918 -11.875 -12.831 -13.790 -14.753 -15.712 Theoretical value -- -- -- (-11.877) -- -- -- (-15.836) # of modular additions 17 18 19 20 21 22 23 24 Experimental value -16.669 -17.634 -18.580 -19.530 -20.495 -21.446 -22.417 -23.415 Theoretical value -- -- -- (-19.795) -- -- -- (-23.754) The experimental values are not always correct because we could not execute an exhaustive search. n They are considered to be sufficiently accurate as rough estimation. -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Outline of the Talk 28 1. Preliminaries n Salsa stream cipher n Rotational Cryptanalysis 2. Rotational Cryptanalysis of the Salsa Core Function n Experimental Observations n Our lemmas, theorem, and prediction n Experimental Verifications 3. A Weakness of the Salsa Permutation 4. Conclusion -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Salsa stream cipher 29 A Weakness of the Salsa Permutation (1/5) -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Salsa stream cipher 30 A Weakness of the Salsa Permutation (2/5) By simply counting the number of the Salsa core functions, the rotational probability of the Salsa permutation can be computed based on Prediction 1. n ๐2 = ๐!๐.๐๐๐ from Theorem 2. Salsa permutation comprises four Salsa core functions in each round. n The rotational probability of the ๐ -round Salsa is ๐2 ๐๐น = ๐!๐.๐๐๐ ๐๐น . -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function ChaCha stream cipher 31 A Weakness of the Salsa Permutation (3/5) -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function ChaCha stream cipher 32 A Weakness of the Salsa Permutation (4/5) According to the study in [KNP+15], the ๐ -round ChaCha permutation has exactly 8 chains of 2๐น modular additions in each chain. n The rotational probability of the ๐ -round ChaCha permutation can be obtained from Lemme 2 (chained modular addition). -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Rotational Distinguisher for the Salsa/ChaCha Permutations 33 A Weakness of the Salsa Permutation (5/5) Table 5. A comparison of the rotational probabilities (log2 ) of the Salsa and ChaCha permutations when the rotation amount is r = 1. # of rounds 1 2 3 4 5 6 Salsa permutation -15.836 -31.672 -47.508 -63.344 -79.180 -95.016 ChaCha permutation -28.800 -74.400 -130.400 -192.800 -261.600 -333.600 # of rounds 7 8 9 10 11 12 Salsa permutation -110.852 -126.688 -142.524 -158.630 -174.196 -190.032 ChaCha permutation -410.400 -489.600 -571.200 -656.000 -743.200 -832.000 Rotational Distinguisher for ChaCha permutation n 8 rounds (with 8 chains of 16 modular additions): ๐%๐๐.๐ ๐ = ๐%๐๐๐.๐ > 2%1!".2 Rotational Distinguisher for Salsa permutation n 32 rounds (with 128 Salsa core functions): ๐%๐.๐๐๐ ๐ร๐๐ = ๐%๐๐๐.๐๐๐ > 2%1!".2 -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Outline of the Talk 34 1. Preliminaries n Salsa stream cipher n Rotational Cryptanalysis 2. Rotational Cryptanalysis of the Salsa Core Function n Experimental Observations n Our lemmas, theorem, and prediction n Experimental Verifications 3. A Weakness of the Salsa Permutation 4. Conclusion -
Ryoma Ito (NICT, Japan) December 17, 2020 Rotational Cryptanalysis of
Salsa Core Function Summary of Our Results 35 Conclusion Rotational Distinguisher* for Salsa/ChaCha Permutations** Table 1. A comparison between the previous and our results (r = 1). โปlog2 # of modular additions 1 2 3 4 5 6 7 8 [KN10, Theorem 2] -1.4 -2.8 -4.2 -5.7 -7.1 -8.5 -9.9 -11.3 [KNP+15, Lemma 2] -1.4 -3.6 -6.3 -9.3 -12.7 -16.3 -20.1 -24.1 Experimental results -1.415 -2.263 -3.263 -4.206 -5.169 -6.126 -7.086 -8.043 Theoretical results -1.415 -2.263 -3.111 -3.959 -7.918 Rotational Probabilities of Salsa-type ARX Primitive *Distinguisher is to distinguish the cipher from a random function/permutation. **The permutations can allow us to set the arbitrary input values. Table 2. A comparison of the rotational distinguisher for Salsa/ChaCha permutations. # of rounds Probability (log2 ) Ref Salsa permutation 32 -506.752 (< -512.0) ChaCha permutation 8 -489.6 (< -512.0) 17 -487.6 (< -512.0) [ePrint]