summaryrefslogtreecommitdiff
path: root/drivers/crypto/ccp/ccp-crypto.h
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2014-01-25 02:18:02 +0400
committerHerbert Xu <herbert@gondor.apana.org.au>2014-02-09 05:59:23 +0400
commitc11baa02c5d6ea06362fa61da070af34b7706c83 (patch)
tree0075799191d2786575589ce71b02ee49fdc2a957 /drivers/crypto/ccp/ccp-crypto.h
parentd81ed6534fd988a8a24fb607b459444d4b3d391a (diff)
downloadlinux-c11baa02c5d6ea06362fa61da070af34b7706c83.tar.xz
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.h8
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;
};