Skip to content

Commit b9764fd

Browse files
ThePassionatexiaoxiang781216
authored andcommitted
testing/aesctr: counter block should be initially set to one.
According to RFC-3686, the least significant 32 bits of the counter block are initially set to one in ctr mode of aes. Signed-off-by: makejian <[email protected]>
1 parent 4cc575e commit b9764fd

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

testing/crypto/aesctr.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static tests[] =
5959
{
6060
"ae 68 52 f8 12 10 67 cc 4b f7 a5 76 55 77 f3 9e "
6161
"00 00 00 30",
62-
"00 00 00 00 00 00 00 00",
62+
"00 00 00 00 00 00 00 00 00 00 00 01",
6363
"53 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d 73 67",
6464
"e4 09 5d 4f b7 a7 b3 79 2d 61 75 a3 26 13 11 b8"
6565
}
@@ -68,7 +68,7 @@ static tests[] =
6868
{
6969
"7e 24 06 78 17 fa e0 d7 43 d6 ce 1f 32 53 91 63 "
7070
"00 6c b6 db",
71-
"c0 54 3b 59 da 48 d9 0b",
71+
"c0 54 3b 59 da 48 d9 0b 00 00 00 01",
7272
"00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f "
7373
"10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f",
7474
"51 04 a1 06 16 8a 72 d9 79 0d 41 ee 8e da d3 88 "
@@ -79,7 +79,7 @@ static tests[] =
7979
{
8080
"76 91 be 03 5e 50 20 a8 ac 6e 61 85 29 f9 a0 dc "
8181
"00 e0 01 7b",
82-
"27 77 7f 3f 4a 17 86 f0",
82+
"27 77 7f 3f 4a 17 86 f0 00 00 00 01",
8383
"00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f "
8484
"10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f"
8585
/* "20 21 22 23" */,
@@ -98,7 +98,7 @@ static tests[] =
9898
"16 af 5b 14 5f c9 f5 79 c1 75 f9 3e 3b fb 0e ed "
9999
"86 3d 06 cc fd b7 85 15 "
100100
"00 00 00 48",
101-
"36 73 3c 14 7d 6d 93 cb",
101+
"36 73 3c 14 7d 6d 93 cb 00 00 00 01",
102102
"53 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d 73 67",
103103
"4b 55 38 4f e2 59 c9 c8 4e 79 35 a0 03 cb e9 28",
104104
}
@@ -108,7 +108,7 @@ static tests[] =
108108
"7c 5c b2 40 1b 3d c3 3c 19 e7 34 08 19 e0 f6 9c "
109109
"67 8c 3d b8 e6 f6 a9 1a "
110110
"00 96 b0 3b",
111-
"02 0c 6e ad c2 cb 50 0d",
111+
"02 0c 6e ad c2 cb 50 0d 00 00 00 01",
112112
"00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f "
113113
"10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f",
114114
"45 32 43 fc 60 9b 23 32 7e df aa fa 71 31 cd 9f "
@@ -120,7 +120,7 @@ static tests[] =
120120
"02 bf 39 1e e8 ec b1 59 b9 59 61 7b 09 65 27 9b "
121121
"f5 9b 60 a7 86 d3 e0 fe "
122122
"00 07 bd fd",
123-
"5c bd 60 27 8d cc 09 12",
123+
"5c bd 60 27 8d cc 09 12 00 00 00 01",
124124
"00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f "
125125
"10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f"
126126
/* "20 21 22 23" */,
@@ -138,7 +138,7 @@ static tests[] =
138138
"77 6b ef f2 85 1d b0 6f 4c 8a 05 42 c8 69 6f 6c "
139139
"6a 81 af 1e ec 96 b4 d3 7f c1 d6 89 e6 c1 c1 04 "
140140
"00 00 00 60",
141-
"db 56 72 c9 7a a8 f0 b2",
141+
"db 56 72 c9 7a a8 f0 b2 00 00 00 01",
142142
"53 69 6e 67 6c 65 20 62 6c 6f 63 6b 20 6d 73 67",
143143
"14 5a d0 1d bf 82 4e c7 56 08 63 dc 71 e3 e0 c0"
144144
}
@@ -148,7 +148,7 @@ static tests[] =
148148
"f6 d6 6d 6b d5 2d 59 bb 07 96 36 58 79 ef f8 86 "
149149
"c6 6d d5 1a 5b 6a 99 74 4b 50 59 0c 87 a2 38 84 "
150150
"00 fa ac 24",
151-
"c1 58 5e f1 5a 43 d8 75",
151+
"c1 58 5e f1 5a 43 d8 75 00 00 00 01",
152152
"00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f "
153153
"10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f",
154154
"f0 5e 23 1b 38 94 61 2c 49 ee 00 0b 80 4e b2 a9 "
@@ -160,7 +160,7 @@ static tests[] =
160160
"ff 7a 61 7c e6 91 48 e4 f1 72 6e 2f 43 58 1d e2 "
161161
"aa 62 d9 f8 05 53 2e df f1 ee d6 87 fb 54 15 3d "
162162
"00 1c c5 b7",
163-
"51 a5 1d 70 a1 c1 11 48",
163+
"51 a5 1d 70 a1 c1 11 48 00 00 00 01",
164164
"00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f "
165165
"10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f"
166166
/* "20 21 22 23" */,

0 commit comments

Comments
 (0)