Searched refs:ipad (Results 1 - 5 of 5) sorted by relevance

/illumos-gate/usr/src/lib/pkcs11/pkcs11_softtoken/common/
H A DsoftMAC.h99 #define SOFT_MAC_INIT_CTX(HASH, mac_ctx, ipad, opad, len) \
100 /* Perform HASH on ipad */ \
102 HASH##Update(&((mac_ctx)->hc_icontext), ipad, len); \
H A DsoftMAC.c205 /* SSL MAC is HASH(key + opad + HASH(key + ipad + data)) */
271 /* SSL MAC is HASH(key + opad + HASH(key + ipad + data)) */
641 * the ipad and opad
644 md5_hmac_ctx_init(md5_hc_ctx_t *md5_hmac_ctx, uint32_t *ipad, uint32_t *opad) argument
647 /* XOR key with ipad (0x36) and opad (0x5c) */
649 ipad[i] ^= 0x36363636;
652 SOFT_MAC_INIT_CTX(MD5, md5_hmac_ctx, ipad, opad, MD5_HMAC_BLOCK_SIZE);
656 sha1_hmac_ctx_init(sha1_hc_ctx_t *sha1_hmac_ctx, uint32_t *ipad, uint32_t *opad) argument
659 /* XOR key with ipad (0x36) and opad (0x5c) */
661 ipad[
670 sha2_hmac_ctx_init(uint_t mech, sha2_hc_ctx_t *ctx, uint64_t *ipad, uint64_t *opad, uint_t blocks_per_int64, uint_t block_size) argument
[all...]
/illumos-gate/usr/src/uts/common/crypto/io/
H A Dmd5_mod.c845 * MD5 HMAC is: MD5(key XOR opad, MD5(key XOR ipad, text))
850 * - for inner context: MD5(key XOR ipad)
872 uint32_t ipad[MD5_HMAC_INTS_PER_BLOCK]; local
876 bzero(ipad, MD5_HMAC_BLOCK_SIZE);
879 bcopy(keyval, ipad, length_in_bytes);
882 /* XOR key with ipad (0x36) and opad (0x5c) */
884 ipad[i] ^= 0x36363636;
888 /* perform MD5 on ipad */
890 MD5Update(&ctx->hc_icontext, ipad, MD5_HMAC_BLOCK_SIZE);
H A Dsha1_mod.c789 * SHA1 HMAC is: SHA1(key XOR opad, SHA1(key XOR ipad, text))
794 * - for inner context: SHA1(key XOR ipad)
816 uint32_t ipad[SHA1_HMAC_INTS_PER_BLOCK]; local
820 bzero(ipad, SHA1_HMAC_BLOCK_SIZE);
823 bcopy(keyval, ipad, length_in_bytes);
826 /* XOR key with ipad (0x36) and opad (0x5c) */
828 ipad[i] ^= 0x36363636;
832 /* perform SHA1 on ipad */
834 SHA1Update(&ctx->hc_icontext, (uint8_t *)ipad, SHA1_HMAC_BLOCK_SIZE);
H A Dsha2_mod.c851 * SHA2 HMAC is: SHA2(key XOR opad, SHA2(key XOR ipad, text))
856 * - for inner context: SHA2(key XOR ipad)
878 uint64_t ipad[SHA512_HMAC_BLOCK_SIZE / sizeof (uint64_t)]; local
891 (void) bzero(ipad, block_size);
893 (void) bcopy(keyval, ipad, length_in_bytes);
896 /* XOR key with ipad (0x36) and opad (0x5c) */
898 ipad[i] ^= 0x3636363636363636;
902 /* perform SHA2 on ipad */
904 SHA2Update(&ctx->hc_icontext, (uint8_t *)ipad, block_size);

Completed in 83 milliseconds