Skip to content

Commit 71ebc4d

Browse files
martinwilliherbertx
authored andcommitted
crypto: chacha20poly1305 - Add a ChaCha20-Poly1305 AEAD construction, RFC7539
This AEAD uses a chacha20 ablkcipher and a poly1305 ahash to construct the ChaCha20-Poly1305 AEAD as defined in RFC7539. It supports both synchronous and asynchronous operations, even if we currently have no async chacha20 or poly1305 drivers. Signed-off-by: Martin Willi <martin@strongswan.org> Acked-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent eee9dc6 commit 71ebc4d

3 files changed

Lines changed: 676 additions & 0 deletions

File tree

‎crypto/Kconfig‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,18 @@ config CRYPTO_GCM
217217
Support for Galois/Counter Mode (GCM) and Galois Message
218218
Authentication Code (GMAC). Required for IPSec.
219219

220+
config CRYPTO_CHACHA20POLY1305
221+
tristate "ChaCha20-Poly1305 AEAD support"
222+
select CRYPTO_CHACHA20
223+
select CRYPTO_POLY1305
224+
select CRYPTO_AEAD
225+
help
226+
ChaCha20-Poly1305 AEAD support, RFC7539.
227+
228+
Support for the AEAD wrapper using the ChaCha20 stream cipher combined
229+
with the Poly1305 authenticator. It is defined in RFC7539 for use in
230+
IETF protocols.
231+
220232
config CRYPTO_SEQIV
221233
tristate "Sequence Number IV Generator"
222234
select CRYPTO_AEAD

‎crypto/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ obj-$(CONFIG_CRYPTO_XTS) += xts.o
5959
obj-$(CONFIG_CRYPTO_CTR) += ctr.o
6060
obj-$(CONFIG_CRYPTO_GCM) += gcm.o
6161
obj-$(CONFIG_CRYPTO_CCM) += ccm.o
62+
obj-$(CONFIG_CRYPTO_CHACHA20POLY1305) += chacha20poly1305.o
6263
obj-$(CONFIG_CRYPTO_PCRYPT) += pcrypt.o
6364
obj-$(CONFIG_CRYPTO_CRYPTD) += cryptd.o
6465
obj-$(CONFIG_CRYPTO_MCRYPTD) += mcryptd.o

0 commit comments

Comments
 (0)