1Cipher list
2mbedtls_cipher_list:
3
4Set padding with AES-CBC
5depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7
6set_padding:MBEDTLS_CIPHER_AES_128_CBC:MBEDTLS_PADDING_PKCS7:0
7
8Set padding with AES-CFB
9depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CFB
10set_padding:MBEDTLS_CIPHER_AES_128_CFB128:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
11
12Set padding with AES-CTR
13depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CTR
14set_padding:MBEDTLS_CIPHER_AES_128_CTR:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
15
16Set padding with CAMELLIA-CBC
17depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7
18set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CBC:MBEDTLS_PADDING_PKCS7:0
19
20Set padding with CAMELLIA-CFB
21depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CFB
22set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CFB128:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
23
24Set padding with CAMELLIA-CTR
25depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CTR
26set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CTR:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
27
28Set padding with DES-CBC
29depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC:MBEDTLS_CIPHER_PADDING_PKCS7
30set_padding:MBEDTLS_CIPHER_DES_CBC:MBEDTLS_PADDING_PKCS7:0
31
32Set padding with NULL
33depends_on:MBEDTLS_CIPHER_NULL_CIPHER
34set_padding:MBEDTLS_CIPHER_NULL:MBEDTLS_PADDING_PKCS7:MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA
35
36Set non-existent padding with AES-CBC
37depends_on:MBEDTLS_AES_C:MBEDTLS_CIPHER_MODE_CBC
38set_padding:MBEDTLS_CIPHER_AES_128_CBC:-1:MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE
39
40Set non-existent padding with CAMELLIA-CBC
41depends_on:MBEDTLS_CAMELLIA_C:MBEDTLS_CIPHER_MODE_CBC
42set_padding:MBEDTLS_CIPHER_CAMELLIA_128_CBC:-1:MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE
43
44Set non-existent padding with DES-CBC
45depends_on:MBEDTLS_DES_C:MBEDTLS_CIPHER_MODE_CBC
46set_padding:MBEDTLS_CIPHER_DES_CBC:-1:MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE
47
48Check PKCS padding #1 (correct)
49depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
50check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0004040404":0:4
51
52Check PKCS padding #2 (correct)
53depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
54check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0001":0:4
55
56Check PKCS padding #3 (correct)
57depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
58check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD000101":0:5
59
60Check PKCS padding #4 (correct)
61depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
62check_padding:MBEDTLS_PADDING_PKCS7:"030303":0:0
63
64Check PKCS padding #5 (null padding)
65depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
66check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0000":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
67
68Check PKCS padding #6 (too few padding bytes)
69depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
70check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD0002":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
71
72Check PKCS padding #7 (non-uniform padding bytes #1)
73depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
74check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030203":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
75
76Check PKCS padding #7 (non-uniform padding bytes #2)
77depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
78check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030103":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
79
80Check PKCS padding #7 (non-uniform padding bytes #3)
81depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
82check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030703":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
83
84Check PKCS padding #7 (non-uniform padding bytes #4)
85depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
86check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00030b03":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
87
88Check PKCS padding #7 (non-uniform padding bytes #5)
89depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
90check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00031303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
91
92Check PKCS padding #7 (non-uniform padding bytes #6)
93depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
94check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00032303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
95
96Check PKCS padding #7 (non-uniform padding bytes #7)
97depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
98check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00034203":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
99
100Check PKCS padding #7 (non-uniform padding bytes #8)
101depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
102check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00038303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
103
104Check PKCS padding #7 (non-uniform padding bytes #9)
105depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
106check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00020303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
107
108Check PKCS padding #7 (non-uniform padding bytes #10)
109depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
110check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00010303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
111
112Check PKCS padding #7 (non-uniform padding bytes #11)
113depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
114check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00070303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
115
116Check PKCS padding #7 (non-uniform padding bytes #12)
117depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
118check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD000b0303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
119
120Check PKCS padding #7 (non-uniform padding bytes #13)
121depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
122check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00130303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
123
124Check PKCS padding #7 (non-uniform padding bytes #14)
125depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
126check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00230303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
127
128Check PKCS padding #7 (non-uniform padding bytes #15)
129depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
130check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00420303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
131
132Check PKCS padding #7 (non-uniform padding bytes #16)
133depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
134check_padding:MBEDTLS_PADDING_PKCS7:"DABBAD00830303":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
135
136Check PKCS padding #8 (overlong)
137depends_on:MBEDTLS_CIPHER_PADDING_PKCS7
138check_padding:MBEDTLS_PADDING_PKCS7:"040404":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
139
140Check one and zeros padding #1 (correct)
141depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
142check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD0080":0:4
143
144Check one and zeros padding #2 (correct)
145depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
146check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD008000":0:4
147
148Check one and zeros padding #3 (correct)
149depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
150check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD00800000":0:4
151
152Check one and zeros padding #4 (correct)
153depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
154check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD00808000":0:5
155
156Check one and zeros padding #5 (correct)
157depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
158check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"800000":0:0
159
160Check one and zeros padding #6 (missing one)
161depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
162check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"DABBAD0000":MBEDTLS_ERR_CIPHER_INVALID_PADDING:4
163
164Check one and zeros padding #7 (overlong)
165depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
166check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"0000000000":MBEDTLS_ERR_CIPHER_INVALID_PADDING:4
167
168Check one and zeros padding #8 (last byte 0x80 | x)
169depends_on:MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
170check_padding:MBEDTLS_PADDING_ONE_AND_ZEROS:"0000000082":MBEDTLS_ERR_CIPHER_INVALID_PADDING:4
171
172Check zeros and len padding #1 (correct)
173depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
174check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD0001":0:4
175
176Check zeros and len padding #2 (correct)
177depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
178check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD000002":0:4
179
180Check zeros and len padding #3 (correct)
181depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
182check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD000003":0:3
183
184Check zeros and len padding #4 (correct)
185depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
186check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"000003":0:0
187
188Check zeros and len padding #5 (overlong)
189depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
190check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"000004":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
191
192Check zeros and len padding #6 (not enough zeros)
193depends_on:MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
194check_padding:MBEDTLS_PADDING_ZEROS_AND_LEN:"DABBAD000004":MBEDTLS_ERR_CIPHER_INVALID_PADDING:0
195
196Check zeros padding #1 (correct)
197depends_on:MBEDTLS_CIPHER_PADDING_ZEROS
198check_padding:MBEDTLS_PADDING_ZEROS:"DABBAD00":0:3
199
200Check zeros padding #2 (correct)
201depends_on:MBEDTLS_CIPHER_PADDING_ZEROS
202check_padding:MBEDTLS_PADDING_ZEROS:"DABBAD0000":0:3
203
204Check zeros padding #3 (correct)
205depends_on:MBEDTLS_CIPHER_PADDING_ZEROS
206check_padding:MBEDTLS_PADDING_ZEROS:"DABBAD":0:3
207
208Check zeros padding #4 (correct)
209depends_on:MBEDTLS_CIPHER_PADDING_ZEROS
210check_padding:MBEDTLS_PADDING_ZEROS:"000000":0:0
211
212Check no padding #1 (correct by definition)
213check_padding:MBEDTLS_PADDING_NONE:"DABBAD00":0:4
214
215Check no padding #2 (correct by definition)
216check_padding:MBEDTLS_PADDING_NONE:"DABBAD0001":0:5
217
218Check no padding #3 (correct by definition)
219check_padding:MBEDTLS_PADDING_NONE:"":0:0
220