diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2014-01-24 23:18:02 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-02-09 02:59:23 +0100 |
commit | c11baa02c5d6ea06362fa61da070af34b7706c83 (patch) | |
tree | 0075799191d2786575589ce71b02ee49fdc2a957 /drivers/crypto/ccp/ccp-crypto.h | |
parent | crypto: ccp - Allow for selective disablement of crypto API algorithms (diff) | |
download | linux-c11baa02c5d6ea06362fa61da070af34b7706c83.tar.xz linux-c11baa02c5d6ea06362fa61da070af34b7706c83.zip |
crypto: ccp - Move HMAC calculation down to ccp ops file
Move the support to perform an HMAC calculation into
the CCP operations file. This eliminates the need to
perform a synchronous SHA operation used to calculate
the HMAC.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-crypto.h')
-rw-r--r-- | drivers/crypto/ccp/ccp-crypto.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/crypto/ccp/ccp-crypto.h b/drivers/crypto/ccp/ccp-crypto.h index b222231b6169..9aa4ae184f7f 100644 --- a/drivers/crypto/ccp/ccp-crypto.h +++ b/drivers/crypto/ccp/ccp-crypto.h @@ -137,11 +137,14 @@ struct ccp_aes_cmac_req_ctx { #define MAX_SHA_BLOCK_SIZE SHA256_BLOCK_SIZE struct ccp_sha_ctx { + struct scatterlist opad_sg; + unsigned int opad_count; + unsigned int key_len; u8 key[MAX_SHA_BLOCK_SIZE]; u8 ipad[MAX_SHA_BLOCK_SIZE]; u8 opad[MAX_SHA_BLOCK_SIZE]; - struct crypto_ahash *hmac_tfm; + struct crypto_shash *hmac_tfm; }; struct ccp_sha_req_ctx { @@ -167,9 +170,6 @@ struct ccp_sha_req_ctx { unsigned int buf_count; u8 buf[MAX_SHA_BLOCK_SIZE]; - /* HMAC support field */ - struct scatterlist pad_sg; - /* CCP driver command */ struct ccp_cmd cmd; }; |