|
Algorithm 2 The proposed chosen-ciphertext attack |
-
Input:
The ciphertext C of size
-
Output:
The plaintext P of C
-
1:
// step1: construct ciphertext-plaintext pairs and compute the differentials respectively
-
2:
= rand;
-
3:
= decrypt;
-
4:
for to do
-
5:
// construct ciphertexts and obtain the corresponding plaintexts
-
6:
= JolfaeiAlgorithmGeneration(i);
-
7:
= diffusionAttack;
-
8:
;
-
9:
= decrypt;
-
10:
// compute differentials of plaintexts
-
11:
;
-
12:
end for
-
13:
// step2: get the equivalent permutation matrix by the differential of plaintexts and intermediate differential results
-
14:
for to do
-
15:
JolfaeiAlgorithmAdd;
-
16:
end for
-
17:
= JolfaeiAlgorithm();
-
18:
// step3: obtain an intermediate result with the permutation matrix
-
19:
= permute;
-
20:
// step4: obtain the equivalent key stream matrix of the diffusion process from the intermediate results and the corresponding ciphertext.
-
21:
diffusionAttack;
-
22:
// step5: recover the plaintext of the target ciphertext with the equivalent key stream elements
-
23:
= inverseDiffusionAttack;
-
24:
P = inversePermute;
|