]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
crypto: inside-secure - use hmac ipad/opad constants
authorAntoine Ténart <antoine.tenart@free-electrons.com>
Thu, 15 Jun 2017 07:56:17 +0000 (09:56 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 20 Jun 2017 03:21:41 +0000 (11:21 +0800)
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>
drivers/crypto/inside-secure/safexcel_hash.c

index 060ea034c9daa00328f67484ae6362bdcf1fedad..6eee1a502225864ec65bbe552b538cabf217b349 100644 (file)
@@ -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;