diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-24 12:05:32 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-24 12:05:32 -0400 |
| commit | a23a334bd547e9462d9ca4a74608519a1e928848 (patch) | |
| tree | e3d4f4423130f0d74f141c9bbd0c0874690e38b3 /crypto | |
| parent | a642285014df03b8f320399d515bf3b779af07ac (diff) | |
| parent | acdca31dba86c4f426460aa000d13930a00549b7 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (34 commits)
crypto: caam - ablkcipher support
crypto: caam - faster aead implementation
crypto: caam - structure renaming
crypto: caam - shorter names
crypto: talitos - don't bad_key in ablkcipher setkey
crypto: talitos - remove unused giv from ablkcipher methods
crypto: talitos - don't set done notification in hot path
crypto: talitos - ensure request ordering within a single tfm
crypto: gf128mul - fix call to memset()
crypto: s390 - support hardware accelerated SHA-224
crypto: algif_hash - Handle initial af_alg_make_sg error correctly
crypto: sha1_generic - use SHA1_BLOCK_SIZE
hwrng: ppc4xx - add support for ppc4xx TRNG
crypto: crypto4xx - Perform read/modify/write on device control register
crypto: caam - fix build warning when DEBUG_FS not configured
crypto: arc4 - Fixed coding style issues
crypto: crc32c - Fixed coding style issue
crypto: omap-sham - do not schedule tasklet if there is no active requests
crypto: omap-sham - clear device flags when finishing request
crypto: omap-sham - irq handler must not clear error code
...
Diffstat (limited to 'crypto')
| -rw-r--r-- | crypto/Kconfig | 4 | ||||
| -rw-r--r-- | crypto/algif_hash.c | 4 | ||||
| -rw-r--r-- | crypto/arc4.c | 15 | ||||
| -rw-r--r-- | crypto/crc32c.c | 10 | ||||
| -rw-r--r-- | crypto/gf128mul.c | 4 | ||||
| -rw-r--r-- | crypto/sha1_generic.c | 11 | ||||
| -rw-r--r-- | crypto/testmgr.h | 293 |
7 files changed, 316 insertions, 25 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig index 87b22ca9c223..2af81552d65b 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig | |||
| @@ -458,7 +458,7 @@ config CRYPTO_WP512 | |||
| 458 | 458 | ||
| 459 | config CRYPTO_GHASH_CLMUL_NI_INTEL | 459 | config CRYPTO_GHASH_CLMUL_NI_INTEL |
| 460 | tristate "GHASH digest algorithm (CLMUL-NI accelerated)" | 460 | tristate "GHASH digest algorithm (CLMUL-NI accelerated)" |
| 461 | depends on (X86 || UML_X86) && 64BIT | 461 | depends on X86 && 64BIT |
| 462 | select CRYPTO_SHASH | 462 | select CRYPTO_SHASH |
| 463 | select CRYPTO_CRYPTD | 463 | select CRYPTO_CRYPTD |
| 464 | help | 464 | help |
| @@ -533,7 +533,7 @@ config CRYPTO_AES_X86_64 | |||
| 533 | 533 | ||
| 534 | config CRYPTO_AES_NI_INTEL | 534 | config CRYPTO_AES_NI_INTEL |
| 535 | tristate "AES cipher algorithms (AES-NI)" | 535 | tristate "AES cipher algorithms (AES-NI)" |
| 536 | depends on (X86 || UML_X86) | 536 | depends on X86 |
| 537 | select CRYPTO_AES_X86_64 if 64BIT | 537 | select CRYPTO_AES_X86_64 if 64BIT |
| 538 | select CRYPTO_AES_586 if !64BIT | 538 | select CRYPTO_AES_586 if !64BIT |
| 539 | select CRYPTO_CRYPTD | 539 | select CRYPTO_CRYPTD |
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c index 62122a1a2f7a..ef5356cd280a 100644 --- a/crypto/algif_hash.c +++ b/crypto/algif_hash.c | |||
| @@ -68,8 +68,10 @@ static int hash_sendmsg(struct kiocb *unused, struct socket *sock, | |||
| 68 | int newlen; | 68 | int newlen; |
| 69 | 69 | ||
| 70 | newlen = af_alg_make_sg(&ctx->sgl, from, len, 0); | 70 | newlen = af_alg_make_sg(&ctx->sgl, from, len, 0); |
| 71 | if (newlen < 0) | 71 | if (newlen < 0) { |
| 72 | err = copied ? 0 : newlen; | ||
| 72 | goto unlock; | 73 | goto unlock; |
| 74 | } | ||
| 73 | 75 | ||
| 74 | ahash_request_set_crypt(&ctx->req, ctx->sgl.sg, NULL, | 76 | ahash_request_set_crypt(&ctx->req, ctx->sgl.sg, NULL, |
| 75 | newlen); | 77 | newlen); |
diff --git a/crypto/arc4.c b/crypto/arc4.c index 8be47e13a9e3..0d12a96da1d8 100644 --- a/crypto/arc4.c +++ b/crypto/arc4.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Cryptographic API | 2 | * Cryptographic API |
| 3 | * | 3 | * |
| 4 | * ARC4 Cipher Algorithm | 4 | * ARC4 Cipher Algorithm |
| @@ -33,16 +33,15 @@ static int arc4_set_key(struct crypto_tfm *tfm, const u8 *in_key, | |||
| 33 | ctx->x = 1; | 33 | ctx->x = 1; |
| 34 | ctx->y = 0; | 34 | ctx->y = 0; |
| 35 | 35 | ||
| 36 | for(i = 0; i < 256; i++) | 36 | for (i = 0; i < 256; i++) |
| 37 | ctx->S[i] = i; | 37 | ctx->S[i] = i; |
| 38 | 38 | ||
| 39 | for(i = 0; i < 256; i++) | 39 | for (i = 0; i < 256; i++) { |
| 40 | { | ||
| 41 | u8 a = ctx->S[i]; | 40 | u8 a = ctx->S[i]; |
| 42 | j = (j + in_key[k] + a) & 0xff; | 41 | j = (j + in_key[k] + a) & 0xff; |
| 43 | ctx->S[i] = ctx->S[j]; | 42 | ctx->S[i] = ctx->S[j]; |
| 44 | ctx->S[j] = a; | 43 | ctx->S[j] = a; |
| 45 | if(++k >= key_len) | 44 | if (++k >= key_len) |
| 46 | k = 0; | 45 | k = 0; |
| 47 | } | 46 | } |
| 48 | 47 | ||
| @@ -80,9 +79,9 @@ static struct crypto_alg arc4_alg = { | |||
| 80 | .cra_u = { .cipher = { | 79 | .cra_u = { .cipher = { |
| 81 | .cia_min_keysize = ARC4_MIN_KEY_SIZE, | 80 | .cia_min_keysize = ARC4_MIN_KEY_SIZE, |
| 82 | .cia_max_keysize = ARC4_MAX_KEY_SIZE, | 81 | .cia_max_keysize = ARC4_MAX_KEY_SIZE, |
| 83 | .cia_setkey = arc4_set_key, | 82 | .cia_setkey = arc4_set_key, |
| 84 | .cia_encrypt = arc4_crypt, | 83 | .cia_encrypt = arc4_crypt, |
| 85 | .cia_decrypt = arc4_crypt } } | 84 | .cia_decrypt = arc4_crypt } } |
| 86 | }; | 85 | }; |
| 87 | 86 | ||
| 88 | static int __init arc4_init(void) | 87 | static int __init arc4_init(void) |
diff --git a/crypto/crc32c.c b/crypto/crc32c.c index de9e55c29794..3f9ad2801052 100644 --- a/crypto/crc32c.c +++ b/crypto/crc32c.c | |||
| @@ -224,11 +224,11 @@ static int crc32c_cra_init(struct crypto_tfm *tfm) | |||
| 224 | static struct shash_alg alg = { | 224 | static struct shash_alg alg = { |
| 225 | .digestsize = CHKSUM_DIGEST_SIZE, | 225 | .digestsize = CHKSUM_DIGEST_SIZE, |
| 226 | .setkey = chksum_setkey, | 226 | .setkey = chksum_setkey, |
| 227 | .init = chksum_init, | 227 | .init = chksum_init, |
| 228 | .update = chksum_update, | 228 | .update = chksum_update, |
| 229 | .final = chksum_final, | 229 | .final = chksum_final, |
| 230 | .finup = chksum_finup, | 230 | .finup = chksum_finup, |
| 231 | .digest = chksum_digest, | 231 | .digest = chksum_digest, |
| 232 | .descsize = sizeof(struct chksum_desc_ctx), | 232 | .descsize = sizeof(struct chksum_desc_ctx), |
| 233 | .base = { | 233 | .base = { |
| 234 | .cra_name = "crc32c", | 234 | .cra_name = "crc32c", |
diff --git a/crypto/gf128mul.c b/crypto/gf128mul.c index df35e4ccd07e..5276607c72d0 100644 --- a/crypto/gf128mul.c +++ b/crypto/gf128mul.c | |||
| @@ -182,7 +182,7 @@ void gf128mul_lle(be128 *r, const be128 *b) | |||
| 182 | for (i = 0; i < 7; ++i) | 182 | for (i = 0; i < 7; ++i) |
| 183 | gf128mul_x_lle(&p[i + 1], &p[i]); | 183 | gf128mul_x_lle(&p[i + 1], &p[i]); |
| 184 | 184 | ||
| 185 | memset(r, 0, sizeof(r)); | 185 | memset(r, 0, sizeof(*r)); |
| 186 | for (i = 0;;) { | 186 | for (i = 0;;) { |
| 187 | u8 ch = ((u8 *)b)[15 - i]; | 187 | u8 ch = ((u8 *)b)[15 - i]; |
| 188 | 188 | ||
| @@ -220,7 +220,7 @@ void gf128mul_bbe(be128 *r, const be128 *b) | |||
| 220 | for (i = 0; i < 7; ++i) | 220 | for (i = 0; i < 7; ++i) |
| 221 | gf128mul_x_bbe(&p[i + 1], &p[i]); | 221 | gf128mul_x_bbe(&p[i + 1], &p[i]); |
| 222 | 222 | ||
| 223 | memset(r, 0, sizeof(r)); | 223 | memset(r, 0, sizeof(*r)); |
| 224 | for (i = 0;;) { | 224 | for (i = 0;;) { |
| 225 | u8 ch = ((u8 *)b)[i]; | 225 | u8 ch = ((u8 *)b)[i]; |
| 226 | 226 | ||
diff --git a/crypto/sha1_generic.c b/crypto/sha1_generic.c index 0416091bf45a..00ae60eb9254 100644 --- a/crypto/sha1_generic.c +++ b/crypto/sha1_generic.c | |||
| @@ -43,25 +43,26 @@ static int sha1_update(struct shash_desc *desc, const u8 *data, | |||
| 43 | unsigned int partial, done; | 43 | unsigned int partial, done; |
| 44 | const u8 *src; | 44 | const u8 *src; |
| 45 | 45 | ||
| 46 | partial = sctx->count & 0x3f; | 46 | partial = sctx->count % SHA1_BLOCK_SIZE; |
| 47 | sctx->count += len; | 47 | sctx->count += len; |
| 48 | done = 0; | 48 | done = 0; |
| 49 | src = data; | 49 | src = data; |
| 50 | 50 | ||
| 51 | if ((partial + len) > 63) { | 51 | if ((partial + len) >= SHA1_BLOCK_SIZE) { |
| 52 | u32 temp[SHA_WORKSPACE_WORDS]; | 52 | u32 temp[SHA_WORKSPACE_WORDS]; |
| 53 | 53 | ||
| 54 | if (partial) { | 54 | if (partial) { |
| 55 | done = -partial; | 55 | done = -partial; |
| 56 | memcpy(sctx->buffer + partial, data, done + 64); | 56 | memcpy(sctx->buffer + partial, data, |
| 57 | done + SHA1_BLOCK_SIZE); | ||
| 57 | src = sctx->buffer; | 58 | src = sctx->buffer; |
| 58 | } | 59 | } |
| 59 | 60 | ||
| 60 | do { | 61 | do { |
| 61 | sha_transform(sctx->state, src, temp); | 62 | sha_transform(sctx->state, src, temp); |
| 62 | done += 64; | 63 | done += SHA1_BLOCK_SIZE; |
| 63 | src = data + done; | 64 | src = data + done; |
| 64 | } while (done + 63 < len); | 65 | } while (done + SHA1_BLOCK_SIZE <= len); |
| 65 | 66 | ||
| 66 | memset(temp, 0, sizeof(temp)); | 67 | memset(temp, 0, sizeof(temp)); |
| 67 | partial = 0; | 68 | partial = 0; |
diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 27e60619538e..27adc92842ba 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h | |||
| @@ -2976,8 +2976,8 @@ static struct cipher_testvec cast6_dec_tv_template[] = { | |||
| 2976 | #define AES_CBC_DEC_TEST_VECTORS 4 | 2976 | #define AES_CBC_DEC_TEST_VECTORS 4 |
| 2977 | #define AES_LRW_ENC_TEST_VECTORS 8 | 2977 | #define AES_LRW_ENC_TEST_VECTORS 8 |
| 2978 | #define AES_LRW_DEC_TEST_VECTORS 8 | 2978 | #define AES_LRW_DEC_TEST_VECTORS 8 |
| 2979 | #define AES_XTS_ENC_TEST_VECTORS 4 | 2979 | #define AES_XTS_ENC_TEST_VECTORS 5 |
| 2980 | #define AES_XTS_DEC_TEST_VECTORS 4 | 2980 | #define AES_XTS_DEC_TEST_VECTORS 5 |
| 2981 | #define AES_CTR_ENC_TEST_VECTORS 3 | 2981 | #define AES_CTR_ENC_TEST_VECTORS 3 |
| 2982 | #define AES_CTR_DEC_TEST_VECTORS 3 | 2982 | #define AES_CTR_DEC_TEST_VECTORS 3 |
| 2983 | #define AES_OFB_ENC_TEST_VECTORS 1 | 2983 | #define AES_OFB_ENC_TEST_VECTORS 1 |
| @@ -3926,6 +3926,150 @@ static struct cipher_testvec aes_xts_enc_tv_template[] = { | |||
| 3926 | "\x0a\x28\x2d\xf9\x20\x14\x7b\xea" | 3926 | "\x0a\x28\x2d\xf9\x20\x14\x7b\xea" |
| 3927 | "\xbe\x42\x1e\xe5\x31\x9d\x05\x68", | 3927 | "\xbe\x42\x1e\xe5\x31\x9d\x05\x68", |
| 3928 | .rlen = 512, | 3928 | .rlen = 512, |
| 3929 | }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */ | ||
| 3930 | .key = "\x27\x18\x28\x18\x28\x45\x90\x45" | ||
| 3931 | "\x23\x53\x60\x28\x74\x71\x35\x26" | ||
| 3932 | "\x62\x49\x77\x57\x24\x70\x93\x69" | ||
| 3933 | "\x99\x59\x57\x49\x66\x96\x76\x27" | ||
| 3934 | "\x31\x41\x59\x26\x53\x58\x97\x93" | ||
| 3935 | "\x23\x84\x62\x64\x33\x83\x27\x95" | ||
| 3936 | "\x02\x88\x41\x97\x16\x93\x99\x37" | ||
| 3937 | "\x51\x05\x82\x09\x74\x94\x45\x92", | ||
| 3938 | .klen = 64, | ||
| 3939 | .iv = "\xff\x00\x00\x00\x00\x00\x00\x00" | ||
| 3940 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
| 3941 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
| 3942 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
| 3943 | .input = "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
| 3944 | "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" | ||
| 3945 | "\x10\x11\x12\x13\x14\x15\x16\x17" | ||
| 3946 | "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" | ||
| 3947 | "\x20\x21\x22\x23\x24\x25\x26\x27" | ||
| 3948 | "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f" | ||
| 3949 | "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
| 3950 | "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" | ||
| 3951 | "\x40\x41\x42\x43\x44\x45\x46\x47" | ||
| 3952 | "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f" | ||
| 3953 | "\x50\x51\x52\x53\x54\x55\x56\x57" | ||
| 3954 | "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f" | ||
| 3955 | "\x60\x61\x62\x63\x64\x65\x66\x67" | ||
| 3956 | "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f" | ||
| 3957 | "\x70\x71\x72\x73\x74\x75\x76\x77" | ||
| 3958 | "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f" | ||
| 3959 | "\x80\x81\x82\x83\x84\x85\x86\x87" | ||
| 3960 | "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" | ||
| 3961 | "\x90\x91\x92\x93\x94\x95\x96\x97" | ||
| 3962 | "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" | ||
| 3963 | "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" | ||
| 3964 | "\xa8\xa9\xaa\xab\xac\xad\xae\xaf" | ||
| 3965 | "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" | ||
| 3966 | "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" | ||
| 3967 | "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" | ||
| 3968 | "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" | ||
| 3969 | "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7" | ||
| 3970 | "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" | ||
| 3971 | "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7" | ||
| 3972 | "\xe8\xe9\xea\xeb\xec\xed\xee\xef" | ||
| 3973 | "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" | ||
| 3974 | "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" | ||
| 3975 | "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
| 3976 | "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" | ||
| 3977 | "\x10\x11\x12\x13\x14\x15\x16\x17" | ||
| 3978 | "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" | ||
| 3979 | "\x20\x21\x22\x23\x24\x25\x26\x27" | ||
| 3980 | "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f" | ||
| 3981 | "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
| 3982 | "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" | ||
| 3983 | "\x40\x41\x42\x43\x44\x45\x46\x47" | ||
| 3984 | "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f" | ||
| 3985 | "\x50\x51\x52\x53\x54\x55\x56\x57" | ||
| 3986 | "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f" | ||
| 3987 | "\x60\x61\x62\x63\x64\x65\x66\x67" | ||
| 3988 | "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f" | ||
| 3989 | "\x70\x71\x72\x73\x74\x75\x76\x77" | ||
| 3990 | "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f" | ||
| 3991 | "\x80\x81\x82\x83\x84\x85\x86\x87" | ||
| 3992 | "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" | ||
| 3993 | "\x90\x91\x92\x93\x94\x95\x96\x97" | ||
| 3994 | "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" | ||
| 3995 | "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" | ||
| 3996 | "\xa8\xa9\xaa\xab\xac\xad\xae\xaf" | ||
| 3997 | "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" | ||
| 3998 | "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" | ||
| 3999 | "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" | ||
| 4000 | "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" | ||
| 4001 | "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7" | ||
| 4002 | "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" | ||
| 4003 | "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7" | ||
| 4004 | "\xe8\xe9\xea\xeb\xec\xed\xee\xef" | ||
| 4005 | "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" | ||
| 4006 | "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", | ||
| 4007 | .ilen = 512, | ||
| 4008 | .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86" | ||
| 4009 | "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b" | ||
| 4010 | "\xea\x00\x80\x3f\x5e\x48\x23\x57" | ||
| 4011 | "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b" | ||
| 4012 | "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d" | ||
| 4013 | "\x66\xb3\x17\xf9\xac\x68\x3f\x44" | ||
| 4014 | "\x68\x0a\x86\xac\x35\xad\xfc\x33" | ||
| 4015 | "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd" | ||
| 4016 | "\x57\x76\x92\x6c\x49\xa3\x09\x5e" | ||
| 4017 | "\xb1\x08\xfd\x10\x98\xba\xec\x70" | ||
| 4018 | "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2" | ||
| 4019 | "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0" | ||
| 4020 | "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89" | ||
| 4021 | "\xae\xba\x12\x29\x61\xd0\x3a\x75" | ||
| 4022 | "\x71\x23\xe9\x87\x0f\x8a\xcf\x10" | ||
| 4023 | "\x00\x02\x08\x87\x89\x14\x29\xca" | ||
| 4024 | "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03" | ||
| 4025 | "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d" | ||
| 4026 | "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd" | ||
| 4027 | "\x12\x0c\x0f\x74\x18\xda\xe3\xd0" | ||
| 4028 | "\xb5\x78\x1c\x34\x80\x3f\xa7\x54" | ||
| 4029 | "\x21\xc7\x90\xdf\xe1\xde\x18\x34" | ||
| 4030 | "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c" | ||
| 4031 | "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f" | ||
| 4032 | "\x93\xec\x05\xc5\x2e\x04\x93\xef" | ||
| 4033 | "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a" | ||
| 4034 | "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50" | ||
| 4035 | "\x84\x14\x73\xd1\xa8\xcc\x81\xec" | ||
| 4036 | "\x58\x3e\x96\x45\xe0\x7b\x8d\x96" | ||
| 4037 | "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6" | ||
| 4038 | "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb" | ||
| 4039 | "\x17\xb6\xba\x02\x46\x9a\x02\x0a" | ||
| 4040 | "\x84\xe1\x8e\x8f\x84\x25\x20\x70" | ||
| 4041 | "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f" | ||
| 4042 | "\xbc\x48\x14\x57\x77\x8f\x61\x60" | ||
| 4043 | "\x15\xe1\x32\x7a\x02\xb1\x40\xf1" | ||
| 4044 | "\x50\x5e\xb3\x09\x32\x6d\x68\x37" | ||
| 4045 | "\x8f\x83\x74\x59\x5c\x84\x9d\x84" | ||
| 4046 | "\xf4\xc3\x33\xec\x44\x23\x88\x51" | ||
| 4047 | "\x43\xcb\x47\xbd\x71\xc5\xed\xae" | ||
| 4048 | "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe" | ||
| 4049 | "\xc9\xde\x24\x4f\xbe\x15\x99\x2b" | ||
| 4050 | "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f" | ||
| 4051 | "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29" | ||
| 4052 | "\xa9\xab\xc3\xd4\xd8\x93\x92\x72" | ||
| 4053 | "\x84\xc5\x87\x54\xcc\xe2\x94\x52" | ||
| 4054 | "\x9f\x86\x14\xdc\xd2\xab\xa9\x91" | ||
| 4055 | "\x92\x5f\xed\xc4\xae\x74\xff\xac" | ||
| 4056 | "\x6e\x33\x3b\x93\xeb\x4a\xff\x04" | ||
| 4057 | "\x79\xda\x9a\x41\x0e\x44\x50\xe0" | ||
| 4058 | "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00" | ||
| 4059 | "\x57\x5d\xa4\x01\xfc\x07\x05\x9f" | ||
| 4060 | "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33" | ||
| 4061 | "\x94\x30\x54\xff\x84\x01\x14\x93" | ||
| 4062 | "\xc2\x7b\x34\x29\xea\xed\xb4\xed" | ||
| 4063 | "\x53\x76\x44\x1a\x77\xed\x43\x85" | ||
| 4064 | "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2" | ||
| 4065 | "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a" | ||
| 4066 | "\xab\x1c\xbb\x4c\x15\x50\xbe\x97" | ||
| 4067 | "\xf7\xab\x40\x66\x19\x3c\x4c\xaa" | ||
| 4068 | "\x77\x3d\xad\x38\x01\x4b\xd2\x09" | ||
| 4069 | "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54" | ||
| 4070 | "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70" | ||
| 4071 | "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51", | ||
| 4072 | .rlen = 512, | ||
| 3929 | } | 4073 | } |
| 3930 | }; | 4074 | }; |
| 3931 | 4075 | ||
| @@ -4123,6 +4267,151 @@ static struct cipher_testvec aes_xts_dec_tv_template[] = { | |||
| 4123 | "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" | 4267 | "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" |
| 4124 | "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", | 4268 | "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", |
| 4125 | .rlen = 512, | 4269 | .rlen = 512, |
| 4270 | }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */ | ||
| 4271 | .key = "\x27\x18\x28\x18\x28\x45\x90\x45" | ||
| 4272 | "\x23\x53\x60\x28\x74\x71\x35\x26" | ||
| 4273 | "\x62\x49\x77\x57\x24\x70\x93\x69" | ||
| 4274 | "\x99\x59\x57\x49\x66\x96\x76\x27" | ||
| 4275 | "\x31\x41\x59\x26\x53\x58\x97\x93" | ||
| 4276 | "\x23\x84\x62\x64\x33\x83\x27\x95" | ||
| 4277 | "\x02\x88\x41\x97\x16\x93\x99\x37" | ||
| 4278 | "\x51\x05\x82\x09\x74\x94\x45\x92", | ||
| 4279 | .klen = 64, | ||
| 4280 | .iv = "\xff\x00\x00\x00\x00\x00\x00\x00" | ||
| 4281 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
| 4282 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
| 4283 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
| 4284 | .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86" | ||
| 4285 | "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b" | ||
| 4286 | "\xea\x00\x80\x3f\x5e\x48\x23\x57" | ||
| 4287 | "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b" | ||
| 4288 | "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d" | ||
| 4289 | "\x66\xb3\x17\xf9\xac\x68\x3f\x44" | ||
| 4290 | "\x68\x0a\x86\xac\x35\xad\xfc\x33" | ||
| 4291 | "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd" | ||
| 4292 | "\x57\x76\x92\x6c\x49\xa3\x09\x5e" | ||
| 4293 | "\xb1\x08\xfd\x10\x98\xba\xec\x70" | ||
| 4294 | "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2" | ||
| 4295 | "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0" | ||
| 4296 | "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89" | ||
| 4297 | "\xae\xba\x12\x29\x61\xd0\x3a\x75" | ||
| 4298 | "\x71\x23\xe9\x87\x0f\x8a\xcf\x10" | ||
| 4299 | "\x00\x02\x08\x87\x89\x14\x29\xca" | ||
| 4300 | "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03" | ||
| 4301 | "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d" | ||
| 4302 | "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd" | ||
| 4303 | "\x12\x0c\x0f\x74\x18\xda\xe3\xd0" | ||
| 4304 | "\xb5\x78\x1c\x34\x80\x3f\xa7\x54" | ||
| 4305 | "\x21\xc7\x90\xdf\xe1\xde\x18\x34" | ||
| 4306 | "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c" | ||
| 4307 | "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f" | ||
| 4308 | "\x93\xec\x05\xc5\x2e\x04\x93\xef" | ||
| 4309 | "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a" | ||
| 4310 | "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50" | ||
| 4311 | "\x84\x14\x73\xd1\xa8\xcc\x81\xec" | ||
| 4312 | "\x58\x3e\x96\x45\xe0\x7b\x8d\x96" | ||
| 4313 | "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6" | ||
| 4314 | "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb" | ||
| 4315 | "\x17\xb6\xba\x02\x46\x9a\x02\x0a" | ||
| 4316 | "\x84\xe1\x8e\x8f\x84\x25\x20\x70" | ||
| 4317 | "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f" | ||
| 4318 | "\xbc\x48\x14\x57\x77\x8f\x61\x60" | ||
| 4319 | "\x15\xe1\x32\x7a\x02\xb1\x40\xf1" | ||
| 4320 | "\x50\x5e\xb3\x09\x32\x6d\x68\x37" | ||
| 4321 | "\x8f\x83\x74\x59\x5c\x84\x9d\x84" | ||
| 4322 | "\xf4\xc3\x33\xec\x44\x23\x88\x51" | ||
| 4323 | "\x43\xcb\x47\xbd\x71\xc5\xed\xae" | ||
| 4324 | "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe" | ||
| 4325 | "\xc9\xde\x24\x4f\xbe\x15\x99\x2b" | ||
| 4326 | "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f" | ||
| 4327 | "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29" | ||
| 4328 | "\xa9\xab\xc3\xd4\xd8\x93\x92\x72" | ||
| 4329 | "\x84\xc5\x87\x54\xcc\xe2\x94\x52" | ||
| 4330 | "\x9f\x86\x14\xdc\xd2\xab\xa9\x91" | ||
| 4331 | "\x92\x5f\xed\xc4\xae\x74\xff\xac" | ||
| 4332 | "\x6e\x33\x3b\x93\xeb\x4a\xff\x04" | ||
| 4333 | "\x79\xda\x9a\x41\x0e\x44\x50\xe0" | ||
| 4334 | "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00" | ||
| 4335 | "\x57\x5d\xa4\x01\xfc\x07\x05\x9f" | ||
| 4336 | "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33" | ||
| 4337 | "\x94\x30\x54\xff\x84\x01\x14\x93" | ||
| 4338 | "\xc2\x7b\x34\x29\xea\xed\xb4\xed" | ||
| 4339 | "\x53\x76\x44\x1a\x77\xed\x43\x85" | ||
| 4340 | "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2" | ||
| 4341 | "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a" | ||
| 4342 | "\xab\x1c\xbb\x4c\x15\x50\xbe\x97" | ||
| 4343 | "\xf7\xab\x40\x66\x19\x3c\x4c\xaa" | ||
| 4344 | "\x77\x3d\xad\x38\x01\x4b\xd2\x09" | ||
| 4345 | "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54" | ||
| 4346 | "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70" | ||
| 4347 | "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51", | ||
| 4348 | .ilen = 512, | ||
| 4349 | .result = "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
| 4350 | "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" | ||
| 4351 | "\x10\x11\x12\x13\x14\x15\x16\x17" | ||
| 4352 | "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" | ||
| 4353 | "\x20\x21\x22\x23\x24\x25\x26\x27" | ||
| 4354 | "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f" | ||
| 4355 | "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
| 4356 | "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" | ||
| 4357 | "\x40\x41\x42\x43\x44\x45\x46\x47" | ||
| 4358 | "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f" | ||
| 4359 | "\x50\x51\x52\x53\x54\x55\x56\x57" | ||
| 4360 | "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f" | ||
| 4361 | "\x60\x61\x62\x63\x64\x65\x66\x67" | ||
| 4362 | "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f" | ||
| 4363 | "\x70\x71\x72\x73\x74\x75\x76\x77" | ||
| 4364 | "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f" | ||
| 4365 | "\x80\x81\x82\x83\x84\x85\x86\x87" | ||
| 4366 | "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" | ||
| 4367 | "\x90\x91\x92\x93\x94\x95\x96\x97" | ||
| 4368 | "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" | ||
| 4369 | "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" | ||
| 4370 | "\xa8\xa9\xaa\xab\xac\xad\xae\xaf" | ||
| 4371 | "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" | ||
| 4372 | "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" | ||
| 4373 | "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" | ||
| 4374 | "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" | ||
| 4375 | "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7" | ||
| 4376 | "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" | ||
| 4377 | "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7" | ||
| 4378 | "\xe8\xe9\xea\xeb\xec\xed\xee\xef" | ||
| 4379 | "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" | ||
| 4380 | "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" | ||
| 4381 | "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
| 4382 | "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" | ||
| 4383 | "\x10\x11\x12\x13\x14\x15\x16\x17" | ||
| 4384 | "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" | ||
| 4385 | "\x20\x21\x22\x23\x24\x25\x26\x27" | ||
| 4386 | "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f" | ||
| 4387 | "\x30\x31\x32\x33\x34\x35\x36\x37" | ||
| 4388 | "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" | ||
| 4389 | "\x40\x41\x42\x43\x44\x45\x46\x47" | ||
| 4390 | "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f" | ||
| 4391 | "\x50\x51\x52\x53\x54\x55\x56\x57" | ||
| 4392 | "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f" | ||
| 4393 | "\x60\x61\x62\x63\x64\x65\x66\x67" | ||
| 4394 | "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f" | ||
| 4395 | "\x70\x71\x72\x73\x74\x75\x76\x77" | ||
| 4396 | "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f" | ||
| 4397 | "\x80\x81\x82\x83\x84\x85\x86\x87" | ||
| 4398 | "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" | ||
| 4399 | "\x90\x91\x92\x93\x94\x95\x96\x97" | ||
| 4400 | "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" | ||
| 4401 | "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" | ||
| 4402 | "\xa8\xa9\xaa\xab\xac\xad\xae\xaf" | ||
| 4403 | "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" | ||
| 4404 | "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" | ||
| 4405 | "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" | ||
| 4406 | "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" | ||
| 4407 | "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7" | ||
| 4408 | "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" | ||
| 4409 | "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7" | ||
| 4410 | "\xe8\xe9\xea\xeb\xec\xed\xee\xef" | ||
| 4411 | "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" | ||
| 4412 | "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", | ||
| 4413 | .rlen = 512, | ||
| 4414 | |||
| 4126 | } | 4415 | } |
| 4127 | }; | 4416 | }; |
| 4128 | 4417 | ||
