crypto: caam - add sha224 and sha384 variants to existing AEAD algorithms
Signed-off-by: Hemant Agrawal <hemant@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
e7a2577a41
commit
e863f9ccc7
|
@ -1843,6 +1843,25 @@ static struct caam_alg_template driver_algs[] = {
|
||||||
.class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP,
|
.class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
.alg_op = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC,
|
.alg_op = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.name = "authenc(hmac(sha224),cbc(aes))",
|
||||||
|
.driver_name = "authenc-hmac-sha224-cbc-aes-caam",
|
||||||
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
|
.template_aead = {
|
||||||
|
.setkey = aead_setkey,
|
||||||
|
.setauthsize = aead_setauthsize,
|
||||||
|
.encrypt = aead_encrypt,
|
||||||
|
.decrypt = aead_decrypt,
|
||||||
|
.givencrypt = aead_givencrypt,
|
||||||
|
.geniv = "<built-in>",
|
||||||
|
.ivsize = AES_BLOCK_SIZE,
|
||||||
|
.maxauthsize = SHA224_DIGEST_SIZE,
|
||||||
|
},
|
||||||
|
.class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC,
|
||||||
|
.class2_alg_type = OP_ALG_ALGSEL_SHA224 |
|
||||||
|
OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
|
.alg_op = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.name = "authenc(hmac(sha256),cbc(aes))",
|
.name = "authenc(hmac(sha256),cbc(aes))",
|
||||||
.driver_name = "authenc-hmac-sha256-cbc-aes-caam",
|
.driver_name = "authenc-hmac-sha256-cbc-aes-caam",
|
||||||
|
@ -1863,6 +1882,26 @@ static struct caam_alg_template driver_algs[] = {
|
||||||
OP_ALG_AAI_HMAC_PRECOMP,
|
OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
.alg_op = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC,
|
.alg_op = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.name = "authenc(hmac(sha384),cbc(aes))",
|
||||||
|
.driver_name = "authenc-hmac-sha384-cbc-aes-caam",
|
||||||
|
.blocksize = AES_BLOCK_SIZE,
|
||||||
|
.template_aead = {
|
||||||
|
.setkey = aead_setkey,
|
||||||
|
.setauthsize = aead_setauthsize,
|
||||||
|
.encrypt = aead_encrypt,
|
||||||
|
.decrypt = aead_decrypt,
|
||||||
|
.givencrypt = aead_givencrypt,
|
||||||
|
.geniv = "<built-in>",
|
||||||
|
.ivsize = AES_BLOCK_SIZE,
|
||||||
|
.maxauthsize = SHA384_DIGEST_SIZE,
|
||||||
|
},
|
||||||
|
.class1_alg_type = OP_ALG_ALGSEL_AES | OP_ALG_AAI_CBC,
|
||||||
|
.class2_alg_type = OP_ALG_ALGSEL_SHA384 |
|
||||||
|
OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
|
.alg_op = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
.name = "authenc(hmac(sha512),cbc(aes))",
|
.name = "authenc(hmac(sha512),cbc(aes))",
|
||||||
.driver_name = "authenc-hmac-sha512-cbc-aes-caam",
|
.driver_name = "authenc-hmac-sha512-cbc-aes-caam",
|
||||||
|
@ -1921,6 +1960,25 @@ static struct caam_alg_template driver_algs[] = {
|
||||||
.class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP,
|
.class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
.alg_op = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC,
|
.alg_op = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.name = "authenc(hmac(sha224),cbc(des3_ede))",
|
||||||
|
.driver_name = "authenc-hmac-sha224-cbc-des3_ede-caam",
|
||||||
|
.blocksize = DES3_EDE_BLOCK_SIZE,
|
||||||
|
.template_aead = {
|
||||||
|
.setkey = aead_setkey,
|
||||||
|
.setauthsize = aead_setauthsize,
|
||||||
|
.encrypt = aead_encrypt,
|
||||||
|
.decrypt = aead_decrypt,
|
||||||
|
.givencrypt = aead_givencrypt,
|
||||||
|
.geniv = "<built-in>",
|
||||||
|
.ivsize = DES3_EDE_BLOCK_SIZE,
|
||||||
|
.maxauthsize = SHA224_DIGEST_SIZE,
|
||||||
|
},
|
||||||
|
.class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC,
|
||||||
|
.class2_alg_type = OP_ALG_ALGSEL_SHA224 |
|
||||||
|
OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
|
.alg_op = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.name = "authenc(hmac(sha256),cbc(des3_ede))",
|
.name = "authenc(hmac(sha256),cbc(des3_ede))",
|
||||||
.driver_name = "authenc-hmac-sha256-cbc-des3_ede-caam",
|
.driver_name = "authenc-hmac-sha256-cbc-des3_ede-caam",
|
||||||
|
@ -1941,6 +1999,25 @@ static struct caam_alg_template driver_algs[] = {
|
||||||
OP_ALG_AAI_HMAC_PRECOMP,
|
OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
.alg_op = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC,
|
.alg_op = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.name = "authenc(hmac(sha384),cbc(des3_ede))",
|
||||||
|
.driver_name = "authenc-hmac-sha384-cbc-des3_ede-caam",
|
||||||
|
.blocksize = DES3_EDE_BLOCK_SIZE,
|
||||||
|
.template_aead = {
|
||||||
|
.setkey = aead_setkey,
|
||||||
|
.setauthsize = aead_setauthsize,
|
||||||
|
.encrypt = aead_encrypt,
|
||||||
|
.decrypt = aead_decrypt,
|
||||||
|
.givencrypt = aead_givencrypt,
|
||||||
|
.geniv = "<built-in>",
|
||||||
|
.ivsize = DES3_EDE_BLOCK_SIZE,
|
||||||
|
.maxauthsize = SHA384_DIGEST_SIZE,
|
||||||
|
},
|
||||||
|
.class1_alg_type = OP_ALG_ALGSEL_3DES | OP_ALG_AAI_CBC,
|
||||||
|
.class2_alg_type = OP_ALG_ALGSEL_SHA384 |
|
||||||
|
OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
|
.alg_op = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.name = "authenc(hmac(sha512),cbc(des3_ede))",
|
.name = "authenc(hmac(sha512),cbc(des3_ede))",
|
||||||
.driver_name = "authenc-hmac-sha512-cbc-des3_ede-caam",
|
.driver_name = "authenc-hmac-sha512-cbc-des3_ede-caam",
|
||||||
|
@ -1999,6 +2076,25 @@ static struct caam_alg_template driver_algs[] = {
|
||||||
.class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP,
|
.class2_alg_type = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
.alg_op = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC,
|
.alg_op = OP_ALG_ALGSEL_SHA1 | OP_ALG_AAI_HMAC,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.name = "authenc(hmac(sha224),cbc(des))",
|
||||||
|
.driver_name = "authenc-hmac-sha224-cbc-des-caam",
|
||||||
|
.blocksize = DES_BLOCK_SIZE,
|
||||||
|
.template_aead = {
|
||||||
|
.setkey = aead_setkey,
|
||||||
|
.setauthsize = aead_setauthsize,
|
||||||
|
.encrypt = aead_encrypt,
|
||||||
|
.decrypt = aead_decrypt,
|
||||||
|
.givencrypt = aead_givencrypt,
|
||||||
|
.geniv = "<built-in>",
|
||||||
|
.ivsize = DES_BLOCK_SIZE,
|
||||||
|
.maxauthsize = SHA224_DIGEST_SIZE,
|
||||||
|
},
|
||||||
|
.class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC,
|
||||||
|
.class2_alg_type = OP_ALG_ALGSEL_SHA224 |
|
||||||
|
OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
|
.alg_op = OP_ALG_ALGSEL_SHA224 | OP_ALG_AAI_HMAC,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.name = "authenc(hmac(sha256),cbc(des))",
|
.name = "authenc(hmac(sha256),cbc(des))",
|
||||||
.driver_name = "authenc-hmac-sha256-cbc-des-caam",
|
.driver_name = "authenc-hmac-sha256-cbc-des-caam",
|
||||||
|
@ -2019,6 +2115,25 @@ static struct caam_alg_template driver_algs[] = {
|
||||||
OP_ALG_AAI_HMAC_PRECOMP,
|
OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
.alg_op = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC,
|
.alg_op = OP_ALG_ALGSEL_SHA256 | OP_ALG_AAI_HMAC,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.name = "authenc(hmac(sha384),cbc(des))",
|
||||||
|
.driver_name = "authenc-hmac-sha384-cbc-des-caam",
|
||||||
|
.blocksize = DES_BLOCK_SIZE,
|
||||||
|
.template_aead = {
|
||||||
|
.setkey = aead_setkey,
|
||||||
|
.setauthsize = aead_setauthsize,
|
||||||
|
.encrypt = aead_encrypt,
|
||||||
|
.decrypt = aead_decrypt,
|
||||||
|
.givencrypt = aead_givencrypt,
|
||||||
|
.geniv = "<built-in>",
|
||||||
|
.ivsize = DES_BLOCK_SIZE,
|
||||||
|
.maxauthsize = SHA384_DIGEST_SIZE,
|
||||||
|
},
|
||||||
|
.class1_alg_type = OP_ALG_ALGSEL_DES | OP_ALG_AAI_CBC,
|
||||||
|
.class2_alg_type = OP_ALG_ALGSEL_SHA384 |
|
||||||
|
OP_ALG_AAI_HMAC_PRECOMP,
|
||||||
|
.alg_op = OP_ALG_ALGSEL_SHA384 | OP_ALG_AAI_HMAC,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.name = "authenc(hmac(sha512),cbc(des))",
|
.name = "authenc(hmac(sha512),cbc(des))",
|
||||||
.driver_name = "authenc-hmac-sha512-cbc-des-caam",
|
.driver_name = "authenc-hmac-sha512-cbc-des-caam",
|
||||||
|
|
Loading…
Reference in a new issue