Home
last modified time | relevance | path

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

12

/aosp12/packages/modules/ExtServices/java/tests/src/android/ext/services/displayhash/
H A DHmacKeyManagerTest.java48 byte[] hmac = generateHmac(); in testGenerateAndVerifyHmac()
51 mHashAlgorithm, mImageHash, hmac)); in testGenerateAndVerifyHmac()
56 byte[] hmac = generateHmac(); in testVerifyHmac_differentSalt()
65 byte[] hmac = generateHmac(); in testVerifyHmac_differentTimestamp()
68 mHashAlgorithm, mImageHash, hmac)); in testVerifyHmac_differentTimestamp()
73 byte[] hmac = generateHmac(); in testVerifyHmac_differentBounds()
82 byte[] hmac = generateHmac(); in testVerifyHmac_differentHashAlgorithm()
85 2 /* hashAlgorithm */, mImageHash, hmac)); in testVerifyHmac_differentHashAlgorithm()
90 byte[] hmac = generateHmac(); in testVerifyHmac_differentImageHash()
114 assertNotNull(hmac); in generateHmac()
[all …]
/aosp12/system/keymaster/tests/
H A 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()
/aosp12/system/security/keystore/include/keystore/
H A 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()
/aosp12/system/hwservicemanager/
H A DTokenManager.cpp133 std::array<uint8_t, EVP_MAX_MD_SIZE> hmac; in generateToken() local
139 hmac.data(), &hmacSize); in generateToken()
142 hmacOut != hmac.data()) { in generateToken()
148 const hidl_vec<uint8_t> &token = makeToken(id, hmac.data(), hmacSize); in generateToken()
179 hidl_vec<uint8_t> TokenManager::makeToken(const uint64_t id, const uint8_t *hmac, uint64_t hmacSize… in makeToken() argument
184 memcpy(token.data() + sizeof(id), hmac, hmacSize); in makeToken()
H A DTokenManager.h56 static hidl_vec<uint8_t> makeToken(const uint64_t id, const uint8_t *hmac, uint64_t hmacSize);
/aosp12/packages/modules/ExtServices/java/src/android/ext/services/displayhash/
H A DHmacKeyManager.java59 int hashAlgorithm, byte[] imageHash, byte[] hmac) { in verifyHmac() argument
60 if (hmac == null || hmac.length != 32) { in verifyHmac()
66 return Arrays.equals(hmac, calculatedHmac); in verifyHmac()
H A DDisplayHashingServiceImpl.java92 byte[] hmac = mHmacKeyManager.generateHmac(salt, timestamp, bounds, hashAlgorithmIndex, in onGenerateDisplayHash()
95 new DisplayHash(timestamp, bounds, hashAlgorithm, imageHash, hmac)); in onGenerateDisplayHash()
/aosp12/frameworks/base/core/jni/
H A Dandroid_view_KeyEvent.cpp98 ScopedLocalRef<jbyteArray> hmac = toJbyteArray(env, event->getHmac()); in android_view_KeyEvent_fromNative() local
108 event->getDisplayId(), hmac.get(), nullptr); in android_view_KeyEvent_fromNative()
125 std::optional<std::array<uint8_t, 32>> hmac = fromJobject<32>(env, hmacObj); in android_view_KeyEvent_toNative() local
126 if (!hmac) { in android_view_KeyEvent_toNative()
127 hmac = INVALID_HMAC; in android_view_KeyEvent_toNative()
138 event->initialize(id, deviceId, source, displayId, *hmac, action, flags, keyCode, scanCode, in android_view_KeyEvent_toNative()
/aosp12/frameworks/base/core/java/android/view/displayhash/
H A DDisplayHash.java79 @NonNull String hashAlgorithm, @NonNull byte[] imageHash, @NonNull byte[] hmac) { in DisplayHash() argument
87 mHmac = hmac; in DisplayHash()
204 byte[] hmac = in.createByteArray(); in DisplayHash()
212 mHmac = hmac; in DisplayHash()
/aosp12/system/keymaster/ng/include/
H A Dkeystore_hidl_support.h103 std::is_same<decltype(token.hmac), ::android::hardware::hidl_array<uint8_t, 32>>::value, in authToken2HidlVec()
120 pos = std::copy(token.hmac.data(), token.hmac.data() + token.hmac.size(), pos); in authToken2HidlVec()
/aosp12/system/keymaster/km_openssl/
H A Dhkdf.cpp60 HmacSha256 hmac; in GenerateKey() local
61 result = hmac.Init(pseudo_random_key.get(), digest_size_); in GenerateKey()
73 result = hmac.Sign(buf.get(), block_input_len, digest.get(), digest_size_); in GenerateKey()
/aosp12/frameworks/native/libs/input/
H A DInput.cpp197 std::array<uint8_t, 32> hmac) { in initialize() argument
202 mHmac = hmac; in initialize()
229 std::array<uint8_t, 32> hmac, int32_t action, int32_t flags, in initialize() argument
232 InputEvent::initialize(id, deviceId, source, displayId, hmac); in initialize()
434 InputEvent::initialize(id, deviceId, source, displayId, hmac); in initialize()
685 std::vector<uint8_t> hmac; in readFromParcel() local
686 status_t result = parcel->readByteVector(&hmac); in readFromParcel()
687 if (result != OK || hmac.size() != 32) { in readFromParcel()
690 std::move(hmac.begin(), hmac.begin() + hmac.size(), mHmac.begin()); in readFromParcel()
751 std::vector<uint8_t> hmac(mHmac.begin(), mHmac.end()); in writeToParcel() local
[all …]
H A DInputTransport.cpp183 msg->body.key.hmac = body.key.hmac; in getSanitizedCopy()
212 msg->body.motion.hmac = body.motion.hmac; in getSanitizedCopy()
492 std::array<uint8_t, 32> hmac, int32_t action, in publishKeyEvent() argument
521 msg.body.key.hmac = std::move(hmac); in publishKeyEvent()
535 std::array<uint8_t, 32> hmac, int32_t action, int32_t actionButton, int32_t flags, in publishMotionEvent() argument
581 msg.body.motion.hmac = std::move(hmac); in publishMotionEvent()
1329 msg->body.key.displayId, msg->body.key.hmac, msg->body.key.action, in initializeKeyEvent()
1362 msg->body.motion.displayId, msg->body.motion.hmac, msg->body.motion.action, in initializeMotionEvent()
/aosp12/system/gatekeeper/
H A Dgatekeeper.cpp261 static_assert(offsetof(hw_auth_token_t, hmac) == hashable_length, in MintAuthToken()
267 ComputeSignature(token.hmac, sizeof(token.hmac), auth_token_key, key_len, in MintAuthToken()
270 memset(token.hmac, 0, sizeof(token.hmac)); in MintAuthToken()
/aosp12/hardware/interfaces/confirmationui/support/include/android/hardware/confirmationui/1.0/generic/
H A DGenericOperation.h133 auto hmac = HMacer::hmac256(testKey, "\0", bytes_cast(secureInputToken.challenge), in deliverSecureInputEvent() local
138 if (!hmac.isOk()) return ResponseCode::Unexpected; in deliverSecureInputEvent()
139 if (hmac.value() == secureInputToken.mac) { in deliverSecureInputEvent()
/aosp12/hardware/interfaces/confirmationui/1.0/vts/functional/
H A DVtsHalConfirmationUIV1_0TargetTest.cpp82 auto hmac = HMacer::hmac256(testKey, data...); in testHMAC() local
83 if (!hmac.isOk()) { in testHMAC()
87 hidl_vec<uint8_t> result(hmac.value().size()); in testHMAC()
88 copy(hmac.value().data(), hmac.value().data() + hmac.value().size(), result.data()); in testHMAC()
/aosp12/system/keymaster/key_blob_utils/
H A Dintegrity_assured_key_blob.cpp49 const AuthorizationSet& hidden, uint8_t hmac[HMAC_SIZE]) { in ComputeHmac()
70 memcpy(hmac, tmp, min(HMAC_SIZE, tmp_len)); in ComputeHmac()
/aosp12/frameworks/native/libs/input/tests/
H A DInputPublisherAndConsumer_test.cpp78 constexpr std::array<uint8_t, 32> hmac = {31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, in PublishAndConsumeKeyEvent() local
91 status = mPublisher->publishKeyEvent(seq, eventId, deviceId, source, displayId, hmac, action, in PublishAndConsumeKeyEvent()
114 EXPECT_EQ(hmac, keyEvent->getHmac()); in PublishAndConsumeKeyEvent()
148 constexpr std::array<uint8_t, 32> hmac = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, in PublishAndConsumeMotionEvent() local
194 status = mPublisher->publishMotionEvent(seq, eventId, deviceId, source, displayId, hmac, action, in PublishAndConsumeMotionEvent()
220 EXPECT_EQ(hmac, motionEvent->getHmac()); in PublishAndConsumeMotionEvent()
H A DStructLayout_test.cpp42 CHECK_OFFSET(InputMessage::Body::Key, hmac, 28); in TestInputMessageAlignment()
57 CHECK_OFFSET(InputMessage::Body::Motion, hmac, 28); in TestInputMessageAlignment()
/aosp12/frameworks/native/include/input/
H A DInputTransport.h99 std::array<uint8_t, 32> hmac; member
119 std::array<uint8_t, 32> hmac; member
340 int32_t displayId, std::array<uint8_t, 32> hmac, int32_t action,
353 int32_t displayId, std::array<uint8_t, 32> hmac, int32_t action,
H A DInput.h458 std::array<uint8_t, 32> hmac);
500 std::array<uint8_t, 32> hmac, int32_t action, int32_t flags, int32_t keyCode,
754 std::array<uint8_t, 32> hmac, int32_t action, int32_t actionButton,
/aosp12/bionic/libc/kernel/uapi/linux/
H A Dseg6_hmac.h29 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member
/aosp12/hardware/libhardware/include/hardware/
H A Dhw_auth_token.h46 uint8_t hmac[32]; member
/aosp12/hardware/qcom/keymaster/
H A Dkeymaster_qcom.h64 uint8_t hmac[KM_HMAC_LENGTH]; member
/aosp12/hardware/interfaces/identity/support/tests/
H A DIdentityCredentialSupportTest.cpp297 optional<vector<uint8_t>> hmac = support::hmacSha256(key, data); in TEST() local
298 ASSERT_TRUE(hmac); in TEST()
299 ASSERT_EQ(expected, hmac.value()); in TEST()

12