blob: dc4c9d70b5611115a8e9bd2042a4e78949cbea9b [file] [log] [blame]
Manuel Pégourié-Gonnard66dfc5a2014-03-29 16:10:55 +01001Cipher list
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02002mbedtls_cipher_list:
Manuel Pégourié-Gonnard66dfc5a2014-03-29 16:10:55 +01003
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +02004Set padding with AES-CBC
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02005depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7
6set_padding:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_PKCS7:0
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +02007
8Set padding with AES-CFB
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +02009depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB
10set_padding:MBEDTLS_CIPHER_AES_128_CFB128:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020011
12Set padding with AES-CTR
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020013depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR
14set_padding:MBEDTLS_CIPHER_AES_128_CTR:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020015
16Set padding with CAMELLIA-CBC
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020017depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7
18set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_PKCS7:0
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020019
20Set padding with CAMELLIA-CFB
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020021depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB
22set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020023
24Set padding with CAMELLIA-CTR
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020025depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR
26set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CTR:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020027
28Set padding with DES-CBC
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020029depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7
30set_padding:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_PKCS7:0
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020031
32Set padding with BLOWFISH-CBC
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020033depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7
34set_padding:MBEDTLS_CIPHER_BLOWFISH_CBC:MBEDTLS_PADDING_PKCS7:0
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020035
36Set padding with BLOWFISH-CFB
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020037depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CFB
38set_padding:MBEDTLS_CIPHER_BLOWFISH_CFB64:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020039
40Set padding with BLOWFISH-CTR
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020041depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CTR
42set_padding:MBEDTLS_CIPHER_BLOWFISH_CTR:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020043
44Set padding with NULL
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020045depends_on:MBEDTLS_CIPHER_NULL_CIPHER
46set_padding:MBEDTLS_CIPHER_NULL:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020047
48Set non-existent padding with AES-CBC
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020049depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
50set_padding:MBEDTLS_CIPHER_AES_128_CBC:-1:MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020051
52Set non-existent padding with CAMELLIA-CBC
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020053depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC
54set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CBC:-1:MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020055
56Set non-existent padding with DES-CBC
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020057depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC
58set_padding:MBEDTLS_CIPHER_DES_CBC:-1:MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE
Manuel Pégourié-Gonnardd5fdcaf2013-07-24 18:05:00 +020059
60Set non-existent padding with BLOWFISH-CBC
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020061depends_on:MBEDTLS_BLOWFISH_C:MBEDTLS_CIPHER_MODE_CBC
62set_padding:MBEDTLS_CIPHER_BLOWFISH_CBC:-1:MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE
Manuel Pégourié-Gonnarda6408492013-07-26 10:55:02 +020063
64Check PKCS padding #1 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020065depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
66check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0004040404":0:4
Manuel Pégourié-Gonnarda6408492013-07-26 10:55:02 +020067
68Check PKCS padding #2 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020069depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
70check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0001":0:4
Manuel Pégourié-Gonnarda6408492013-07-26 10:55:02 +020071
72Check PKCS padding #3 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020073depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
74check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD000101":0:5
Manuel Pégourié-Gonnarda6408492013-07-26 10:55:02 +020075
76Check PKCS padding #4 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020077depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
78check_padding:MBEDTLS_PADDING_PKCS7:"030303":0:0
Manuel Pégourié-Gonnarda6408492013-07-26 10:55:02 +020079
80Check PKCS padding #5 (null padding)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020081depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
82check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0000":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnarda6408492013-07-26 10:55:02 +020083
84Check PKCS padding #6 (too few padding bytes)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020085depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
86check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0002":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnarda6408492013-07-26 10:55:02 +020087
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +010088Check PKCS padding #7 (non-uniform padding bytes #1)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020089depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
90check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030203":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnarda6408492013-07-26 10:55:02 +020091
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +010092Check PKCS padding #7 (non-uniform padding bytes #2)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020093depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
94check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030103":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +010095
96Check PKCS padding #7 (non-uniform padding bytes #3)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +020097depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
98check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030703":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +010099
100Check PKCS padding #7 (non-uniform padding bytes #4)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200101depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
102check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030b03":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100103
104Check PKCS padding #7 (non-uniform padding bytes #5)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200105depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
106check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00031303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100107
108Check PKCS padding #7 (non-uniform padding bytes #6)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200109depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
110check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00032303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100111
112Check PKCS padding #7 (non-uniform padding bytes #7)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200113depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
114check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00034203":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100115
116Check PKCS padding #7 (non-uniform padding bytes #8)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200117depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
118check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00038303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100119
120Check PKCS padding #7 (non-uniform padding bytes #9)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200121depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
122check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00020303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100123
124Check PKCS padding #7 (non-uniform padding bytes #10)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200125depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
126check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00010303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100127
128Check PKCS padding #7 (non-uniform padding bytes #11)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200129depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
130check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00070303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100131
132Check PKCS padding #7 (non-uniform padding bytes #12)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200133depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
134check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD000b0303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100135
136Check PKCS padding #7 (non-uniform padding bytes #13)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200137depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
138check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00130303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100139
140Check PKCS padding #7 (non-uniform padding bytes #14)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200141depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
142check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00230303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100143
144Check PKCS padding #7 (non-uniform padding bytes #15)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200145depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
146check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00420303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100147
148Check PKCS padding #7 (non-uniform padding bytes #16)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200149depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
150check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00830303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnardf8ab0692013-10-27 17:21:14 +0100151
Manuel Pégourié-Gonnarda6408492013-07-26 10:55:02 +0200152Check PKCS padding #8 (overlong)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200153depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
154check_padding:MBEDTLS_PADDING_PKCS7:"040404":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnard679f9e92013-07-26 12:46:02 +0200155
156Check one and zeros padding #1 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200157depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
158check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD0080":0:4
Manuel Pégourié-Gonnard679f9e92013-07-26 12:46:02 +0200159
160Check one and zeros padding #2 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200161depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
162check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD008000":0:4
Manuel Pégourié-Gonnard679f9e92013-07-26 12:46:02 +0200163
164Check one and zeros padding #3 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200165depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
166check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD00800000":0:4
Manuel Pégourié-Gonnard679f9e92013-07-26 12:46:02 +0200167
168Check one and zeros padding #4 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200169depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
170check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD00808000":0:5
Manuel Pégourié-Gonnard679f9e92013-07-26 12:46:02 +0200171
172Check one and zeros padding #5 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200173depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
174check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"800000":0:0
Manuel Pégourié-Gonnard679f9e92013-07-26 12:46:02 +0200175
176Check one and zeros padding #6 (missing one)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200177depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
178check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD0000":MBEDTLS_ERR_CIPHER_INVALID_PADDING:4
Manuel Pégourié-Gonnard679f9e92013-07-26 12:46:02 +0200179
180Check one and zeros padding #7 (overlong)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200181depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
182check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"0000000000":MBEDTLS_ERR_CIPHER_INVALID_PADDING:4
Manuel Pégourié-Gonnard8d4291b2013-07-26 14:55:18 +0200183
Micha Krausba8316f2017-12-23 23:40:08 +0100184Check one and zeros padding #8 (last byte 0x80 | x)
185depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
186check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"0000000082":MBEDTLS_ERR_CIPHER_INVALID_PADDING:4
187
Manuel Pégourié-Gonnard8d4291b2013-07-26 14:55:18 +0200188Check zeros and len padding #1 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200189depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
190check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD0001":0:4
Manuel Pégourié-Gonnard8d4291b2013-07-26 14:55:18 +0200191
192Check zeros and len padding #2 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200193depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
194check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD000002":0:4
Manuel Pégourié-Gonnard8d4291b2013-07-26 14:55:18 +0200195
196Check zeros and len padding #3 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200197depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
198check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD000003":0:3
Manuel Pégourié-Gonnard8d4291b2013-07-26 14:55:18 +0200199
200Check zeros and len padding #4 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200201depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
202check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"000003":0:0
Manuel Pégourié-Gonnard8d4291b2013-07-26 14:55:18 +0200203
204Check zeros and len padding #5 (overlong)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200205depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
206check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"000004":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnard8d4291b2013-07-26 14:55:18 +0200207
208Check zeros and len padding #6 (not enough zeros)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200209depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
210check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD000004":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
Manuel Pégourié-Gonnard0e7d2c02013-07-26 16:05:14 +0200211
212Check zeros padding #1 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200213depends_on:MBEDTLS_CIPHER_PADDING_ZEROS
214check_padding:MBEDTLS_PADDING_ZEROS:"DABBAD00":0:3
Manuel Pégourié-Gonnard0e7d2c02013-07-26 16:05:14 +0200215
216Check zeros padding #2 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200217depends_on:MBEDTLS_CIPHER_PADDING_ZEROS
218check_padding:MBEDTLS_PADDING_ZEROS:"DABBAD0000":0:3
Manuel Pégourié-Gonnard0e7d2c02013-07-26 16:05:14 +0200219
220Check zeros padding #3 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200221depends_on:MBEDTLS_CIPHER_PADDING_ZEROS
222check_padding:MBEDTLS_PADDING_ZEROS:"DABBAD":0:3
Manuel Pégourié-Gonnard0e7d2c02013-07-26 16:05:14 +0200223
224Check zeros padding #4 (correct)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200225depends_on:MBEDTLS_CIPHER_PADDING_ZEROS
226check_padding:MBEDTLS_PADDING_ZEROS:"000000":0:0
Manuel Pégourié-Gonnard0e7d2c02013-07-26 16:05:14 +0200227
228Check no padding #1 (correct by definition)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200229check_padding:MBEDTLS_PADDING_NONE:"DABBAD00":0:4
Manuel Pégourié-Gonnard0e7d2c02013-07-26 16:05:14 +0200230
231Check no padding #2 (correct by definition)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200232check_padding:MBEDTLS_PADDING_NONE:"DABBAD0001":0:5
Manuel Pégourié-Gonnard0e7d2c02013-07-26 16:05:14 +0200233
234Check no padding #3 (correct by definition)
Manuel Pégourié-Gonnard2cf5a7c2015-04-08 12:49:31 +0200235check_padding:MBEDTLS_PADDING_NONE:"":0:0