summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorAntoine Ténart <antoine.tenart@free-electrons.com>2017-06-15 09:56:17 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2017-06-20 05:21:41 +0200
commitaed3731e9039285c1d98f7636f5be92ea5db9e6a (patch)
tree80912422119685e2718ddd5183c752c5429f6288 /drivers/crypto
parentcrypto: chcr - Select device in Round Robin fashion (diff)
downloadlinux-aed3731e9039285c1d98f7636f5be92ea5db9e6a.tar.xz
linux-aed3731e9039285c1d98f7636f5be92ea5db9e6a.zip
crypto: inside-secure - use hmac ipad/opad constants
Replace the hmac ipad/opad values by their defined constants. Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/inside-secure/safexcel_hash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c
index 060ea034c9da..6eee1a502225 100644
--- a/drivers/crypto/inside-secure/safexcel_hash.c
+++ b/drivers/crypto/inside-secure/safexcel_hash.c
@@ -8,6 +8,7 @@
* warranty of any kind, whether express or implied.
*/
+#include <crypto/hmac.h>
#include <crypto/sha.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
@@ -774,8 +775,8 @@ static int safexcel_hmac_init_pad(struct ahash_request *areq,
memcpy(opad, ipad, blocksize);
for (i = 0; i < blocksize; i++) {
- ipad[i] ^= 0x36;
- opad[i] ^= 0x5c;
+ ipad[i] ^= HMAC_IPAD_VALUE;
+ opad[i] ^= HMAC_OPAD_VALUE;
}
return 0;