Home
last modified time | relevance | path

Searched refs:k_pad (Results 1 – 4 of 4) sorted by relevance

/hal_espressif-3.4.0/components/wpa_supplicant/src/crypto/
Dcrypto_internal.c41 u8 k_pad[64]; in crypto_hash_init() local
74 if (key_len > sizeof(k_pad)) { in crypto_hash_init()
84 os_memcpy(k_pad, key, key_len); in crypto_hash_init()
85 if (key_len < sizeof(k_pad)) in crypto_hash_init()
86 os_memset(k_pad + key_len, 0, sizeof(k_pad) - key_len); in crypto_hash_init()
87 for (i = 0; i < sizeof(k_pad); i++) in crypto_hash_init()
88 k_pad[i] ^= 0x36; in crypto_hash_init()
90 MD5Update(&ctx->u.md5, k_pad, sizeof(k_pad)); in crypto_hash_init()
93 if (key_len > sizeof(k_pad)) { in crypto_hash_init()
103 os_memcpy(k_pad, key, key_len); in crypto_hash_init()
[all …]
Dsha1.c29 unsigned char k_pad[64]; /* padding - key XORd with ipad/opad */ in hmac_sha1_vector() local
61 os_memset(k_pad, 0, sizeof(k_pad)); in hmac_sha1_vector()
62 os_memcpy(k_pad, key, key_len); in hmac_sha1_vector()
65 k_pad[i] ^= 0x36; in hmac_sha1_vector()
68 _addr[0] = k_pad; in hmac_sha1_vector()
77 os_memset(k_pad, 0, sizeof(k_pad)); in hmac_sha1_vector()
78 os_memcpy(k_pad, key, key_len); in hmac_sha1_vector()
81 k_pad[i] ^= 0x5c; in hmac_sha1_vector()
84 _addr[0] = k_pad; in hmac_sha1_vector()
89 forced_memzero(k_pad, sizeof(k_pad)); in hmac_sha1_vector()
Dmd5.c29 u8 k_pad[64]; /* padding - key XORd with ipad/opad */ in hmac_md5_vector() local
61 os_memset(k_pad, 0, sizeof(k_pad)); in hmac_md5_vector()
62 os_memcpy(k_pad, key, key_len); in hmac_md5_vector()
66 k_pad[i] ^= 0x36; in hmac_md5_vector()
69 _addr[0] = k_pad; in hmac_md5_vector()
78 os_memset(k_pad, 0, sizeof(k_pad)); in hmac_md5_vector()
79 os_memcpy(k_pad, key, key_len); in hmac_md5_vector()
82 k_pad[i] ^= 0x5c; in hmac_md5_vector()
85 _addr[0] = k_pad; in hmac_md5_vector()
90 os_memset(k_pad, 0, sizeof(k_pad)); in hmac_md5_vector()
Dsha256.c29 unsigned char k_pad[64]; /* padding - key XORd with ipad/opad */ in hmac_sha256_vector() local
60 os_memset(k_pad, 0, sizeof(k_pad)); in hmac_sha256_vector()
61 os_memcpy(k_pad, key, key_len); in hmac_sha256_vector()
64 k_pad[i] ^= 0x36; in hmac_sha256_vector()
67 _addr[0] = k_pad; in hmac_sha256_vector()
76 os_memset(k_pad, 0, sizeof(k_pad)); in hmac_sha256_vector()
77 os_memcpy(k_pad, key, key_len); in hmac_sha256_vector()
80 k_pad[i] ^= 0x5c; in hmac_sha256_vector()
83 _addr[0] = k_pad; in hmac_sha256_vector()