Home
last modified time | relevance | path

Searched refs:hmac (Results 1 – 25 of 94) sorted by relevance

1234

/openbmc/qemu/crypto/
H A Dhmac.c18 int qcrypto_hmac_bytesv(QCryptoHmac *hmac, in qcrypto_hmac_bytesv() argument
90 QCryptoHmac *hmac; in qcrypto_hmac_new() local
110 hmac = g_new0(QCryptoHmac, 1); in qcrypto_hmac_new()
111 hmac->alg = alg; in qcrypto_hmac_new()
112 hmac->opaque = ctx; in qcrypto_hmac_new()
113 hmac->driver = (void *)drv; in qcrypto_hmac_new()
115 return hmac; in qcrypto_hmac_new()
122 if (hmac) { in qcrypto_hmac_free()
123 drv = hmac->driver; in qcrypto_hmac_free()
124 drv->hmac_free(hmac); in qcrypto_hmac_free()
[all …]
H A Dhmac-nettle.c124 qcrypto_nettle_hmac_ctx_free(QCryptoHmac *hmac) in qcrypto_nettle_hmac_ctx_free() argument
128 ctx = hmac->opaque; in qcrypto_nettle_hmac_ctx_free()
133 qcrypto_nettle_hmac_bytesv(QCryptoHmac *hmac, in qcrypto_nettle_hmac_bytesv() argument
143 ctx = (QCryptoHmacNettle *)hmac->opaque; in qcrypto_nettle_hmac_bytesv()
150 qcrypto_hmac_alg_map[hmac->alg].update(&ctx->u, len, base); in qcrypto_nettle_hmac_bytesv()
157 *resultlen = qcrypto_hmac_alg_map[hmac->alg].len; in qcrypto_nettle_hmac_bytesv()
159 } else if (*resultlen != qcrypto_hmac_alg_map[hmac->alg].len) { in qcrypto_nettle_hmac_bytesv()
162 *resultlen, qcrypto_hmac_alg_map[hmac->alg].len); in qcrypto_nettle_hmac_bytesv()
166 qcrypto_hmac_alg_map[hmac->alg].digest(&ctx->u, *resultlen, *result); in qcrypto_nettle_hmac_bytesv()
H A Dhash-afalg.c117 qcrypto_afalg_hash_hmac_bytesv(QCryptoAFAlg *hmac, in qcrypto_afalg_hash_hmac_bytesv() argument
127 bool is_hmac = (hmac != NULL) ? true : false; in qcrypto_afalg_hash_hmac_bytesv()
141 afalg = hmac; in qcrypto_afalg_hash_hmac_bytesv()
187 qcrypto_afalg_hmac_bytesv(QCryptoHmac *hmac, in qcrypto_afalg_hmac_bytesv() argument
193 return qcrypto_afalg_hash_hmac_bytesv(hmac->opaque, hmac->alg, in qcrypto_afalg_hmac_bytesv()
198 static void qcrypto_afalg_hmac_ctx_free(QCryptoHmac *hmac) in qcrypto_afalg_hmac_ctx_free() argument
202 afalg = hmac->opaque; in qcrypto_afalg_hmac_ctx_free()
H A Dhmac-glib.c74 qcrypto_glib_hmac_ctx_free(QCryptoHmac *hmac) in qcrypto_glib_hmac_ctx_free() argument
78 ctx = hmac->opaque; in qcrypto_glib_hmac_ctx_free()
85 qcrypto_glib_hmac_bytesv(QCryptoHmac *hmac, in qcrypto_glib_hmac_bytesv() argument
95 ctx = hmac->opaque; in qcrypto_glib_hmac_bytesv()
101 ret = g_checksum_type_get_length(qcrypto_hmac_alg_map[hmac->alg]); in qcrypto_glib_hmac_bytesv()
H A Dhmac-gnutls.c87 qcrypto_gnutls_hmac_ctx_free(QCryptoHmac *hmac) in qcrypto_gnutls_hmac_ctx_free() argument
91 ctx = hmac->opaque; in qcrypto_gnutls_hmac_ctx_free()
98 qcrypto_gnutls_hmac_bytesv(QCryptoHmac *hmac, in qcrypto_gnutls_hmac_bytesv() argument
109 ctx = hmac->opaque; in qcrypto_gnutls_hmac_bytesv()
115 ret = gnutls_hmac_get_len(qcrypto_hmac_alg_map[hmac->alg]); in qcrypto_gnutls_hmac_bytesv()
H A Dhmac-gcrypt.c85 qcrypto_gcrypt_hmac_ctx_free(QCryptoHmac *hmac) in qcrypto_gcrypt_hmac_ctx_free() argument
89 ctx = hmac->opaque; in qcrypto_gcrypt_hmac_ctx_free()
96 qcrypto_gcrypt_hmac_bytesv(QCryptoHmac *hmac, in qcrypto_gcrypt_hmac_bytesv() argument
108 ctx = hmac->opaque; in qcrypto_gcrypt_hmac_bytesv()
114 ret = gcry_mac_get_algo_maclen(qcrypto_hmac_alg_map[hmac->alg]); in qcrypto_gcrypt_hmac_bytesv()
H A Dmeson.build11 'hmac.c',
28 crypto_ss.add(nettle, files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c'))
36 crypto_ss.add(gcrypt, files('hash-gcrypt.c', 'hmac-gcrypt.c', 'pbkdf-gcrypt.c'))
38 crypto_ss.add(gnutls, files('hash-gnutls.c', 'hmac-gnutls.c', 'pbkdf-gnutls.c'))
40 crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c'))
H A Dhmacpriv.h21 int (*hmac_bytesv)(QCryptoHmac *hmac,
28 void (*hmac_free)(QCryptoHmac *hmac);
/openbmc/qemu/tests/unit/
H A Dtest-crypto-hmac.c89 QCryptoHmac *hmac = NULL; in test_hmac_alloc() local
104 g_assert(hmac != NULL); in test_hmac_alloc()
116 qcrypto_hmac_free(hmac); in test_hmac_alloc()
128 QCryptoHmac *hmac = NULL; in test_hmac_prealloc() local
146 g_assert(hmac != NULL); in test_hmac_prealloc()
159 qcrypto_hmac_free(hmac); in test_hmac_prealloc()
171 QCryptoHmac *hmac = NULL; in test_hmac_iov() local
191 g_assert(hmac != NULL); in test_hmac_iov()
202 qcrypto_hmac_free(hmac); in test_hmac_iov()
227 g_assert(hmac != NULL); in test_hmac_digest()
[all …]
/openbmc/openbmc-test-automation/security/
H A Dtest_bmc_ssh_security.robot40 …# debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.co…
41 # hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,
42 # umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
43 …# debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.co…
44 # hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,
45 # umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
/openbmc/linux/net/sctp/
H A DKconfig56 This option sets the default sctp cookie hmac algorithm
60 bool "Enable optional MD5 hmac cookie generation"
62 Enable optional MD5 hmac based SCTP cookie generation
66 bool "Enable optional SHA1 hmac cookie generation"
68 Enable optional SHA1 hmac based SCTP cookie generation
72 bool "Use no hmac alg in SCTP cookie generation"
74 Use no hmac algorithm in SCTP cookie generation
79 bool "Enable optional MD5 hmac cookie generation"
81 Enable optional MD5 hmac based SCTP cookie generation
86 bool "Enable optional SHA1 hmac cookie generation"
[all …]
/openbmc/linux/fs/ubifs/
H A Dauth.c47 u8 *hmac) in ubifs_hash_calc_hmac() argument
81 err = ubifs_hash_calc_hmac(c, hash, auth->hmac); in ubifs_prepare_auth_node()
389 int len, int ofs_hmac, void *hmac) in ubifs_node_calc_hmac() argument
417 return crypto_shash_final(shash, hmac); in ubifs_node_calc_hmac()
452 u8 *hmac; in __ubifs_node_verify_hmac() local
455 hmac = kmalloc(hmac_len, GFP_NOFS); in __ubifs_node_verify_hmac()
456 if (!hmac) in __ubifs_node_verify_hmac()
461 kfree(hmac); in __ubifs_node_verify_hmac()
467 kfree(hmac); in __ubifs_node_verify_hmac()
529 err = crypto_shash_final(shash, hmac); in ubifs_hmac_wkm()
[all …]
/openbmc/qemu/include/crypto/
H A Dhmac.h66 void qcrypto_hmac_free(QCryptoHmac *hmac);
89 int qcrypto_hmac_bytesv(QCryptoHmac *hmac,
115 int qcrypto_hmac_bytes(QCryptoHmac *hmac,
140 int qcrypto_hmac_digestv(QCryptoHmac *hmac,
163 int qcrypto_hmac_digest(QCryptoHmac *hmac,
/openbmc/qemu/tests/bench/
H A Dbenchmark-crypto-hmac.c23 QCryptoHmac *hmac = NULL; in test_hmac_speed() local
43 hmac = qcrypto_hmac_new(QCRYPTO_HASH_ALG_SHA256, in test_hmac_speed()
46 g_assert(hmac != NULL); in test_hmac_speed()
48 ret = qcrypto_hmac_bytesv(hmac, &iov, 1, &out, &out_len, &err); in test_hmac_speed()
52 qcrypto_hmac_free(hmac); in test_hmac_speed()
/openbmc/linux/net/mptcp/
H A Dcrypto_test.c35 char hmac[32], hmac_hex[65]; in mptcp_crypto_test_basic() local
51 mptcp_crypto_hmac_sha(key1, key2, msg, 8, hmac); in mptcp_crypto_test_basic()
53 sprintf(&hmac_hex[j << 1], "%02x", hmac[j] & 0xff); in mptcp_crypto_test_basic()
H A Dcrypto.c44 void mptcp_crypto_hmac_sha(u64 key1, u64 key2, u8 *msg, int len, void *hmac) in mptcp_crypto_hmac_sha() argument
78 sha256(input, SHA256_BLOCK_SIZE + SHA256_DIGEST_SIZE, hmac); in mptcp_crypto_hmac_sha()
/openbmc/openbmc/poky/meta/recipes-support/gnutls/gnutls/
H A D0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch4 Subject: [PATCH] Creating .hmac file should be excuted in target environment,
17 @@ -198,8 +198,7 @@ hmac_file = .libs/.$(gnutls_so).hmac
23 +.libs/.$(gnutls_so).hmac:
/openbmc/linux/drivers/nvme/common/
H A Dauth.c91 const char hmac[15]; member
96 .hmac = "hmac(sha256)",
101 .hmac = "hmac(sha384)",
106 .hmac = "hmac(sha512)",
115 return hash_map[hmac_id].hmac; in nvme_auth_hmac_name()
135 if (!strlen(hash_map[i].hmac)) in nvme_auth_hmac_id()
137 if (!strncmp(hash_map[i].hmac, hmac_name, in nvme_auth_hmac_id()
138 strlen(hash_map[i].hmac))) in nvme_auth_hmac_id()
/openbmc/linux/drivers/crypto/
H A Datmel-sha.c1695 hmac->resume = resume; in atmel_sha_hmac_setup()
1735 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup()
1773 unsafe_memcpy(hmac->opad, hmac->ipad, bs, in atmel_sha_hmac_compute_ipad_hash()
1776 hmac->ipad[i] ^= 0x36363636; in atmel_sha_hmac_compute_ipad_hash()
1777 hmac->opad[i] ^= 0x5c5c5c5c; in atmel_sha_hmac_compute_ipad_hash()
1811 atmel_sha_hmac_key_release(&hmac->hkey); in atmel_sha_hmac_setup_done()
1812 return hmac->resume(dd); in atmel_sha_hmac_setup_done()
1883 memcpy(ctx->digest, hmac->ipad, hs); in atmel_sha_hmac_init_done()
2030 hmac->base.start = atmel_sha_hmac_start; in atmel_sha_hmac_cra_init()
2031 atmel_sha_hmac_key_init(&hmac->hkey); in atmel_sha_hmac_cra_init()
[all …]
/openbmc/u-boot/board/gdsys/a38x/
H A Dkeyprogram.c109 struct key_program *result = NULL, *hmac = NULL; in parse_and_check_keyprog() local
118 if (extract_subprogram(&progdata, MAGIC_HMAC, &hmac)) in parse_and_check_keyprog()
121 free(hmac); in parse_and_check_keyprog()
/openbmc/openbmc/poky/meta/recipes-support/gnutls/
H A Dgnutls_3.8.4.bb23 file://0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch \
95 ${bindir}/fipshmac ${libdir}/libgnutls.so.30.*.* > ${libdir}/.libgnutls.so.30.hmac
96 ${bindir}/fipshmac ${libdir}/libnettle.so.8.* > ${libdir}/.libnettle.so.8.hmac
97 ${bindir}/fipshmac ${libdir}/libgmp.so.10.*.* > ${libdir}/.libgmp.so.10.hmac
98 ${bindir}/fipshmac ${libdir}/libhogweed.so.6.* > ${libdir}/.libhogweed.so.6.hmac
/openbmc/ipmitool/src/plugins/lanplus/
H A Dlanplus_crypt.h45 const uint8_t * hmac,
48 const uint8_t * hmac,
/openbmc/u-boot/board/gdsys/p1022/
H A Dcontrolcenterd-id.c754 static int check_hmac(struct key_program *hmac, in check_hmac() argument
760 type = get_unaligned_be32(hmac->code); in check_hmac()
771 return memcmp(computed_hmac, hmac->code + 4, 20); in check_hmac()
793 struct key_program *result = NULL, *hmac = NULL; in load_sd_key_program() local
848 if (!hmac) in load_sd_key_program()
850 *hmac = header; in load_sd_key_program()
852 if (ccdm_mmc_read(mmc, code_offset, hmac->code, in load_sd_key_program()
853 hmac->code_size) < 0) in load_sd_key_program()
855 if (verify_program(hmac)) in load_sd_key_program()
870 if (hmac) in load_sd_key_program()
[all …]
/openbmc/linux/drivers/crypto/ccree/
H A Dcc_aead.c52 struct cc_hmac_s hmac; member
95 struct cc_hmac_s *hmac = &ctx->auth_state.hmac; in cc_aead_exit() local
97 if (hmac->ipad_opad) { in cc_aead_exit()
99 hmac->ipad_opad, in cc_aead_exit()
104 hmac->ipad_opad = NULL; in cc_aead_exit()
106 if (hmac->padded_authkey) { in cc_aead_exit()
108 hmac->padded_authkey, in cc_aead_exit()
169 struct cc_hmac_s *hmac = &ctx->auth_state.hmac; in cc_aead_init() local
178 if (!hmac->ipad_opad) { in cc_aead_init()
184 hmac->ipad_opad); in cc_aead_init()
[all …]
/openbmc/linux/tools/testing/selftests/tpm2/
H A Dtpm2.py252 session_attributes=0, hmac=bytes()): argument
256 self.hmac = hmac
259 fmt = '>I H%us B H%us' % (len(self.nonce), len(self.hmac))
261 self.nonce, self.session_attributes, len(self.hmac),
262 self.hmac)
265 fmt = '>I H%us B H%us' % (len(self.nonce), len(self.hmac))
651 auth_cmd = AuthCommand(session_handle=policy_handle, hmac=auth_value)
653 auth_cmd = AuthCommand(hmac=auth_value)

1234