mirror of
https://github.com/a52xq-dev/kernel.git
synced 2026-10-18 21:58:11 +07:00
[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>
This commit is contained in:
parent
45d44eb56a
commit
0a270321db
1 changed files with 198 additions and 0 deletions
|
|
@ -361,6 +361,8 @@ static struct crypto_instance *crypto_rfc3686_alloc(struct rtattr **tb)
|
|||
inst->alg.cra_blkcipher.max_keysize = alg->cra_blkcipher.max_keysize
|
||||
+ CTR_RFC3686_NONCE_SIZE;
|
||||
|
||||
inst->alg.cra_blkcipher.geniv = "seqiv";
|
||||
|
||||
inst->alg.cra_ctxsize = sizeof(struct crypto_rfc3686_ctx);
|
||||
|
||||
inst->alg.cra_init = crypto_rfc3686_init_tfm;
|
||||
|
|
|
|||
Loading…
Reference in a new issue