HomeSort by: relevance | last modified time | path
    Searched defs:hmac (Results 1 - 20 of 20) sorted by relevancy

  /src/lib/libc/hash/
hmac.c 1 /* $NetBSD: hmac.c,v 1.5 2017/10/05 09:59:04 roy Exp $ */
32 __RCSID("$NetBSD: hmac.c,v 1.5 2017/10/05 09:59:04 roy Exp $");
48 static const struct hmac { struct
104 static const struct hmac *
116 hmac(const char *name, function
123 const struct hmac *h;
hmac.c 1 /* $NetBSD: hmac.c,v 1.5 2017/10/05 09:59:04 roy Exp $ */
32 __RCSID("$NetBSD: hmac.c,v 1.5 2017/10/05 09:59:04 roy Exp $");
48 static const struct hmac { struct
104 static const struct hmac *
116 hmac(const char *name, function
123 const struct hmac *h;
  /src/external/bsd/libfido2/dist/src/
config.c 17 config_prepare_hmac(uint8_t subcmd, const cbor_item_t *item, fido_blob_t *hmac)
32 if ((hmac->ptr = malloc(cbor_len + sizeof(prefix))) == NULL) {
36 memcpy(hmac->ptr, prefix, sizeof(prefix));
37 memcpy(hmac->ptr + sizeof(prefix), cbor, cbor_len);
38 hmac->len = cbor_len + sizeof(prefix);
49 fido_blob_t *ecdh = NULL, f, hmac; local
54 memset(&hmac, 0, sizeof(hmac));
73 if (config_prepare_hmac(subcmd, argv[1], &hmac) < 0) {
81 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin
    [all...]
config.c 17 config_prepare_hmac(uint8_t subcmd, const cbor_item_t *item, fido_blob_t *hmac)
32 if ((hmac->ptr = malloc(cbor_len + sizeof(prefix))) == NULL) {
36 memcpy(hmac->ptr, prefix, sizeof(prefix));
37 memcpy(hmac->ptr + sizeof(prefix), cbor, cbor_len);
38 hmac->len = cbor_len + sizeof(prefix);
49 fido_blob_t *ecdh = NULL, f, hmac; local
54 memset(&hmac, 0, sizeof(hmac));
73 if (config_prepare_hmac(subcmd, argv[1], &hmac) < 0) {
81 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin
    [all...]
bio.c 77 fido_blob_t hmac; local
82 memset(&hmac, 0, sizeof(hmac));
95 &hmac) < 0) {
107 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin,
114 (argv[4] = cbor_encode_pin_auth(dev, token, &hmac)) == NULL) {
134 free(hmac.ptr);
credman.c 129 fido_blob_t hmac; local
136 memset(&hmac, 0, sizeof(hmac));
153 if (credman_prepare_hmac(subcmd, param, &argv[1], &hmac) < 0) {
161 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin,
182 free(hmac.ptr);
largeblob.c 476 prepare_hmac(size_t offset, const u_char *data, size_t len, fido_blob_t *hmac)
501 return fido_blob_set(hmac, buf, sizeof(buf));
508 fido_blob_t *hmac = NULL, f; local
523 if ((hmac = fido_blob_new()) == NULL ||
524 prepare_hmac(offset, chunk, chunk_len, hmac) < 0 ||
525 (argv[4] = cbor_encode_pin_auth(dev, token, hmac)) == NULL ||
542 fido_blob_free(&hmac);
bio.c 77 fido_blob_t hmac; local
82 memset(&hmac, 0, sizeof(hmac));
95 &hmac) < 0) {
107 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin,
114 (argv[4] = cbor_encode_pin_auth(dev, token, &hmac)) == NULL) {
134 free(hmac.ptr);
credman.c 129 fido_blob_t hmac; local
136 memset(&hmac, 0, sizeof(hmac));
153 if (credman_prepare_hmac(subcmd, param, &argv[1], &hmac) < 0) {
161 if ((r = cbor_add_uv_params(dev, cmd, &hmac, pk, ecdh, pin,
182 free(hmac.ptr);
largeblob.c 476 prepare_hmac(size_t offset, const u_char *data, size_t len, fido_blob_t *hmac)
501 return fido_blob_set(hmac, buf, sizeof(buf));
508 fido_blob_t *hmac = NULL, f; local
523 if ((hmac = fido_blob_new()) == NULL ||
524 prepare_hmac(offset, chunk, chunk_len, hmac) < 0 ||
525 (argv[4] = cbor_encode_pin_auth(dev, token, hmac)) == NULL ||
542 fido_blob_free(&hmac);
  /src/external/bsd/wpa/dist/src/tls/
tlsv1_record.c 140 * header, IV (TLS v1.1), and HMAC)
147 * This function fills in the TLS record layer header, adds HMAC, and encrypts
155 struct crypto_hash *hmac; local
207 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret,
209 if (hmac == NULL) {
211 "to initialize HMAC");
214 crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN);
216 crypto_hash_update(hmac, ct_start, TLS_RECORD_HEADER_LEN);
217 crypto_hash_update(hmac, payload, payload_len);
222 crypto_hash_finish(hmac, NULL, NULL)
284 struct crypto_hash *hmac; local
    [all...]
tlsv1_record.c 140 * header, IV (TLS v1.1), and HMAC)
147 * This function fills in the TLS record layer header, adds HMAC, and encrypts
155 struct crypto_hash *hmac; local
207 hmac = crypto_hash_init(rl->hash_alg, rl->write_mac_secret,
209 if (hmac == NULL) {
211 "to initialize HMAC");
214 crypto_hash_update(hmac, rl->write_seq_num, TLS_SEQ_NUM_LEN);
216 crypto_hash_update(hmac, ct_start, TLS_RECORD_HEADER_LEN);
217 crypto_hash_update(hmac, payload, payload_len);
222 crypto_hash_finish(hmac, NULL, NULL)
284 struct crypto_hash *hmac; local
    [all...]
  /src/external/bsd/wpa/dist/src/eap_common/
eap_sim_common.c 168 unsigned char hmac[SHA1_MAC_LEN]; local
187 /* HMAC-SHA1-128 */
195 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
197 hmac, EAP_SIM_MAC_LEN);
200 return (os_memcmp_const(hmac, mac, EAP_SIM_MAC_LEN) == 0) ? 0 : 1;
207 unsigned char hmac[SHA1_MAC_LEN]; local
216 /* HMAC-SHA1-128 */
223 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
224 os_memcpy(mac, hmac, EAP_SIM_MAC_LEN);
243 * T1 = HMAC-SHA-256 (K, S | 0x01
362 unsigned char hmac[SHA256_MAC_LEN]; local
401 unsigned char hmac[SHA256_MAC_LEN]; local
    [all...]
eap_sim_common.c 168 unsigned char hmac[SHA1_MAC_LEN]; local
187 /* HMAC-SHA1-128 */
195 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
197 hmac, EAP_SIM_MAC_LEN);
200 return (os_memcmp_const(hmac, mac, EAP_SIM_MAC_LEN) == 0) ? 0 : 1;
207 unsigned char hmac[SHA1_MAC_LEN]; local
216 /* HMAC-SHA1-128 */
223 hmac_sha1_vector(k_aut, EAP_SIM_K_AUT_LEN, 2, addr, len, hmac);
224 os_memcpy(mac, hmac, EAP_SIM_MAC_LEN);
243 * T1 = HMAC-SHA-256 (K, S | 0x01
362 unsigned char hmac[SHA256_MAC_LEN]; local
401 unsigned char hmac[SHA256_MAC_LEN]; local
    [all...]
  /src/external/bsd/libarchive/dist/libarchive/
archive_write_set_format_zip.c 2015 uint8_t hmac[20]; local
2018 archive_hmac_sha1_final(&zip->hctx, hmac, &hmac_len);
2019 ret = __archive_write_output(a, hmac, AUTH_CODE_SIZE);
2470 "Failed to initialize HMAC-SHA1");
archive_write_set_format_zip.c 2015 uint8_t hmac[20]; local
2018 archive_hmac_sha1_final(&zip->hctx, hmac, &hmac_len);
2019 ret = __archive_write_output(a, hmac, AUTH_CODE_SIZE);
2470 "Failed to initialize HMAC-SHA1");
archive_read_support_format_zip.c 1303 uint8_t hmac[20]; local
1307 archive_hmac_sha1_final(&zip->hctx, hmac, &hmac_len);
1320 cmp = memcmp(hmac, p, AUTH_CODE_SIZE);
3052 "Failed to initialize HMAC-SHA1");
archive_read_support_format_zip.c 1303 uint8_t hmac[20]; local
1307 archive_hmac_sha1_final(&zip->hctx, hmac, &hmac_len);
1320 cmp = memcmp(hmac, p, AUTH_CODE_SIZE);
3052 "Failed to initialize HMAC-SHA1");
  /src/sys/dev/pci/
if_txpreg.h 612 u_int32_t hmac[5]; member in struct:txp_fw_file_header
if_txpreg.h 612 u_int32_t hmac[5]; member in struct:txp_fw_file_header

Completed in 69 milliseconds