diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/testmgr.c | 15 | ||||
-rw-r--r-- | crypto/testmgr.h | 501 |
2 files changed, 516 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 3cfd8b05554c..ae33d3075ce7 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c | |||
@@ -2252,6 +2252,21 @@ static const struct alg_test_desc alg_test_descs[] = { | |||
2252 | } | 2252 | } |
2253 | } | 2253 | } |
2254 | }, { | 2254 | }, { |
2255 | .alg = "lrw(twofish)", | ||
2256 | .test = alg_test_skcipher, | ||
2257 | .suite = { | ||
2258 | .cipher = { | ||
2259 | .enc = { | ||
2260 | .vecs = tf_lrw_enc_tv_template, | ||
2261 | .count = TF_LRW_ENC_TEST_VECTORS | ||
2262 | }, | ||
2263 | .dec = { | ||
2264 | .vecs = tf_lrw_dec_tv_template, | ||
2265 | .count = TF_LRW_DEC_TEST_VECTORS | ||
2266 | } | ||
2267 | } | ||
2268 | } | ||
2269 | }, { | ||
2255 | .alg = "lzo", | 2270 | .alg = "lzo", |
2256 | .test = alg_test_comp, | 2271 | .test = alg_test_comp, |
2257 | .suite = { | 2272 | .suite = { |
diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 1f7c3fd064c0..4b887895c1e4 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h | |||
@@ -2717,6 +2717,8 @@ static struct cipher_testvec bf_ctr_dec_tv_template[] = { | |||
2717 | #define TF_CBC_DEC_TEST_VECTORS 5 | 2717 | #define TF_CBC_DEC_TEST_VECTORS 5 |
2718 | #define TF_CTR_ENC_TEST_VECTORS 2 | 2718 | #define TF_CTR_ENC_TEST_VECTORS 2 |
2719 | #define TF_CTR_DEC_TEST_VECTORS 2 | 2719 | #define TF_CTR_DEC_TEST_VECTORS 2 |
2720 | #define TF_LRW_ENC_TEST_VECTORS 8 | ||
2721 | #define TF_LRW_DEC_TEST_VECTORS 8 | ||
2720 | 2722 | ||
2721 | static struct cipher_testvec tf_enc_tv_template[] = { | 2723 | static struct cipher_testvec tf_enc_tv_template[] = { |
2722 | { | 2724 | { |
@@ -3092,6 +3094,505 @@ static struct cipher_testvec tf_ctr_dec_tv_template[] = { | |||
3092 | }, | 3094 | }, |
3093 | }; | 3095 | }; |
3094 | 3096 | ||
3097 | static struct cipher_testvec tf_lrw_enc_tv_template[] = { | ||
3098 | /* Generated from AES-LRW test vectors */ | ||
3099 | { | ||
3100 | .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d" | ||
3101 | "\x4c\x26\x84\x14\xb5\x68\x01\x85" | ||
3102 | "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03" | ||
3103 | "\xee\x5a\x83\x0c\xcc\x09\x4c\x87", | ||
3104 | .klen = 32, | ||
3105 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3106 | "\x00\x00\x00\x00\x00\x00\x00\x01", | ||
3107 | .input = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3108 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3109 | .ilen = 16, | ||
3110 | .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b" | ||
3111 | "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee", | ||
3112 | .rlen = 16, | ||
3113 | }, { | ||
3114 | .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c" | ||
3115 | "\xd7\x79\xe8\x0f\x54\x88\x79\x44" | ||
3116 | "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea" | ||
3117 | "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf", | ||
3118 | .klen = 32, | ||
3119 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3120 | "\x00\x00\x00\x00\x00\x00\x00\x02", | ||
3121 | .input = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3122 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3123 | .ilen = 16, | ||
3124 | .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9" | ||
3125 | "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd", | ||
3126 | .rlen = 16, | ||
3127 | }, { | ||
3128 | .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50" | ||
3129 | "\x30\xfe\x69\xe2\x37\x7f\x98\x47" | ||
3130 | "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6" | ||
3131 | "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f", | ||
3132 | .klen = 32, | ||
3133 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3134 | "\x00\x00\x00\x02\x00\x00\x00\x00", | ||
3135 | .input = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3136 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3137 | .ilen = 16, | ||
3138 | .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1" | ||
3139 | "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4", | ||
3140 | .rlen = 16, | ||
3141 | }, { | ||
3142 | .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15" | ||
3143 | "\x25\x83\xf7\x3c\x1f\x01\x28\x74" | ||
3144 | "\xca\xc6\xbc\x35\x4d\x4a\x65\x54" | ||
3145 | "\x90\xae\x61\xcf\x7b\xae\xbd\xcc" | ||
3146 | "\xad\xe4\x94\xc5\x4a\x29\xae\x70", | ||
3147 | .klen = 40, | ||
3148 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3149 | "\x00\x00\x00\x00\x00\x00\x00\x01", | ||
3150 | .input = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3151 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3152 | .ilen = 16, | ||
3153 | .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c" | ||
3154 | "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5", | ||
3155 | .rlen = 16, | ||
3156 | }, { | ||
3157 | .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff" | ||
3158 | "\xf8\x86\xce\xac\x93\xc5\xad\xc6" | ||
3159 | "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd" | ||
3160 | "\x52\x13\xb2\xb7\xf0\xff\x11\xd8" | ||
3161 | "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f", | ||
3162 | .klen = 40, | ||
3163 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3164 | "\x00\x00\x00\x02\x00\x00\x00\x00", | ||
3165 | .input = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3166 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3167 | .ilen = 16, | ||
3168 | .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a" | ||
3169 | "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4", | ||
3170 | .rlen = 16, | ||
3171 | }, { | ||
3172 | .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c" | ||
3173 | "\x23\x84\xcb\x1c\x77\xd6\x19\x5d" | ||
3174 | "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21" | ||
3175 | "\xa7\x9c\x21\xf8\xcb\x90\x02\x89" | ||
3176 | "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1" | ||
3177 | "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e", | ||
3178 | .klen = 48, | ||
3179 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3180 | "\x00\x00\x00\x00\x00\x00\x00\x01", | ||
3181 | .input = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3182 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3183 | .ilen = 16, | ||
3184 | .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58" | ||
3185 | "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76", | ||
3186 | .rlen = 16, | ||
3187 | }, { | ||
3188 | .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d" | ||
3189 | "\xd4\x70\x98\x0b\xc7\x95\x84\xc8" | ||
3190 | "\xb2\xfb\x64\xce\x60\x97\x87\x8d" | ||
3191 | "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7" | ||
3192 | "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4" | ||
3193 | "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c", | ||
3194 | .klen = 48, | ||
3195 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3196 | "\x00\x00\x00\x02\x00\x00\x00\x00", | ||
3197 | .input = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3198 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3199 | .ilen = 16, | ||
3200 | .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75" | ||
3201 | "\x17\x66\x5e\x0c\x14\xa1\x3d\x40", | ||
3202 | .rlen = 16, | ||
3203 | }, { | ||
3204 | .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c" | ||
3205 | "\x23\x84\xcb\x1c\x77\xd6\x19\x5d" | ||
3206 | "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21" | ||
3207 | "\xa7\x9c\x21\xf8\xcb\x90\x02\x89" | ||
3208 | "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1" | ||
3209 | "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e", | ||
3210 | .klen = 48, | ||
3211 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3212 | "\x00\x00\x00\x00\x00\x00\x00\x01", | ||
3213 | .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac" | ||
3214 | "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c" | ||
3215 | "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8" | ||
3216 | "\x50\x38\x1f\x71\x49\xb6\x57\xd6" | ||
3217 | "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90" | ||
3218 | "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6" | ||
3219 | "\xad\x1e\x9e\x20\x5f\x38\xbe\x04" | ||
3220 | "\xda\x10\x8e\xed\xa2\xa4\x87\xab" | ||
3221 | "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c" | ||
3222 | "\xc9\xac\x42\x31\x95\x7c\xc9\x04" | ||
3223 | "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6" | ||
3224 | "\x15\xd7\x3f\x4f\x2f\x66\x69\x03" | ||
3225 | "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65" | ||
3226 | "\x4c\x96\x12\xed\x7c\x92\x03\x01" | ||
3227 | "\x6f\xbc\x35\x93\xac\xf1\x27\xf1" | ||
3228 | "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50" | ||
3229 | "\x89\xa4\x8e\x66\x44\x85\xcc\xfd" | ||
3230 | "\x33\x14\x70\xe3\x96\xb2\xc3\xd3" | ||
3231 | "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5" | ||
3232 | "\x2d\x64\x75\xdd\xb4\x54\xe6\x74" | ||
3233 | "\x8c\xd3\x9d\x9e\x86\xab\x51\x53" | ||
3234 | "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40" | ||
3235 | "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5" | ||
3236 | "\x76\x12\x73\x44\x1a\x56\xd7\x72" | ||
3237 | "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda" | ||
3238 | "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd" | ||
3239 | "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60" | ||
3240 | "\x1a\xe2\x70\x85\x58\xc2\x1b\x09" | ||
3241 | "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9" | ||
3242 | "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8" | ||
3243 | "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8" | ||
3244 | "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10" | ||
3245 | "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1" | ||
3246 | "\x90\x3e\x76\x4a\x74\xa4\x21\x2c" | ||
3247 | "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e" | ||
3248 | "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f" | ||
3249 | "\x8d\x23\x31\x74\x84\xeb\x88\x6e" | ||
3250 | "\xcc\xb9\xbc\x22\x83\x19\x07\x22" | ||
3251 | "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78" | ||
3252 | "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5" | ||
3253 | "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41" | ||
3254 | "\x3c\xce\x8f\x42\x60\x71\xa7\x75" | ||
3255 | "\x08\x40\x65\x8a\x82\xbf\xf5\x43" | ||
3256 | "\x71\x96\xa9\x4d\x44\x8a\x20\xbe" | ||
3257 | "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65" | ||
3258 | "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9" | ||
3259 | "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4" | ||
3260 | "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a" | ||
3261 | "\x62\x73\x65\xfd\x46\x63\x25\x3d" | ||
3262 | "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf" | ||
3263 | "\x24\xf3\xb4\xac\x64\xba\xdf\x4b" | ||
3264 | "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7" | ||
3265 | "\xc5\x68\x77\x84\x32\x2b\xcc\x85" | ||
3266 | "\x74\x96\xf0\x12\x77\x61\xb9\xeb" | ||
3267 | "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8" | ||
3268 | "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24" | ||
3269 | "\xda\x39\x87\x45\xc0\x2b\xbb\x01" | ||
3270 | "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce" | ||
3271 | "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6" | ||
3272 | "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32" | ||
3273 | "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45" | ||
3274 | "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6" | ||
3275 | "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4" | ||
3276 | "\x21\xc4\xc2\x75\x67\x89\x37\x0a", | ||
3277 | .ilen = 512, | ||
3278 | .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89" | ||
3279 | "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9" | ||
3280 | "\x08\xc3\x0d\xdd\x95\xab\x19\x96" | ||
3281 | "\x27\x52\x41\xc3\xca\xfb\xf6\xee" | ||
3282 | "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a" | ||
3283 | "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45" | ||
3284 | "\x42\xe9\x29\xc0\xb4\x07\xb4\x31" | ||
3285 | "\x66\x77\x72\xb5\xb6\xb3\x57\x46" | ||
3286 | "\x34\x9a\xfe\x03\xaf\x6b\x36\x07" | ||
3287 | "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d" | ||
3288 | "\xfb\x6d\x82\x51\xb6\x98\xd0\x71" | ||
3289 | "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d" | ||
3290 | "\x72\x2b\x54\x13\xe3\x6d\x79\x37" | ||
3291 | "\xa9\x39\x2c\xdf\x21\xab\x87\xd5" | ||
3292 | "\xee\xef\x9a\x12\x50\x39\x2e\x1b" | ||
3293 | "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac" | ||
3294 | "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08" | ||
3295 | "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25" | ||
3296 | "\x31\x9d\xef\xb1\x1d\x27\x55\x04" | ||
3297 | "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a" | ||
3298 | "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb" | ||
3299 | "\x26\xbe\x4f\x27\x04\x42\xd1\x44" | ||
3300 | "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf" | ||
3301 | "\x1d\x28\x14\xfd\xb1\x1a\x34\x18" | ||
3302 | "\xf5\x1e\x28\x69\x95\x6a\x5a\xba" | ||
3303 | "\x8e\xb2\x58\x1d\x28\x17\x13\x3d" | ||
3304 | "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8" | ||
3305 | "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b" | ||
3306 | "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a" | ||
3307 | "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a" | ||
3308 | "\x63\xa5\x99\x82\x09\x72\x8f\xc6" | ||
3309 | "\xa4\x62\x24\x69\x8c\x2d\x26\x00" | ||
3310 | "\x99\x83\x91\xd6\xc6\xcf\x57\x67" | ||
3311 | "\x38\xea\xf2\xfc\x29\xe0\x73\x39" | ||
3312 | "\xf9\x13\x94\x6d\xe2\x58\x28\x75" | ||
3313 | "\x3e\xae\x71\x90\x07\x70\x1c\x38" | ||
3314 | "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef" | ||
3315 | "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22" | ||
3316 | "\x82\x09\xe3\x18\x3f\x4f\x48\xfc" | ||
3317 | "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b" | ||
3318 | "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e" | ||
3319 | "\xc3\xac\x4a\xed\xe7\x82\xef\x31" | ||
3320 | "\x1f\x1a\x51\x1e\x29\x60\xc8\x98" | ||
3321 | "\x93\x51\x1d\x3d\x62\x59\x83\x82" | ||
3322 | "\x0c\xf1\xd7\x8d\xac\x33\x44\x81" | ||
3323 | "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4" | ||
3324 | "\xec\xdc\x24\xfd\x0e\x1a\x79\x94" | ||
3325 | "\x34\xb0\x62\xfa\x98\x49\x26\x1f" | ||
3326 | "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe" | ||
3327 | "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc" | ||
3328 | "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c" | ||
3329 | "\xdb\xf6\x21\x80\xf7\x5a\x37\x15" | ||
3330 | "\x0c\xe3\x36\xc8\x74\x75\x20\x91" | ||
3331 | "\xdf\x52\x2d\x0c\xe7\x45\xff\x46" | ||
3332 | "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6" | ||
3333 | "\x26\xa2\x5d\x7d\x61\xbf\x10\x46" | ||
3334 | "\x57\x8d\x05\x96\x70\x0b\xd6\x41" | ||
3335 | "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd" | ||
3336 | "\x5f\x92\x81\x6e\x35\x03\xd4\x72" | ||
3337 | "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23" | ||
3338 | "\x45\x5d\xec\x72\xc1\x52\xef\x2e" | ||
3339 | "\x81\x00\xd3\xfe\x4c\x3c\x05\x61" | ||
3340 | "\x80\x18\xc4\x6c\x03\xd3\xb7\xba" | ||
3341 | "\x11\xd7\xb8\x6e\xea\xe1\x80\x30", | ||
3342 | .rlen = 512, | ||
3343 | }, | ||
3344 | }; | ||
3345 | |||
3346 | static struct cipher_testvec tf_lrw_dec_tv_template[] = { | ||
3347 | /* Generated from AES-LRW test vectors */ | ||
3348 | /* same as enc vectors with input and result reversed */ | ||
3349 | { | ||
3350 | .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d" | ||
3351 | "\x4c\x26\x84\x14\xb5\x68\x01\x85" | ||
3352 | "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03" | ||
3353 | "\xee\x5a\x83\x0c\xcc\x09\x4c\x87", | ||
3354 | .klen = 32, | ||
3355 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3356 | "\x00\x00\x00\x00\x00\x00\x00\x01", | ||
3357 | .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b" | ||
3358 | "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee", | ||
3359 | .ilen = 16, | ||
3360 | .result = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3361 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3362 | .rlen = 16, | ||
3363 | }, { | ||
3364 | .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c" | ||
3365 | "\xd7\x79\xe8\x0f\x54\x88\x79\x44" | ||
3366 | "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea" | ||
3367 | "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf", | ||
3368 | .klen = 32, | ||
3369 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3370 | "\x00\x00\x00\x00\x00\x00\x00\x02", | ||
3371 | .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9" | ||
3372 | "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd", | ||
3373 | .ilen = 16, | ||
3374 | .result = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3375 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3376 | .rlen = 16, | ||
3377 | }, { | ||
3378 | .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50" | ||
3379 | "\x30\xfe\x69\xe2\x37\x7f\x98\x47" | ||
3380 | "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6" | ||
3381 | "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f", | ||
3382 | .klen = 32, | ||
3383 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3384 | "\x00\x00\x00\x02\x00\x00\x00\x00", | ||
3385 | .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1" | ||
3386 | "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4", | ||
3387 | .ilen = 16, | ||
3388 | .result = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3389 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3390 | .rlen = 16, | ||
3391 | }, { | ||
3392 | .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15" | ||
3393 | "\x25\x83\xf7\x3c\x1f\x01\x28\x74" | ||
3394 | "\xca\xc6\xbc\x35\x4d\x4a\x65\x54" | ||
3395 | "\x90\xae\x61\xcf\x7b\xae\xbd\xcc" | ||
3396 | "\xad\xe4\x94\xc5\x4a\x29\xae\x70", | ||
3397 | .klen = 40, | ||
3398 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3399 | "\x00\x00\x00\x00\x00\x00\x00\x01", | ||
3400 | .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c" | ||
3401 | "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5", | ||
3402 | .ilen = 16, | ||
3403 | .result = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3404 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3405 | .rlen = 16, | ||
3406 | }, { | ||
3407 | .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff" | ||
3408 | "\xf8\x86\xce\xac\x93\xc5\xad\xc6" | ||
3409 | "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd" | ||
3410 | "\x52\x13\xb2\xb7\xf0\xff\x11\xd8" | ||
3411 | "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f", | ||
3412 | .klen = 40, | ||
3413 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3414 | "\x00\x00\x00\x02\x00\x00\x00\x00", | ||
3415 | .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a" | ||
3416 | "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4", | ||
3417 | .ilen = 16, | ||
3418 | .result = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3419 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3420 | .rlen = 16, | ||
3421 | }, { | ||
3422 | .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c" | ||
3423 | "\x23\x84\xcb\x1c\x77\xd6\x19\x5d" | ||
3424 | "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21" | ||
3425 | "\xa7\x9c\x21\xf8\xcb\x90\x02\x89" | ||
3426 | "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1" | ||
3427 | "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e", | ||
3428 | .klen = 48, | ||
3429 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3430 | "\x00\x00\x00\x00\x00\x00\x00\x01", | ||
3431 | .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58" | ||
3432 | "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76", | ||
3433 | .ilen = 16, | ||
3434 | .result = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3435 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3436 | .rlen = 16, | ||
3437 | }, { | ||
3438 | .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d" | ||
3439 | "\xd4\x70\x98\x0b\xc7\x95\x84\xc8" | ||
3440 | "\xb2\xfb\x64\xce\x60\x97\x87\x8d" | ||
3441 | "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7" | ||
3442 | "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4" | ||
3443 | "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c", | ||
3444 | .klen = 48, | ||
3445 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3446 | "\x00\x00\x00\x02\x00\x00\x00\x00", | ||
3447 | .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75" | ||
3448 | "\x17\x66\x5e\x0c\x14\xa1\x3d\x40", | ||
3449 | .ilen = 16, | ||
3450 | .result = "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
3451 | "\x38\x39\x41\x42\x43\x44\x45\x46", | ||
3452 | .rlen = 16, | ||
3453 | }, { | ||
3454 | .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c" | ||
3455 | "\x23\x84\xcb\x1c\x77\xd6\x19\x5d" | ||
3456 | "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21" | ||
3457 | "\xa7\x9c\x21\xf8\xcb\x90\x02\x89" | ||
3458 | "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1" | ||
3459 | "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e", | ||
3460 | .klen = 48, | ||
3461 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
3462 | "\x00\x00\x00\x00\x00\x00\x00\x01", | ||
3463 | .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89" | ||
3464 | "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9" | ||
3465 | "\x08\xc3\x0d\xdd\x95\xab\x19\x96" | ||
3466 | "\x27\x52\x41\xc3\xca\xfb\xf6\xee" | ||
3467 | "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a" | ||
3468 | "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45" | ||
3469 | "\x42\xe9\x29\xc0\xb4\x07\xb4\x31" | ||
3470 | "\x66\x77\x72\xb5\xb6\xb3\x57\x46" | ||
3471 | "\x34\x9a\xfe\x03\xaf\x6b\x36\x07" | ||
3472 | "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d" | ||
3473 | "\xfb\x6d\x82\x51\xb6\x98\xd0\x71" | ||
3474 | "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d" | ||
3475 | "\x72\x2b\x54\x13\xe3\x6d\x79\x37" | ||
3476 | "\xa9\x39\x2c\xdf\x21\xab\x87\xd5" | ||
3477 | "\xee\xef\x9a\x12\x50\x39\x2e\x1b" | ||
3478 | "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac" | ||
3479 | "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08" | ||
3480 | "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25" | ||
3481 | "\x31\x9d\xef\xb1\x1d\x27\x55\x04" | ||
3482 | "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a" | ||
3483 | "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb" | ||
3484 | "\x26\xbe\x4f\x27\x04\x42\xd1\x44" | ||
3485 | "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf" | ||
3486 | "\x1d\x28\x14\xfd\xb1\x1a\x34\x18" | ||
3487 | "\xf5\x1e\x28\x69\x95\x6a\x5a\xba" | ||
3488 | "\x8e\xb2\x58\x1d\x28\x17\x13\x3d" | ||
3489 | "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8" | ||
3490 | "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b" | ||
3491 | "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a" | ||
3492 | "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a" | ||
3493 | "\x63\xa5\x99\x82\x09\x72\x8f\xc6" | ||
3494 | "\xa4\x62\x24\x69\x8c\x2d\x26\x00" | ||
3495 | "\x99\x83\x91\xd6\xc6\xcf\x57\x67" | ||
3496 | "\x38\xea\xf2\xfc\x29\xe0\x73\x39" | ||
3497 | "\xf9\x13\x94\x6d\xe2\x58\x28\x75" | ||
3498 | "\x3e\xae\x71\x90\x07\x70\x1c\x38" | ||
3499 | "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef" | ||
3500 | "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22" | ||
3501 | "\x82\x09\xe3\x18\x3f\x4f\x48\xfc" | ||
3502 | "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b" | ||
3503 | "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e" | ||
3504 | "\xc3\xac\x4a\xed\xe7\x82\xef\x31" | ||
3505 | "\x1f\x1a\x51\x1e\x29\x60\xc8\x98" | ||
3506 | "\x93\x51\x1d\x3d\x62\x59\x83\x82" | ||
3507 | "\x0c\xf1\xd7\x8d\xac\x33\x44\x81" | ||
3508 | "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4" | ||
3509 | "\xec\xdc\x24\xfd\x0e\x1a\x79\x94" | ||
3510 | "\x34\xb0\x62\xfa\x98\x49\x26\x1f" | ||
3511 | "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe" | ||
3512 | "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc" | ||
3513 | "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c" | ||
3514 | "\xdb\xf6\x21\x80\xf7\x5a\x37\x15" | ||
3515 | "\x0c\xe3\x36\xc8\x74\x75\x20\x91" | ||
3516 | "\xdf\x52\x2d\x0c\xe7\x45\xff\x46" | ||
3517 | "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6" | ||
3518 | "\x26\xa2\x5d\x7d\x61\xbf\x10\x46" | ||
3519 | "\x57\x8d\x05\x96\x70\x0b\xd6\x41" | ||
3520 | "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd" | ||
3521 | "\x5f\x92\x81\x6e\x35\x03\xd4\x72" | ||
3522 | "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23" | ||
3523 | "\x45\x5d\xec\x72\xc1\x52\xef\x2e" | ||
3524 | "\x81\x00\xd3\xfe\x4c\x3c\x05\x61" | ||
3525 | "\x80\x18\xc4\x6c\x03\xd3\xb7\xba" | ||
3526 | "\x11\xd7\xb8\x6e\xea\xe1\x80\x30", | ||
3527 | .ilen = 512, | ||
3528 | .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac" | ||
3529 | "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c" | ||
3530 | "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8" | ||
3531 | "\x50\x38\x1f\x71\x49\xb6\x57\xd6" | ||
3532 | "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90" | ||
3533 | "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6" | ||
3534 | "\xad\x1e\x9e\x20\x5f\x38\xbe\x04" | ||
3535 | "\xda\x10\x8e\xed\xa2\xa4\x87\xab" | ||
3536 | "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c" | ||
3537 | "\xc9\xac\x42\x31\x95\x7c\xc9\x04" | ||
3538 | "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6" | ||
3539 | "\x15\xd7\x3f\x4f\x2f\x66\x69\x03" | ||
3540 | "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65" | ||
3541 | "\x4c\x96\x12\xed\x7c\x92\x03\x01" | ||
3542 | "\x6f\xbc\x35\x93\xac\xf1\x27\xf1" | ||
3543 | "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50" | ||
3544 | "\x89\xa4\x8e\x66\x44\x85\xcc\xfd" | ||
3545 | "\x33\x14\x70\xe3\x96\xb2\xc3\xd3" | ||
3546 | "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5" | ||
3547 | "\x2d\x64\x75\xdd\xb4\x54\xe6\x74" | ||
3548 | "\x8c\xd3\x9d\x9e\x86\xab\x51\x53" | ||
3549 | "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40" | ||
3550 | "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5" | ||
3551 | "\x76\x12\x73\x44\x1a\x56\xd7\x72" | ||
3552 | "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda" | ||
3553 | "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd" | ||
3554 | "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60" | ||
3555 | "\x1a\xe2\x70\x85\x58\xc2\x1b\x09" | ||
3556 | "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9" | ||
3557 | "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8" | ||
3558 | "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8" | ||
3559 | "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10" | ||
3560 | "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1" | ||
3561 | "\x90\x3e\x76\x4a\x74\xa4\x21\x2c" | ||
3562 | "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e" | ||
3563 | "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f" | ||
3564 | "\x8d\x23\x31\x74\x84\xeb\x88\x6e" | ||
3565 | "\xcc\xb9\xbc\x22\x83\x19\x07\x22" | ||
3566 | "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78" | ||
3567 | "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5" | ||
3568 | "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41" | ||
3569 | "\x3c\xce\x8f\x42\x60\x71\xa7\x75" | ||
3570 | "\x08\x40\x65\x8a\x82\xbf\xf5\x43" | ||
3571 | "\x71\x96\xa9\x4d\x44\x8a\x20\xbe" | ||
3572 | "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65" | ||
3573 | "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9" | ||
3574 | "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4" | ||
3575 | "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a" | ||
3576 | "\x62\x73\x65\xfd\x46\x63\x25\x3d" | ||
3577 | "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf" | ||
3578 | "\x24\xf3\xb4\xac\x64\xba\xdf\x4b" | ||
3579 | "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7" | ||
3580 | "\xc5\x68\x77\x84\x32\x2b\xcc\x85" | ||
3581 | "\x74\x96\xf0\x12\x77\x61\xb9\xeb" | ||
3582 | "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8" | ||
3583 | "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24" | ||
3584 | "\xda\x39\x87\x45\xc0\x2b\xbb\x01" | ||
3585 | "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce" | ||
3586 | "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6" | ||
3587 | "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32" | ||
3588 | "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45" | ||
3589 | "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6" | ||
3590 | "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4" | ||
3591 | "\x21\xc4\xc2\x75\x67\x89\x37\x0a", | ||
3592 | .rlen = 512, | ||
3593 | }, | ||
3594 | }; | ||
3595 | |||
3095 | /* | 3596 | /* |
3096 | * Serpent test vectors. These are backwards because Serpent writes | 3597 | * Serpent test vectors. These are backwards because Serpent writes |
3097 | * octet sequences in right-to-left mode. | 3598 | * octet sequences in right-to-left mode. |