Skip to content
Snippets Groups Projects
Commit 1d61a36e authored by Niels Möller's avatar Niels Möller
Browse files

* testsuite/cbc-test.m4: Record intermediate values in a comment.

* testsuite/des3-test.m4: Likewise.

Rev: src/nettle/testsuite/cbc-test.m4:1.2
Rev: src/nettle/testsuite/des3-test.m4:1.2
parent 887e00e8
Branches
Tags
No related merge requests found
...@@ -10,6 +10,16 @@ uint8_t cipher[2 * AES_BLOCK_SIZE]; ...@@ -10,6 +10,16 @@ uint8_t cipher[2 * AES_BLOCK_SIZE];
uint8_t clear[2 * AES_BLOCK_SIZE]; uint8_t clear[2 * AES_BLOCK_SIZE];
uint8_t iv[AES_BLOCK_SIZE]; uint8_t iv[AES_BLOCK_SIZE];
/* Intermediate values:
* iv XOR first message block:
* "a5 ce 55 d4 21 15 a1 c6 4a a4 0c b2 ca a6 d1 37"
* First ciphertext block, c1:
* "1f 94 fc 85 f2 36 21 06 4a ea e3 c9 cc 38 01 0e"
* c1 XOR second message block:
* "3f e0 94 ec 81 16 4e 68 26 93 c3 a6 a2 5b 64 2f"
* Second ciphertext block, c1:
* "7b f6 5f c5 02 59 2e 71 af bf 34 87 c0 36 2a 16"
*/
H(iv, "e9 a7 26 a0 44 7b 8d e6 03 83 60 de ea d5 b0 4e"); H(iv, "e9 a7 26 a0 44 7b 8d e6 03 83 60 de ea d5 b0 4e");
aes_set_key(&ctx.ctx, 32, H("8d ae 93 ff fc 78 c9 44" aes_set_key(&ctx.ctx, 32, H("8d ae 93 ff fc 78 c9 44"
"2a bd 0c 1e 68 bc a6 c7" "2a bd 0c 1e 68 bc a6 c7"
......
...@@ -8,8 +8,9 @@ uint8_t msg[DES3_BLOCK_SIZE] = "Now is t"; ...@@ -8,8 +8,9 @@ uint8_t msg[DES3_BLOCK_SIZE] = "Now is t";
uint8_t cipher[DES3_BLOCK_SIZE]; uint8_t cipher[DES3_BLOCK_SIZE];
uint8_t clear[DES3_BLOCK_SIZE]; uint8_t clear[DES3_BLOCK_SIZE];
/* Intermediate values: "cd ea 2a 20 c2 e0 9e 48" /* Intermediate values:
* "69 52 6e 95 8b ea 49 bd" * After first DES encryption: "cd ea 2a 20 c2 e0 9e 48"
* After second DES decryption: "69 52 6e 95 8b ea 49 bd"
*/ */
if (!des3_set_key(&ctx, H("3e 0b 10 b0 5d 49 c2 54" if (!des3_set_key(&ctx, H("3e 0b 10 b0 5d 49 c2 54"
"6b 46 e0 75 8a 91 61 85" "6b 46 e0 75 8a 91 61 85"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment