diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-12-17 08:34:32 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-01-10 16:16:41 -0500 |
commit | 5311f248b7764ba8b59e6d477355f766e5609686 (patch) | |
tree | 228910c68fc3d29a6bfe82cccfdc042e4003ebd2 /crypto/tcrypt.c | |
parent | 653ebd9c8510a7d647ed23e66e1338f848ebdbab (diff) |
[CRYPTO] ctr: Refactor into ctr and rfc3686
As discussed previously, this patch moves the basic CTR functionality
into a chainable algorithm called ctr. The IPsec-specific variant of
it is now placed on top with the name rfc3686.
So ctr(aes) gives a chainable cipher with IV size 16 while the IPsec
variant will be called rfc3686(ctr(aes)). This patch also adjusts
gcm accordingly.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/tcrypt.c')
-rw-r--r-- | crypto/tcrypt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 0cfb8ebb22ba..1142b4998c84 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
@@ -1193,9 +1193,9 @@ static void do_test(void) | |||
1193 | AES_XTS_ENC_TEST_VECTORS); | 1193 | AES_XTS_ENC_TEST_VECTORS); |
1194 | test_cipher("xts(aes)", DECRYPT, aes_xts_dec_tv_template, | 1194 | test_cipher("xts(aes)", DECRYPT, aes_xts_dec_tv_template, |
1195 | AES_XTS_DEC_TEST_VECTORS); | 1195 | AES_XTS_DEC_TEST_VECTORS); |
1196 | test_cipher("ctr(aes,4,8,4)", ENCRYPT, aes_ctr_enc_tv_template, | 1196 | test_cipher("rfc3686(ctr(aes))", ENCRYPT, aes_ctr_enc_tv_template, |
1197 | AES_CTR_ENC_TEST_VECTORS); | 1197 | AES_CTR_ENC_TEST_VECTORS); |
1198 | test_cipher("ctr(aes,4,8,4)", DECRYPT, aes_ctr_dec_tv_template, | 1198 | test_cipher("rfc3686(ctr(aes))", DECRYPT, aes_ctr_dec_tv_template, |
1199 | AES_CTR_DEC_TEST_VECTORS); | 1199 | AES_CTR_DEC_TEST_VECTORS); |
1200 | test_aead("gcm(aes)", ENCRYPT, aes_gcm_enc_tv_template, | 1200 | test_aead("gcm(aes)", ENCRYPT, aes_gcm_enc_tv_template, |
1201 | AES_GCM_ENC_TEST_VECTORS); | 1201 | AES_GCM_ENC_TEST_VECTORS); |
@@ -1394,9 +1394,9 @@ static void do_test(void) | |||
1394 | AES_XTS_ENC_TEST_VECTORS); | 1394 | AES_XTS_ENC_TEST_VECTORS); |
1395 | test_cipher("xts(aes)", DECRYPT, aes_xts_dec_tv_template, | 1395 | test_cipher("xts(aes)", DECRYPT, aes_xts_dec_tv_template, |
1396 | AES_XTS_DEC_TEST_VECTORS); | 1396 | AES_XTS_DEC_TEST_VECTORS); |
1397 | test_cipher("ctr(aes,4,8,4)", ENCRYPT, aes_ctr_enc_tv_template, | 1397 | test_cipher("rfc3686(ctr(aes))", ENCRYPT, aes_ctr_enc_tv_template, |
1398 | AES_CTR_ENC_TEST_VECTORS); | 1398 | AES_CTR_ENC_TEST_VECTORS); |
1399 | test_cipher("ctr(aes,4,8,4)", DECRYPT, aes_ctr_dec_tv_template, | 1399 | test_cipher("rfc3686(ctr(aes))", DECRYPT, aes_ctr_dec_tv_template, |
1400 | AES_CTR_DEC_TEST_VECTORS); | 1400 | AES_CTR_DEC_TEST_VECTORS); |
1401 | break; | 1401 | break; |
1402 | 1402 | ||