Home
last modified time | relevance | path

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

/system/keymaster/tests/
Dhmac_test.cpp65 HmacSha256 hmac; in TEST() local
68 ASSERT_TRUE(hmac.Init(key_buffer)); in TEST()
75 EXPECT_TRUE(hmac.Verify(data_buffer, digest_buffer)); in TEST()
79 EXPECT_FALSE(hmac.Verify(data_buffer, digest_buffer)); in TEST()
/system/security/keystore/include/keystore/
Dkeystore_hidl_support.h89 static_assert(std::is_same<decltype(token.hmac), in authToken2HidlVec()
107 pos = std::copy(token.hmac.data(), token.hmac.data() + token.hmac.size(), pos); in authToken2HidlVec()
121 static_assert(std::is_same<decltype(token.hmac), in hidlVec2Km3AuthToken()
139 pos = std::copy(pos, pos + token.hmac.size(), &token.hmac[0]); in hidlVec2Km3AuthToken()
/system/hwservicemanager/
DTokenManager.cpp131 std::array<uint8_t, EVP_MAX_MD_SIZE> hmac; in generateToken() local
137 hmac.data(), &hmacSize); in generateToken()
140 hmacOut != hmac.data()) { in generateToken()
146 const hidl_vec<uint8_t> &token = makeToken(id, hmac.data(), hmacSize); in generateToken()
177 hidl_vec<uint8_t> TokenManager::makeToken(const uint64_t id, const uint8_t *hmac, uint64_t hmacSize… in makeToken() argument
182 memcpy(token.data() + sizeof(id), hmac, hmacSize); in makeToken()
DTokenManager.h56 static hidl_vec<uint8_t> makeToken(const uint64_t id, const uint8_t *hmac, uint64_t hmacSize);
/system/keymaster/km_openssl/
Dhkdf.cpp68 HmacSha256 hmac; in GenerateKey() local
69 result = hmac.Init(pseudo_random_key.get(), digest_size_); in GenerateKey()
83 result = hmac.Sign(buf.get(), block_input_len, digest.get(), digest_size_); in GenerateKey()
/system/keymaster/ng/include/
Dkeystore_hidl_support.h105 std::is_same<decltype(token.hmac), ::android::hardware::hidl_array<uint8_t, 32>>::value, in authToken2HidlVec()
122 pos = std::copy(token.hmac.data(), token.hmac.data() + token.hmac.size(), pos); in authToken2HidlVec()
/system/gatekeeper/
Dgatekeeper.cpp247 static_assert(offsetof(hw_auth_token_t, hmac) == hashable_length, in MintAuthToken()
253 ComputeSignature(token.hmac, sizeof(token.hmac), auth_token_key, key_len, in MintAuthToken()
256 memset(token.hmac, 0, sizeof(token.hmac)); in MintAuthToken()
/system/keymaster/key_blob_utils/
Dintegrity_assured_key_blob.cpp51 const AuthorizationSet& hidden, uint8_t hmac[HMAC_SIZE]) { in ComputeHmac()
73 memcpy(hmac, tmp, min(HMAC_SIZE, tmp_len)); in ComputeHmac()
/system/keymaster/
DMakefile95 km_openssl/hmac.cpp \
220 km_openssl/hmac.o \
242 km_openssl/hmac.o \
295 km_openssl/hmac.o \
DAndroid.bp95 "km_openssl/hmac.cpp",
/system/core/trusty/keymaster/4.0/
DTrustyKeymaster4Device.cpp117 static_assert(mac_len == sizeof(auth_token->hmac)); in injectAuthToken()
118 memcpy(auth_token->hmac, authToken.mac.data(), mac_len); in injectAuthToken()