/openbmc/qemu/crypto/ |
H A D | hmac.c | 18 int qcrypto_hmac_bytesv(QCryptoHmac *hmac, in qcrypto_hmac_bytesv() argument 25 QCryptoHmacDriver *drv = hmac->driver; in qcrypto_hmac_bytesv() 27 return drv->hmac_bytesv(hmac, iov, niov, result, resultlen, errp); in qcrypto_hmac_bytesv() 30 int qcrypto_hmac_bytes(QCryptoHmac *hmac, in qcrypto_hmac_bytes() argument 42 return qcrypto_hmac_bytesv(hmac, &iov, 1, result, resultlen, errp); in qcrypto_hmac_bytes() 45 int qcrypto_hmac_digestv(QCryptoHmac *hmac, in qcrypto_hmac_digestv() argument 55 if (qcrypto_hmac_bytesv(hmac, iov, niov, &result, &resultlen, errp) < 0) { in qcrypto_hmac_digestv() 72 int qcrypto_hmac_digest(QCryptoHmac *hmac, in qcrypto_hmac_digest() argument 83 return qcrypto_hmac_digestv(hmac, &iov, 1, digest, errp); in qcrypto_hmac_digest() 90 QCryptoHmac *hmac; in qcrypto_hmac_new() local [all …]
|
H A D | hmac-nettle.c | 135 qcrypto_nettle_hmac_ctx_free(QCryptoHmac *hmac) in qcrypto_nettle_hmac_ctx_free() argument 139 ctx = hmac->opaque; in qcrypto_nettle_hmac_ctx_free() 144 qcrypto_nettle_hmac_bytesv(QCryptoHmac *hmac, in qcrypto_nettle_hmac_bytesv() argument 154 ctx = (QCryptoHmacNettle *)hmac->opaque; in qcrypto_nettle_hmac_bytesv() 161 qcrypto_hmac_alg_map[hmac->alg].update(&ctx->u, len, base); in qcrypto_nettle_hmac_bytesv() 168 *resultlen = qcrypto_hmac_alg_map[hmac->alg].len; in qcrypto_nettle_hmac_bytesv() 170 } else if (*resultlen != qcrypto_hmac_alg_map[hmac->alg].len) { in qcrypto_nettle_hmac_bytesv() 173 *resultlen, qcrypto_hmac_alg_map[hmac->alg].len); in qcrypto_nettle_hmac_bytesv() 177 qcrypto_hmac_alg_map[hmac->alg].digest(&ctx->u, *resultlen, *result); in qcrypto_nettle_hmac_bytesv()
|
H A D | hash-afalg.c | 240 qcrypto_afalg_hash_hmac_bytesv(QCryptoAFAlgo *hmac, in qcrypto_afalg_hash_hmac_bytesv() argument 249 ret = qcrypto_afalg_send_to_kernel(hmac, iov, niov, false, errp); in qcrypto_afalg_hash_hmac_bytesv() 251 ret = qcrypto_afalg_recv_from_kernel(hmac, alg, result, in qcrypto_afalg_hash_hmac_bytesv() 259 qcrypto_afalg_hmac_bytesv(QCryptoHmac *hmac, in qcrypto_afalg_hmac_bytesv() argument 265 return qcrypto_afalg_hash_hmac_bytesv(hmac->opaque, hmac->alg, in qcrypto_afalg_hmac_bytesv() 270 static void qcrypto_afalg_hmac_ctx_free(QCryptoHmac *hmac) in qcrypto_afalg_hmac_ctx_free() argument 274 afalg = hmac->opaque; in qcrypto_afalg_hmac_ctx_free()
|
H A D | hmac-glib.c | 74 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 D | hmac-gnutls.c | 87 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 D | hmac-gcrypt.c | 88 qcrypto_gcrypt_hmac_ctx_free(QCryptoHmac *hmac) in qcrypto_gcrypt_hmac_ctx_free() argument 92 ctx = hmac->opaque; in qcrypto_gcrypt_hmac_ctx_free() 99 qcrypto_gcrypt_hmac_bytesv(QCryptoHmac *hmac, in qcrypto_gcrypt_hmac_bytesv() argument 111 ctx = hmac->opaque; in qcrypto_gcrypt_hmac_bytesv() 117 ret = gcry_mac_get_algo_maclen(qcrypto_hmac_alg_map[hmac->alg]); in qcrypto_gcrypt_hmac_bytesv()
|
H A D | meson.build | 11 'hmac.c', 32 crypto_ss.add(nettle, files('hash-nettle.c', 'hmac-nettle.c', 'pbkdf-nettle.c')) 40 crypto_ss.add(gcrypt, files('hash-gcrypt.c', 'hmac-gcrypt.c', 'pbkdf-gcrypt.c')) 42 crypto_ss.add(gnutls, files('hash-gnutls.c', 'hmac-gnutls.c', 'pbkdf-gnutls.c')) 44 crypto_ss.add(files('hash-glib.c', 'hmac-glib.c', 'pbkdf-stub.c'))
|
H A D | hmacpriv.h | 21 int (*hmac_bytesv)(QCryptoHmac *hmac, 28 void (*hmac_free)(QCryptoHmac *hmac);
|
/openbmc/qemu/tests/unit/ |
H A D | test-crypto-hmac.c | 97 QCryptoHmac *hmac = NULL; in test_hmac_alloc() local 110 hmac = qcrypto_hmac_new(data->alg, (const uint8_t *)KEY, in test_hmac_alloc() 112 g_assert(hmac != NULL); in test_hmac_alloc() 114 ret = qcrypto_hmac_bytes(hmac, (const char *)INPUT_TEXT, in test_hmac_alloc() 124 qcrypto_hmac_free(hmac); in test_hmac_alloc() 136 QCryptoHmac *hmac = NULL; in test_hmac_prealloc() local 152 hmac = qcrypto_hmac_new(data->alg, (const uint8_t *)KEY, in test_hmac_prealloc() 154 g_assert(hmac != NULL); in test_hmac_prealloc() 156 ret = qcrypto_hmac_bytes(hmac, (const char *)INPUT_TEXT, in test_hmac_prealloc() 169 qcrypto_hmac_free(hmac); in test_hmac_prealloc() [all …]
|
/openbmc/openbmc-test-automation/security/ |
H A D | test_bmc_ssh_security.robot | 40 …# 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/fs/ubifs/ |
H A D | auth.c | 47 u8 *hmac) in ubifs_hash_calc_hmac() argument 49 return crypto_shash_tfm_digest(c->hmac_tfm, hash, c->hash_len, hmac); in ubifs_hash_calc_hmac() 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() 459 err = ubifs_node_calc_hmac(c, node, len, ofs_hmac, hmac); in __ubifs_node_verify_hmac() 461 kfree(hmac); in __ubifs_node_verify_hmac() [all …]
|
/openbmc/linux/net/sctp/ |
H A D | Kconfig | 56 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/qemu/include/crypto/ |
H A D | hmac.h | 66 void qcrypto_hmac_free(QCryptoHmac *hmac); 96 int qcrypto_hmac_bytesv(QCryptoHmac *hmac, 129 int qcrypto_hmac_bytes(QCryptoHmac *hmac, 154 int qcrypto_hmac_digestv(QCryptoHmac *hmac, 177 int qcrypto_hmac_digest(QCryptoHmac *hmac,
|
/openbmc/qemu/tests/bench/ |
H A D | benchmark-crypto-hmac.c | 23 QCryptoHmac *hmac = NULL; in test_hmac_speed() local 43 hmac = qcrypto_hmac_new(QCRYPTO_HASH_ALGO_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 D | crypto_test.c | 35 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 D | crypto.c | 44 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 D | 0001-Creating-.hmac-file-should-be-excuted-in-target-envi.patch | 4 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 D | auth.c | 91 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 D | atmel-sha.c | 1690 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_setup() local 1695 hmac->resume = resume; in atmel_sha_hmac_setup() 1727 if (likely(!atmel_sha_hmac_key_get(&hmac->hkey, &key, &keylen))) in atmel_sha_hmac_setup() 1735 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup() 1736 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup() 1751 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_prehash_key_done() local 1759 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done() 1760 memset((u8 *)hmac->ipad + ds, 0, bs - ds); in atmel_sha_hmac_prehash_key_done() 1768 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_compute_ipad_hash() local 1773 unsafe_memcpy(hmac->opad, hmac->ipad, bs, in atmel_sha_hmac_compute_ipad_hash() [all …]
|
/openbmc/openbmc/poky/meta/recipes-support/gnutls/ |
H A D | gnutls_3.8.8.bb | 23 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/u-boot/board/gdsys/p1022/ |
H A D | controlcenterd-id.c | 754 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 847 hmac = malloc(sizeof(struct key_program) + header.code_size); in load_sd_key_program() 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() [all …]
|
/openbmc/u-boot/board/gdsys/a38x/ |
H A D | keyprogram.c | 109 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/linux/drivers/crypto/ccree/ |
H A D | cc_aead.c | 52 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() 100 hmac->ipad_opad_dma_addr); in cc_aead_exit() 102 &hmac->ipad_opad_dma_addr); in cc_aead_exit() 103 hmac->ipad_opad_dma_addr = 0; 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() [all …]
|
/openbmc/ipmitool/src/plugins/lanplus/ |
H A D | lanplus_crypt.h | 45 const uint8_t * hmac, 48 const uint8_t * hmac,
|
/openbmc/linux/tools/testing/selftests/tpm2/ |
H A D | tpm2.py | 252 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)
|