aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/padlock-aes.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2006-08-05 02:28:19 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2006-09-20 21:46:16 -0400
commitefcf8023e299be605f217dc2c1b2754b5534569c (patch)
tree36baba6406dd270f64c4e039811893877f9f0499 /drivers/crypto/padlock-aes.c
parentf12cc2090d721647c23dfce20834f4306db3b77d (diff)
[CRYPTO] drivers: Remove obsolete block cipher operations
This patch removes obsolete block operations of the simple cipher type from drivers. These were preserved so that existing users can make a smooth transition. Now that the transition is complete, they are no longer needed. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/padlock-aes.c')
-rw-r--r--drivers/crypto/padlock-aes.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
index f53301e836d9..d4501dc7e650 100644
--- a/drivers/crypto/padlock-aes.c
+++ b/drivers/crypto/padlock-aes.c
@@ -452,46 +452,6 @@ static void aes_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
452 padlock_xcrypt_ecb(in, out, ctx->D, &ctx->cword.decrypt, 1); 452 padlock_xcrypt_ecb(in, out, ctx->D, &ctx->cword.decrypt, 1);
453} 453}
454 454
455static unsigned int aes_encrypt_ecb(const struct cipher_desc *desc, u8 *out,
456 const u8 *in, unsigned int nbytes)
457{
458 struct aes_ctx *ctx = aes_ctx(desc->tfm);
459 padlock_xcrypt_ecb(in, out, ctx->E, &ctx->cword.encrypt,
460 nbytes / AES_BLOCK_SIZE);
461 return nbytes & ~(AES_BLOCK_SIZE - 1);
462}
463
464static unsigned int aes_decrypt_ecb(const struct cipher_desc *desc, u8 *out,
465 const u8 *in, unsigned int nbytes)
466{
467 struct aes_ctx *ctx = aes_ctx(desc->tfm);
468 padlock_xcrypt_ecb(in, out, ctx->D, &ctx->cword.decrypt,
469 nbytes / AES_BLOCK_SIZE);
470 return nbytes & ~(AES_BLOCK_SIZE - 1);
471}
472
473static unsigned int aes_encrypt_cbc(const struct cipher_desc *desc, u8 *out,
474 const u8 *in, unsigned int nbytes)
475{
476 struct aes_ctx *ctx = aes_ctx(desc->tfm);
477 u8 *iv;
478
479 iv = padlock_xcrypt_cbc(in, out, ctx->E, desc->info,
480 &ctx->cword.encrypt, nbytes / AES_BLOCK_SIZE);
481 memcpy(desc->info, iv, AES_BLOCK_SIZE);
482
483 return nbytes & ~(AES_BLOCK_SIZE - 1);
484}
485
486static unsigned int aes_decrypt_cbc(const struct cipher_desc *desc, u8 *out,
487 const u8 *in, unsigned int nbytes)
488{
489 struct aes_ctx *ctx = aes_ctx(desc->tfm);
490 padlock_xcrypt_cbc(in, out, ctx->D, desc->info, &ctx->cword.decrypt,
491 nbytes / AES_BLOCK_SIZE);
492 return nbytes & ~(AES_BLOCK_SIZE - 1);
493}
494
495static struct crypto_alg aes_alg = { 455static struct crypto_alg aes_alg = {
496 .cra_name = "aes", 456 .cra_name = "aes",
497 .cra_driver_name = "aes-padlock", 457 .cra_driver_name = "aes-padlock",
@@ -509,10 +469,6 @@ static struct crypto_alg aes_alg = {
509 .cia_setkey = aes_set_key, 469 .cia_setkey = aes_set_key,
510 .cia_encrypt = aes_encrypt, 470 .cia_encrypt = aes_encrypt,
511 .cia_decrypt = aes_decrypt, 471 .cia_decrypt = aes_decrypt,
512 .cia_encrypt_ecb = aes_encrypt_ecb,
513 .cia_decrypt_ecb = aes_decrypt_ecb,
514 .cia_encrypt_cbc = aes_encrypt_cbc,
515 .cia_decrypt_cbc = aes_decrypt_cbc,
516 } 472 }
517 } 473 }
518}; 474};