aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ccp.h
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2014-01-24 17:18:02 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2014-02-08 20:59:23 -0500
commitc11baa02c5d6ea06362fa61da070af34b7706c83 (patch)
tree0075799191d2786575589ce71b02ee49fdc2a957 /include/linux/ccp.h
parentd81ed6534fd988a8a24fb607b459444d4b3d391a (diff)
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 'include/linux/ccp.h')
-rw-r--r--include/linux/ccp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/ccp.h b/include/linux/ccp.h
index b941ab9f762b..ebcc9d146219 100644
--- a/include/linux/ccp.h
+++ b/include/linux/ccp.h
@@ -232,6 +232,9 @@ enum ccp_sha_type {
232 * @ctx_len: length in bytes of hash value 232 * @ctx_len: length in bytes of hash value
233 * @src: data to be used for this operation 233 * @src: data to be used for this operation
234 * @src_len: length in bytes of data used for this operation 234 * @src_len: length in bytes of data used for this operation
235 * @opad: data to be used for final HMAC operation
236 * @opad_len: length in bytes of data used for final HMAC operation
237 * @first: indicates first SHA operation
235 * @final: indicates final SHA operation 238 * @final: indicates final SHA operation
236 * @msg_bits: total length of the message in bits used in final SHA operation 239 * @msg_bits: total length of the message in bits used in final SHA operation
237 * 240 *
@@ -251,6 +254,10 @@ struct ccp_sha_engine {
251 struct scatterlist *src; 254 struct scatterlist *src;
252 u64 src_len; /* In bytes */ 255 u64 src_len; /* In bytes */
253 256
257 struct scatterlist *opad;
258 u32 opad_len; /* In bytes */
259
260 u32 first; /* Indicates first sha cmd */
254 u32 final; /* Indicates final sha cmd */ 261 u32 final; /* Indicates final sha cmd */
255 u64 msg_bits; /* Message length in bits required for 262 u64 msg_bits; /* Message length in bits required for
256 * final sha cmd */ 263 * final sha cmd */