Skip to content

Commit

Permalink
crypto: echainiv - Add encrypted chain IV generator
Browse files Browse the repository at this point in the history
This patch adds a new AEAD IV generator echainiv.  It is intended
to replace the existing skcipher IV generator eseqiv.

If the underlying AEAD algorithm is using the old AEAD interface,
then echainiv will simply use its IV generator.

Otherwise, echainiv will encrypt a counter just like eseqiv but
it'll first xor it against a previously stored IV similar to
chainiv.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed May 22, 2015
1 parent 3c08fee commit a10f554
Show file tree
Hide file tree
Showing 3 changed files with 542 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crypto/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,16 @@ config CRYPTO_SEQIV
This IV generator generates an IV based on a sequence number by
xoring it with a salt. This algorithm is mainly useful for CTR

config CRYPTO_ECHAINIV
tristate "Encrypted Chain IV Generator"
select CRYPTO_AEAD
select CRYPTO_NULL
select CRYPTO_RNG
help
This IV generator generates an IV based on the encryption of
a sequence number xored with a salt. This is the default
algorithm for CBC.

comment "Block modes"

config CRYPTO_CBC
Expand Down
1 change: 1 addition & 0 deletions crypto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ obj-$(CONFIG_CRYPTO_BLKCIPHER2) += crypto_blkcipher.o
obj-$(CONFIG_CRYPTO_BLKCIPHER2) += chainiv.o
obj-$(CONFIG_CRYPTO_BLKCIPHER2) += eseqiv.o
obj-$(CONFIG_CRYPTO_SEQIV) += seqiv.o
obj-$(CONFIG_CRYPTO_ECHAINIV) += echainiv.o

crypto_hash-y += ahash.o
crypto_hash-y += shash.o
Expand Down
Loading

0 comments on commit a10f554

Please sign in to comment.