aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/gcm.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-12-02 02:49:21 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2008-01-10 16:16:29 -0500
commit7ba683a6deba70251756aa5a021cdaa5c875a7a2 (patch)
tree80f63039b56bef0287fdf878163a5fe109821e58 /crypto/gcm.c
parente29bc6ad0e84e3157e0f49130a15b278cb232c72 (diff)
[CRYPTO] aead: Make authsize a run-time parameter
As it is authsize is an algorithm paramter which cannot be changed at run-time. This is inconvenient because hardware that implements such algorithms would have to register each authsize that they support separately. Since authsize is a property common to all AEAD algorithms, we can add a function setauthsize that sets it at run-time, just like setkey. This patch does exactly that and also changes authenc so that authsize is no longer a parameter of its template. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/gcm.c')
-rw-r--r--crypto/gcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/gcm.c b/crypto/gcm.c
index ad8b8b9aeef2..5681c7957b88 100644
--- a/crypto/gcm.c
+++ b/crypto/gcm.c
@@ -414,7 +414,7 @@ static struct crypto_instance *crypto_gcm_alloc(struct rtattr **tb)
414 inst->alg.cra_alignmask = __alignof__(u32) - 1; 414 inst->alg.cra_alignmask = __alignof__(u32) - 1;
415 inst->alg.cra_type = &crypto_aead_type; 415 inst->alg.cra_type = &crypto_aead_type;
416 inst->alg.cra_aead.ivsize = 12; 416 inst->alg.cra_aead.ivsize = 12;
417 inst->alg.cra_aead.authsize = 16; 417 inst->alg.cra_aead.maxauthsize = 16;
418 inst->alg.cra_ctxsize = sizeof(struct crypto_gcm_ctx); 418 inst->alg.cra_ctxsize = sizeof(struct crypto_gcm_ctx);
419 inst->alg.cra_init = crypto_gcm_init_tfm; 419 inst->alg.cra_init = crypto_gcm_init_tfm;
420 inst->alg.cra_exit = crypto_gcm_exit_tfm; 420 inst->alg.cra_exit = crypto_gcm_exit_tfm;