HomeSort by relevance Sort by last modified time
    Searched defs:hmac (Results 1 - 25 of 32) sorted by null

1 2

  /prebuilts/go/darwin-x86/src/crypto/hmac/
hmac_test.go 5 package hmac package
202 "be hashed before being used by the HMAC algorithm."),
hmac.go 6 Package hmac implements the Keyed-Hash Message Authentication Code (HMAC) as
8 An HMAC is a cryptographic hash that uses a key to sign a message.
14 // CheckMAC reports whether messageMAC is a valid HMAC tag for message.
16 mac := hmac.New(sha256.New, key)
19 return hmac.Equal(messageMAC, expectedMAC)
22 package hmac package
35 // hmac = H([key ^ opad] H([key ^ ipad] text))
37 type hmac struct { type
44 func (h *hmac) Sum(in []byte) []byte
    [all...]
  /prebuilts/go/linux-x86/src/crypto/hmac/
hmac_test.go 5 package hmac package
202 "be hashed before being used by the HMAC algorithm."),
hmac.go 6 Package hmac implements the Keyed-Hash Message Authentication Code (HMAC) as
8 An HMAC is a cryptographic hash that uses a key to sign a message.
14 // CheckMAC reports whether messageMAC is a valid HMAC tag for message.
16 mac := hmac.New(sha256.New, key)
19 return hmac.Equal(messageMAC, expectedMAC)
22 package hmac package
35 // hmac = H([key ^ opad] H([key ^ ipad] text))
37 type hmac struct { type
44 func (h *hmac) Sum(in []byte) []byte
    [all...]
  /bionic/libc/kernel/uapi/linux/
seg6_hmac.h 29 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member in struct:sr6_tlv_hmac
  /external/iproute2/include/uapi/linux/
seg6_hmac.h 15 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member in struct:sr6_tlv_hmac
  /external/kernel-headers/original/uapi/linux/
seg6_hmac.h 15 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member in struct:sr6_tlv_hmac
  /system/keymaster/tests/
hmac_test.cpp 17 #include <keymaster/km_openssl/hmac.h>
65 HmacSha256 hmac; local
68 ASSERT_TRUE(hmac.Init(key_buffer));
75 EXPECT_TRUE(hmac.Verify(data_buffer, digest_buffer));
79 EXPECT_FALSE(hmac.Verify(data_buffer, digest_buffer));
  /external/boringssl/src/crypto/fipsmodule/tls/
kdf.c 55 #include <openssl/hmac.h>
93 uint8_t hmac[EVP_MAX_MD_SIZE]; local
101 !HMAC_Final(&ctx, hmac, &len)) {
111 out[i] ^= hmac[i];
  /external/boringssl/src/crypto/hkdf/
hkdf.c 21 #include <openssl/hmac.h>
47 // If salt is not given, HashLength zeros are used. However, HMAC does that
50 if (HMAC(digest, salt, salt_len, secret, secret_len, out_key, &len) == NULL) {
68 HMAC_CTX hmac; local
77 HMAC_CTX_init(&hmac);
78 if (!HMAC_Init_ex(&hmac, prk, prk_len, digest, NULL)) {
86 if (i != 0 && (!HMAC_Init_ex(&hmac, NULL, 0, NULL, NULL) ||
87 !HMAC_Update(&hmac, previous, digest_len))) {
90 if (!HMAC_Update(&hmac, info, info_len) ||
91 !HMAC_Update(&hmac, &ctr, 1) |
    [all...]
  /external/dhcpcd-6.8.2/test/
test_hmac_md5.c 37 print_hmac(uint8_t *hmac)
43 printf("%02x", *hmac++);
50 uint8_t hmac[16]; local
55 printf ("HMAC MD5 Test 1:\t\t");
58 hmac_md5(text, 8, key, 16, hmac);
59 print_hmac(hmac);
66 uint8_t hmac[16]; local
70 printf("HMAC MD5 Test 2:\t\t");
71 hmac_md5(text, 28, key, 4, hmac);
72 print_hmac(hmac);
79 uint8_t hmac[16]; local
97 uint8_t hmac[16]; local
115 uint8_t hmac[16]; local
131 uint8_t hmac[16]; local
147 uint8_t hmac[16]; local
    [all...]
  /hardware/libhardware/include/hardware/
hw_auth_token.h 46 uint8_t hmac[32]; member in struct:__anon48237
  /external/bouncycastle/bcpkix/src/main/java/org/bouncycastle/cms/
PasswordRecipient.java 21 private final String hmac; field in class:PasswordRecipient.PRF
24 private PRF(String hmac, AlgorithmIdentifier prfAlgID)
26 this.hmac = hmac;
32 return hmac;
  /external/wpa_supplicant_8/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...]
  /system/hwservicemanager/
TokenManager.cpp 8 #include <openssl/hmac.h>
110 std::array<uint8_t, EVP_MAX_MD_SIZE> hmac; local
113 uint8_t *hmacOut = HMAC(EVP_sha256(),
116 hmac.data(), &hmacSize);
119 hmacOut != hmac.data()) {
124 // only care about the first HMAC_SIZE bytes of the HMAC
125 const hidl_vec<uint8_t> &token = TokenManager::getToken(id, hmac.data(), hmacSize);
157 hidl_vec<uint8_t> TokenManager::getToken(const uint64_t id, const uint8_t *hmac, uint64_t hmacSize) {
166 token[i + ID_SIZE] = hmac[i];
  /external/dhcpcd-6.8.2/
auth.c 117 uint8_t hmac[HMAC_LENGTH]; local
184 if (dlen < sizeof(secretid) + sizeof(hmac)) {
193 if (dlen < sizeof(secretid) + sizeof(hmac)) {
197 realm_len = dlen - (sizeof(secretid) + sizeof(hmac));
327 memset(hmac, 0, sizeof(hmac));
330 hmac_md5(mm, mlen, t->key, t->key_len, hmac);
339 if (memcmp(d, &hmac, dlen)) {
480 uint8_t hmac[HMAC_LENGTH]; local
553 dlen += sizeof(t->secretid) + sizeof(hmac);
    [all...]
  /external/rappor/client/java/com/google/android/rappor/
HmacDrbg.java 16 * Deterministic Random Bit Generator based on HMAC-SHA256.
30 // An instance of HMAC-SHA256 configured with "Key" from the spec.
31 // private HashFunction hmac;
32 private Mac hmac; field in class:HmacDrbg
38 // Assume maximum security strength for HMAC-256, which is 256.
116 // hmac = Hashing.hmacSha256(key);
118 hmac = Mac.getInstance("HmacSHA256");
120 hmac.init(secretKey);
126 * Computes hmac("key" from the spec, x).
130 // return hmac.hashBytes(x).asBytes()
    [all...]
  /hardware/interfaces/confirmationui/support/include/android/hardware/confirmationui/1.0/generic/
GenericOperation.h 46 using HMacer = support::HMac<HmacImplementation>;
133 auto hmac = HMacer::hmac256(testKey, "\0", bytes_cast(secureInputToken.challenge), local
138 if (!hmac.isOk()) return ResponseCode::Unexpected;
139 if (hmac.value() == secureInputToken.mac) {
  /external/nos/test/system-test-harness/src/
blob.h 81 uint8_t hmac[32]; member in struct:km_blob
  /external/wpa_supplicant_8/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...]
  /hardware/interfaces/confirmationui/1.0/vts/functional/
VtsHalConfirmationUIV1_0TargetTest.cpp 32 #include <openssl/hmac.h>
74 using HMacer = support::HMac<HMacImplementation>;
78 auto hmac = HMacer::hmac256(testKey, data...); local
79 if (!hmac.isOk()) {
80 EXPECT_TRUE(false) << "Failed to compute test hmac. This is a self-test error.";
83 hidl_vec<uint8_t> result(hmac.value().size());
84 copy(hmac.value().data(), hmac.value().data() + hmac.value().size(), result.data());
394 // Test the implementation of HMAC SHA 256 against a golden blob
    [all...]
  /hardware/qcom/keymaster/
keymaster_qcom.h 52 #define KM_HMAC_LENGTH (32) /* SHA2 will be used for HMAC */
64 uint8_t hmac[KM_HMAC_LENGTH]; member in struct:qcom_km_key_blob
  /external/boringssl/src/crypto/pkcs8/
pkcs8_x509.c 68 #include <openssl/hmac.h>
585 uint8_t hmac[EVP_MAX_MD_SIZE]; local
587 if (NULL == HMAC(md, hmac_key, EVP_MD_size(md), CBS_data(&authsafes),
588 CBS_len(&authsafes), hmac, &hmac_len)) {
592 if (!CBS_mem_equal(&expected_mac, hmac, hmac_len)) {
  /external/tpm2/
SessionProcess.c 163 // TPM_RH_NULL. The binding only occurs if the session is an HMAC session. The bind value is a
553 // This function computes the HMAC for an authorization session in a command.
559 TPM2B_DIGEST *hmac // OUT: authorization HMAC
578 // session that uses an HMAC, then check if additional session nonces are to be
605 // Continue with the HMAC processing.
607 // Generate HMAC key.
611 // this entity to the HMAC key.
613 // with no authValue required, do not include the authValue in the HMAC key.
620 // or an hmac session that is not boun
686 TPM2B_DIGEST hmac; \/\/ authHMAC for comparing local
    [all...]
  /external/wpa_supplicant_8/src/crypto/
crypto_libtomcrypt.c 149 hmac_state hmac; member in union:crypto_hash::__anon44622
175 if (hmac_init(&ctx->u.hmac, find_hash("md5"), key, key_len) !=
180 if (hmac_init(&ctx->u.hmac, find_hash("sha1"), key, key_len) !=
209 ctx->error = hmac_process(&ctx->u.hmac, data, len) != CRYPT_OK;
268 if (hmac_done(&ctx->u.hmac, mac, &clen) != CRYPT_OK) {

Completed in 830 milliseconds

1 2