diff options
author | Horia Geantă <horia.geanta@nxp.com> | 2018-11-08 15:36:28 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-11-16 14:11:03 +0800 |
commit | c99d4a2454009d6fb51e03248fac7629c4d6a5ca (patch) | |
tree | dc86d404d68af323a327b995341c2b8040263b2f /drivers/crypto/caam/desc.h | |
parent | d239b10d4ceb986d998779a4ed81824368aca831 (diff) | |
download | lwn-c99d4a2454009d6fb51e03248fac7629c4d6a5ca.tar.gz lwn-c99d4a2454009d6fb51e03248fac7629c4d6a5ca.zip |
crypto: caam/qi2 - add support for ChaCha20
Add support for ChaCha20 skcipher algorithm.
Signed-off-by: Carmen Iorga <carmen.iorga@nxp.com>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/desc.h')
-rw-r--r-- | drivers/crypto/caam/desc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/crypto/caam/desc.h b/drivers/crypto/caam/desc.h index ec1ef06049b4..9d117e51629f 100644 --- a/drivers/crypto/caam/desc.h +++ b/drivers/crypto/caam/desc.h @@ -1159,6 +1159,7 @@ #define OP_ALG_ALGSEL_KASUMI (0x70 << OP_ALG_ALGSEL_SHIFT) #define OP_ALG_ALGSEL_CRC (0x90 << OP_ALG_ALGSEL_SHIFT) #define OP_ALG_ALGSEL_SNOW_F9 (0xA0 << OP_ALG_ALGSEL_SHIFT) +#define OP_ALG_ALGSEL_CHACHA20 (0xD0 << OP_ALG_ALGSEL_SHIFT) #define OP_ALG_AAI_SHIFT 4 #define OP_ALG_AAI_MASK (0x1ff << OP_ALG_AAI_SHIFT) @@ -1206,6 +1207,11 @@ #define OP_ALG_AAI_RNG4_AI (0x80 << OP_ALG_AAI_SHIFT) #define OP_ALG_AAI_RNG4_SK (0x100 << OP_ALG_AAI_SHIFT) +/* Chacha20 AAI set */ +#define OP_ALG_AAI_AEAD (0x002 << OP_ALG_AAI_SHIFT) +#define OP_ALG_AAI_KEYSTREAM (0x001 << OP_ALG_AAI_SHIFT) +#define OP_ALG_AAI_BC8 (0x008 << OP_ALG_AAI_SHIFT) + /* hmac/smac AAI set */ #define OP_ALG_AAI_HASH (0x00 << OP_ALG_AAI_SHIFT) #define OP_ALG_AAI_HMAC (0x01 << OP_ALG_AAI_SHIFT) |