Home
last modified time | relevance | path

Searched refs:hmac_key (Results 1 – 14 of 14) sorted by relevance

/freebsd/crypto/openssl/providers/implementations/ciphers/
H A Dcipher_rc4_hmac_md5_hw.c196 unsigned char hmac_key[64]; in cipher_hw_rc4_hmac_md5_init_mackey() local
198 memset(hmac_key, 0, sizeof(hmac_key)); in cipher_hw_rc4_hmac_md5_init_mackey()
200 if (len > (int)sizeof(hmac_key)) { in cipher_hw_rc4_hmac_md5_init_mackey()
203 MD5_Final(hmac_key, &ctx->head); in cipher_hw_rc4_hmac_md5_init_mackey()
205 memcpy(hmac_key, key, len); in cipher_hw_rc4_hmac_md5_init_mackey()
208 for (i = 0; i < sizeof(hmac_key); i++) in cipher_hw_rc4_hmac_md5_init_mackey()
209 hmac_key[i] ^= 0x36; /* ipad */ in cipher_hw_rc4_hmac_md5_init_mackey()
211 MD5_Update(&ctx->head, hmac_key, sizeof(hmac_key)); in cipher_hw_rc4_hmac_md5_init_mackey()
213 for (i = 0; i < sizeof(hmac_key); i++) in cipher_hw_rc4_hmac_md5_init_mackey()
214 hmac_key[i] ^= 0x36 ^ 0x5c; /* opad */ in cipher_hw_rc4_hmac_md5_init_mackey()
[all …]
H A Dcipher_aes_cbc_hmac_sha1_hw.c637 unsigned char hmac_key[64]; in aesni_cbc_hmac_sha1_set_mac_key() local
639 memset(hmac_key, 0, sizeof(hmac_key)); in aesni_cbc_hmac_sha1_set_mac_key()
641 if (len > (int)sizeof(hmac_key)) { in aesni_cbc_hmac_sha1_set_mac_key()
644 SHA1_Final(hmac_key, &ctx->head); in aesni_cbc_hmac_sha1_set_mac_key()
646 memcpy(hmac_key, mac, len); in aesni_cbc_hmac_sha1_set_mac_key()
649 for (i = 0; i < sizeof(hmac_key); i++) in aesni_cbc_hmac_sha1_set_mac_key()
650 hmac_key[i] ^= 0x36; /* ipad */ in aesni_cbc_hmac_sha1_set_mac_key()
652 sha1_update(&ctx->head, hmac_key, sizeof(hmac_key)); in aesni_cbc_hmac_sha1_set_mac_key()
654 for (i = 0; i < sizeof(hmac_key); i++) in aesni_cbc_hmac_sha1_set_mac_key()
655 hmac_key[i] ^= 0x36 ^ 0x5c; /* opad */ in aesni_cbc_hmac_sha1_set_mac_key()
[all …]
H A Dcipher_aes_cbc_hmac_sha256_hw.c690 unsigned char hmac_key[64]; in aesni_cbc_hmac_sha256_set_mac_key() local
692 memset(hmac_key, 0, sizeof(hmac_key)); in aesni_cbc_hmac_sha256_set_mac_key()
694 if (len > sizeof(hmac_key)) { in aesni_cbc_hmac_sha256_set_mac_key()
697 SHA256_Final(hmac_key, &ctx->head); in aesni_cbc_hmac_sha256_set_mac_key()
699 memcpy(hmac_key, mackey, len); in aesni_cbc_hmac_sha256_set_mac_key()
702 for (i = 0; i < sizeof(hmac_key); i++) in aesni_cbc_hmac_sha256_set_mac_key()
703 hmac_key[i] ^= 0x36; /* ipad */ in aesni_cbc_hmac_sha256_set_mac_key()
705 sha256_update(&ctx->head, hmac_key, sizeof(hmac_key)); in aesni_cbc_hmac_sha256_set_mac_key()
707 for (i = 0; i < sizeof(hmac_key); i++) in aesni_cbc_hmac_sha256_set_mac_key()
708 hmac_key[i] ^= 0x36 ^ 0x5c; /* opad */ in aesni_cbc_hmac_sha256_set_mac_key()
[all …]
/freebsd/crypto/openssl/crypto/evp/
H A De_rc4_hmac_md5.c195 unsigned char hmac_key[64]; in rc4_hmac_md5_ctrl() local
197 memset(hmac_key, 0, sizeof(hmac_key)); in rc4_hmac_md5_ctrl()
199 if (arg > (int)sizeof(hmac_key)) { in rc4_hmac_md5_ctrl()
202 MD5_Final(hmac_key, &key->head); in rc4_hmac_md5_ctrl()
204 memcpy(hmac_key, ptr, arg); in rc4_hmac_md5_ctrl()
207 for (i = 0; i < sizeof(hmac_key); i++) in rc4_hmac_md5_ctrl()
208 hmac_key[i] ^= 0x36; /* ipad */ in rc4_hmac_md5_ctrl()
210 MD5_Update(&key->head, hmac_key, sizeof(hmac_key)); in rc4_hmac_md5_ctrl()
212 for (i = 0; i < sizeof(hmac_key); i++) in rc4_hmac_md5_ctrl()
213 hmac_key[i] ^= 0x36 ^ 0x5c; /* opad */ in rc4_hmac_md5_ctrl()
[all …]
H A De_aes_cbc_hmac_sha1.c787 unsigned char hmac_key[64]; in aesni_cbc_hmac_sha1_ctrl() local
789 memset(hmac_key, 0, sizeof(hmac_key)); in aesni_cbc_hmac_sha1_ctrl()
791 if (arg > (int)sizeof(hmac_key)) { in aesni_cbc_hmac_sha1_ctrl()
794 SHA1_Final(hmac_key, &key->head); in aesni_cbc_hmac_sha1_ctrl()
796 memcpy(hmac_key, ptr, arg); in aesni_cbc_hmac_sha1_ctrl()
799 for (i = 0; i < sizeof(hmac_key); i++) in aesni_cbc_hmac_sha1_ctrl()
800 hmac_key[i] ^= 0x36; /* ipad */ in aesni_cbc_hmac_sha1_ctrl()
802 SHA1_Update(&key->head, hmac_key, sizeof(hmac_key)); in aesni_cbc_hmac_sha1_ctrl()
804 for (i = 0; i < sizeof(hmac_key); i++) in aesni_cbc_hmac_sha1_ctrl()
805 hmac_key[i] ^= 0x36 ^ 0x5c; /* opad */ in aesni_cbc_hmac_sha1_ctrl()
[all …]
H A De_aes_cbc_hmac_sha256.c758 unsigned char hmac_key[64]; in aesni_cbc_hmac_sha256_ctrl() local
760 memset(hmac_key, 0, sizeof(hmac_key)); in aesni_cbc_hmac_sha256_ctrl()
765 if (u_arg > sizeof(hmac_key)) { in aesni_cbc_hmac_sha256_ctrl()
768 SHA256_Final(hmac_key, &key->head); in aesni_cbc_hmac_sha256_ctrl()
770 memcpy(hmac_key, ptr, arg); in aesni_cbc_hmac_sha256_ctrl()
773 for (i = 0; i < sizeof(hmac_key); i++) in aesni_cbc_hmac_sha256_ctrl()
774 hmac_key[i] ^= 0x36; /* ipad */ in aesni_cbc_hmac_sha256_ctrl()
776 SHA256_Update(&key->head, hmac_key, sizeof(hmac_key)); in aesni_cbc_hmac_sha256_ctrl()
778 for (i = 0; i < sizeof(hmac_key); i++) in aesni_cbc_hmac_sha256_ctrl()
779 hmac_key[i] ^= 0x36 ^ 0x5c; /* opad */ in aesni_cbc_hmac_sha256_ctrl()
[all …]
/freebsd/sys/crypto/aesni/
H A Daesni.c791 uint8_t hmac_key[SHA1_BLOCK_LEN] __aligned(16); in aesni_cipher_mac() local
796 hmac_key[i] = key[i] ^ HMAC_IPAD_VAL; in aesni_cipher_mac()
797 for (i = keylen; i < sizeof(hmac_key); i++) in aesni_cipher_mac()
798 hmac_key[i] = 0 ^ HMAC_IPAD_VAL; in aesni_cipher_mac()
799 ses->hash_update(&sctx, hmac_key, sizeof(hmac_key)); in aesni_cipher_mac()
825 hmac_key[i] = key[i] ^ HMAC_OPAD_VAL; in aesni_cipher_mac()
826 for (i = keylen; i < sizeof(hmac_key); i++) in aesni_cipher_mac()
827 hmac_key[i] = 0 ^ HMAC_OPAD_VAL; in aesni_cipher_mac()
828 ses->hash_update(&sctx, hmac_key, sizeof(hmac_key)); in aesni_cipher_mac()
831 explicit_bzero(hmac_key, sizeof(hmac_key)); in aesni_cipher_mac()
/freebsd/crypto/openssl/apps/
H A Ddgst.c103 char *hmac_key = NULL; in dgst_main() local
200 hmac_key = "etaonrishdlcupfm"; in dgst_main()
203 hmac_key = opt_arg(); in dgst_main()
280 if ((!(mac_name == NULL) + !(keyfile == NULL) + !(hmac_key == NULL)) > 1) { in dgst_main()
333 if (hmac_key != NULL) { in dgst_main()
339 (unsigned char *)hmac_key, in dgst_main()
340 strlen(hmac_key)); in dgst_main()
H A Dspeed.c2729 static const char hmac_key[] = "This is a key..."; in speed_main() local
2730 int len = strlen(hmac_key); in speed_main()
2745 (char *)hmac_key, len); in speed_main()
/freebsd/sys/opencrypto/
H A Dcrypto.c386 uint8_t hmac_key[HMAC_MAX_BLOCK_LEN]; in hmac_init_pad() local
389 KASSERT(axf->blocksize <= sizeof(hmac_key), in hmac_init_pad()
396 memset(hmac_key, 0, sizeof(hmac_key)); in hmac_init_pad()
400 axf->Final(hmac_key, auth_ctx); in hmac_init_pad()
403 memcpy(hmac_key, key, klen); in hmac_init_pad()
406 hmac_key[i] ^= padval; in hmac_init_pad()
409 axf->Update(auth_ctx, hmac_key, axf->blocksize); in hmac_init_pad()
410 explicit_bzero(hmac_key, sizeof(hmac_key)); in hmac_init_pad()
/freebsd/contrib/unbound/util/
H A Dnet_help.c99 unsigned char *hmac_key;
1826 keys->hmac_key = data + 48; in tls_session_ticket_key_cb()
1875 ticket_keys->hmac_key, 32);
1885 if (HMAC_Init_ex(hmac_ctx, ticket_keys->hmac_key, 32, digest, NULL) != 1) { in hex_ntop()
1890 HMAC_Init_ex(hmac_ctx, ticket_keys->hmac_key, 32, digest, NULL); in hex_ntop()
1910 key->hmac_key, 32); in hex_pton()
1920 if (HMAC_Init_ex(hmac_ctx, key->hmac_key, 32, digest, NULL) != 1) {
1925 HMAC_Init_ex(hmac_ctx, key->hmac_key, 32, digest, NULL);
98 unsigned char *hmac_key; global() member
/freebsd/crypto/openssl/doc/man3/
H A DSSL_CTX_set_tlsext_ticket_key_cb.pod174 * an aes_key, a hmac_key and optionally
187 key->hmac_key, 32);
204 key->hmac_key, 32);
/freebsd/contrib/unbound/
H A Dconfigure.ac1050 void* hmac_key = NULL;
1052 int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
H A Dconfigure21015 void* hmac_key = NULL;
21017 int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);