Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: qce - Add mode for rfc4309

rf4309 is the specification that uses aes ccm algorithms with IPsec
security packets. Add a submode to identify rfc4309 ccm(aes) algorithm
in the crypto driver.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Thara Gopinath and committed by
Herbert Xu
7ba9cd4e 6c34e446

+5 -2
+5 -2
drivers/crypto/qce/common.h
··· 51 51 #define QCE_MODE_CCM BIT(12) 52 52 #define QCE_MODE_MASK GENMASK(12, 8) 53 53 54 + #define QCE_MODE_CCM_RFC4309 BIT(13) 55 + 54 56 /* cipher encryption/decryption operations */ 55 - #define QCE_ENCRYPT BIT(13) 56 - #define QCE_DECRYPT BIT(14) 57 + #define QCE_ENCRYPT BIT(30) 58 + #define QCE_DECRYPT BIT(31) 57 59 58 60 #define IS_DES(flags) (flags & QCE_ALG_DES) 59 61 #define IS_3DES(flags) (flags & QCE_ALG_3DES) ··· 75 73 #define IS_CTR(mode) (mode & QCE_MODE_CTR) 76 74 #define IS_XTS(mode) (mode & QCE_MODE_XTS) 77 75 #define IS_CCM(mode) (mode & QCE_MODE_CCM) 76 + #define IS_CCM_RFC4309(mode) ((mode) & QCE_MODE_CCM_RFC4309) 78 77 79 78 #define IS_ENCRYPT(dir) (dir & QCE_ENCRYPT) 80 79 #define IS_DECRYPT(dir) (dir & QCE_DECRYPT)