A chosen plaintext attack on SILC and CLOC Hassan Sadeghi, Javad Alizadeh November 7, 2014
Abstract SILC and CLOC are two submissions to the CAESAR competition with similar constructions. In this note we show SILC and CLOC don’t provide IND-CPA. Keywords: SILC, CLOC, IND-CPA.
1
Introduction
IND-CPA [1] security is a security definition for private- or public-key encryption schemes. At a high level, IND-CPA security means that no adversary can distinguish between encryptions of different messages, even when allowed to make encryptions on its own. Definition 1.1. IND-CPA (for private-key encryption) Let A be an adversary, which we model as an arbitrary non-uniform PPT machine (polynomial in the implicit security parameter of the encryption scheme). We define the following experiment/game played against A: 1. We (privately) choose a key K according to the key generation algorithm K ← KeyGen 2. We (privately) choose a random bit b ← {0, 1} 3. Repeatedly do: . A is allowed to query an oracle that computes the functionality EncK . Challenge: A outputs two messages, M0 and M1 . Response: We give A the ciphertext Enc(Mb ]) 4. A outputs b0 (i.e, a guess for our b) We say that the advantage of A in this experiment is P r(b = b0 ) − 12 . In this note we present an adversary for this experiment/game on SILC and CLOC that it’s advantage is not negligible. First, for clarity of notation, we will describe SILC and CLOC by initial information.
2
SILC and CLOC
SILC [2] and CLOC [3] are two blockcipher modes of operation for authenticated encryption with associated data (AEAD). SILC is built upon CLOC cipher. SILC and ClOC 1
Figure 1: Pseudocode of the encryption and the decryption algorithms of SILC
Figure 2: Subroutines used in the encryption and decryption algorithms of SILC
Figure 3: Pseudocode of the encryption and the decryption algorithms of CLOC
2
Figure 4: Subroutines used in the encryption and decryption algorithms of CLOC take three parameters, a blockcipher E, a nonce length lN and a tag length τ where lN and τ in bits. Procedures of the encryption and the decryption of SILC and CLOC are explained in figures (1) and (3). In these algorithms, we use four subroutines, HASH, PRF, ENC, and DEC that are defined in in figures (2) and (4).In this not we use only function f ix1 that is defined f ix1(X) := X ∨ 10n−1
3
chosen plaintext attack
In this section we present adversary B for experiment/game of IND-CPA as follow: ˜ [1]||M ˜ [2]...||M ˜ [n] First adversary B outputs two massages M0 = M [1]||M [2]...||M [n] and M1 = M such that for all 1 < i, j < n ˜ [i] ⊕ M ˜ [j], M [i] ⊕ M [j] 6= M
M [i] ⊕ M [j] ∈ / {0n , 10n−1 },
˜ [i] ⊕ M ˜ [j] ∈ M / {0n , 10n−1 }.
We (privately) choose a key K, a nonce N, an associated data A and a random bit b ← {0, 1} then we give adversary B the ciphertext C = C[1]||C[2]||...C[n] where (C, T ) = SILCξ (N, A, Mb ) (C, T ) = CLOCξ (N, A, Mb ) .
3
Adversary B examines C in three distinct cases: Case1 : ∃ 1 ≤ i, j ≤ (n − 1); C[i] = C[j] or C[i] ⊕ C[j] = 10n−1 In this case we have f ix1(C[i]) = f ix1(C[j]) so we have ˜ [i + 1] ⊕ M ˜ [j + 1] C[i + 1] ⊕ C[j + 1] = M [i + 1] ⊕ M [j + 1] or C[i + 1] ⊕ C[j + 1] = M If C[i + 1] ⊕ C[j + 1] = M [i + 1] ⊕ M [j + 1] then M0 is plaintext of C and adversary B outputs b0 = b = 0 else M1 is plaintext of C and B outputs b0 = b = 1. Case2 : ∃ 2 ≤ i, j ≤ n; C[i] ⊕ C[j] = M[i] ⊕ M[j] If case 1 did not occur then M1 will be plaintext of C because if M0 be plaintext of C by C[i]⊕C[j] = M [i]⊕M [j] we conclude SE [i] = SE [j] and f ix1(C[i−1]) = f ix1(C[j −1]), equivalently C[i − 1] = C[j − 1], C[i − 1] ⊕ C[j − 1] = 10n−1 while we had assumed case1 does not befall so adversary B outputs b0 = b = 1 ˜ ⊕ M[j] ˜ Case3 : ∃ 2 ≤ i, j ≤ n; C[i] ⊕ C[j] = M[i] By similar proving in case2 adversary finds M0 is plaintext of C and outputs b0 = b = 0. Final operation: ˆ and puts Cˆm := If Case1 ,Case2 and Case3 did not occur adversary chooses a key K EKˆ (f ix1(C[m])) and examines C in the following distinct two cases: ˆ = C[i + 1] ⊕ M[i + 1] FirstCase : ∃ 1 ≤ i ≤ n − 1; C[i] ˆ = C[i + 1] ⊕ M [i + 1] we conclude E ˆ (f ix1(C[i])) = If M0 be plaintext of C then by C[i] K ˆ so for j = 1 to n − 1 we must have EK (f ix1(C[i])) and K = K ˆ = C[j + 1] ⊕ M [j + 1] C[j]
(1)
If (1) did not occur then adversary outputs b0 = b = 1. ˆ = C[i + 1] ⊕ M[i ˜ + 1] SecondCase : ∃ 1 ≤ i ≤ n − 1; C[i] ˆ ˜ If M1 be plaintext of C then by C[i] = C[i + 1] ⊕ M [i + 1] we conclude EKˆ (f ix1(C[i])) = ˆ so for j = 1 to n − 1 we must have EK (f ix1(C[i])) and K = K ˆ = C[j + 1] ⊕ M ˜ [j + 1] C[j]
(2)
If (2) did not occur then adversary outputs b0 = b = 0. If first case and second case did not occurred adversary repeat final operation by choosing another key. Now, we compute the advantage of adversary B. Probability of occurrence case1 is 2C(n − 1, 2)2−128 and probability of occurrence case2 and case3 is 2C(n − 1, 2)2−128 and if adversary repeat final operation in m times, probability of victory of adversary is 2m(n − 1)2−128 so advantage of adversary B is Adv(B) = pr(b = b0 ) −
1 = 4C(n − 1, 2)2−128 + 2m(n − 1)2−128 2
where m is number of frequency of final operation. 4
4
conclusion
in this note we conclude SILC and CLOC are not indistinguishable against chosen plaintext attack and there exist adversaries can distinguish between encryptions of different messages.
References [1] S. Goldwasser and S. Micali. Probabilistic encryption. Journal of Computer and System Sciences, 28:270-299, 1984. [2] Tetsu Iwata, Kazuhiko Minematsu, Jian Guo, Sumio Morioka, Eita Kobayashi, SILC v1. CEASAR Cryptographic Competitions, 2014. http://competitions.cr.yp.to/round1/silcv1.pdf. [3] Tetsu Iwata, Kazuhiko Minematsu, Jian Guo, Sumio Morioka, Eita Kobayashi, CLOC v1. CEASAR Cryptographic Competitions, 2014. http://competitions.cr.yp.to/round1/clocv1.pdf.
Hassan Sadeghi Department of Mathematics, Faculty of Science University of Qom Qom. Iran Email:
[email protected]
5