summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/bcm
diff options
context:
space:
mode:
authorCorentin LABBE2017-05-19 08:53:24 +0200
committerHerbert Xu2017-05-23 06:52:06 +0200
commit1126d47db0cf40a5f31060095507ea5416a43344 (patch)
treea4842dce2cf27f28bd3032e8a2f0e3c5e5d8ca96 /drivers/crypto/bcm
parentcrypto: hmac - add hmac IPAD/OPAD constant (diff)
downloadkernel-qcow2-linux-1126d47db0cf40a5f31060095507ea5416a43344.tar.gz
kernel-qcow2-linux-1126d47db0cf40a5f31060095507ea5416a43344.tar.xz
kernel-qcow2-linux-1126d47db0cf40a5f31060095507ea5416a43344.zip
crypto: brcm - Use IPAD/OPAD constant
This patch simply replace all occurrence of HMAC IPAD/OPAD value by their define. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/bcm')
-rw-r--r--drivers/crypto/bcm/cipher.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/crypto/bcm/cipher.c b/drivers/crypto/bcm/cipher.c
index cc0d5b98006e..61393dc70b0b 100644
--- a/drivers/crypto/bcm/cipher.c
+++ b/drivers/crypto/bcm/cipher.c
@@ -36,6 +36,7 @@
#include <crypto/internal/aead.h>
#include <crypto/aes.h>
#include <crypto/des.h>
+#include <crypto/hmac.h>
#include <crypto/sha.h>
#include <crypto/md5.h>
#include <crypto/authenc.h>
@@ -2510,8 +2511,8 @@ static int ahash_hmac_setkey(struct crypto_ahash *ahash, const u8 *key,
memcpy(ctx->opad, ctx->ipad, blocksize);
for (index = 0; index < blocksize; index++) {
- ctx->ipad[index] ^= 0x36;
- ctx->opad[index] ^= 0x5c;
+ ctx->ipad[index] ^= HMAC_IPAD_VALUE;
+ ctx->opad[index] ^= HMAC_OPAD_VALUE;
}
flow_dump(" ipad: ", ctx->ipad, blocksize);