diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-11-30 05:38:37 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2008-01-10 16:16:48 -0500 |
commit | 0a270321dbf948963aeb0e8382fe17d2c2eb3771 (patch) | |
tree | bdb6c12f88bd02b62853ff6bf26bf9d4a736fdbd /crypto/ctr.c | |
parent | 45d44eb56ad197cfccb8f84b5df64abff8b7cb96 (diff) |
[CRYPTO] seqiv: Add Sequence Number IV Generator
This generator generates an IV based on a sequence number by xoring it
with a salt. This algorithm is mainly useful for CTR and similar modes.
This patch also sets it as the default IV generator for ctr.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/ctr.c')
-rw-r--r-- | crypto/ctr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/ctr.c b/crypto/ctr.c index 1052b318aed2..2d7425f0e7b8 100644 --- a/crypto/ctr.c +++ b/crypto/ctr.c | |||
@@ -361,6 +361,8 @@ static struct crypto_instance *crypto_rfc3686_alloc(struct rtattr **tb) | |||
361 | inst->alg.cra_blkcipher.max_keysize = alg->cra_blkcipher.max_keysize | 361 | inst->alg.cra_blkcipher.max_keysize = alg->cra_blkcipher.max_keysize |
362 | + CTR_RFC3686_NONCE_SIZE; | 362 | + CTR_RFC3686_NONCE_SIZE; |
363 | 363 | ||
364 | inst->alg.cra_blkcipher.geniv = "seqiv"; | ||
365 | |||
364 | inst->alg.cra_ctxsize = sizeof(struct crypto_rfc3686_ctx); | 366 | inst->alg.cra_ctxsize = sizeof(struct crypto_rfc3686_ctx); |
365 | 367 | ||
366 | inst->alg.cra_init = crypto_rfc3686_init_tfm; | 368 | inst->alg.cra_init = crypto_rfc3686_init_tfm; |