Home
last modified time | relevance | path

Searched refs:GetTagValue (Results 1 – 25 of 35) sorted by relevance

12

/system/keymaster/km_openssl/
Dhmac_key.cpp51 if (!hw_enforced.GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length) && in LoadKey()
52 !sw_enforced.GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length)) { in LoadKey()
67 if (!key_description.GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length_bits)) in validate_algorithm_specific_new_key_params()
71 if (!key_description.GetTagValue(TAG_DIGEST, &digest)) { in validate_algorithm_specific_new_key_params()
Daes_key.cpp56 if (!hw_enforced.GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length) && in LoadKey()
57 !sw_enforced.GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length)) { in LoadKey()
76 if (!key_description.GetTagValue(TAG_MIN_MAC_LENGTH, &min_tag_length)) in validate_algorithm_specific_new_key_params()
Dec_key_factory.cpp47 if (!key_description.GetTagValue(TAG_EC_CURVE, curve)) { in GetCurveAndSize()
49 if (!key_description.GetTagValue(TAG_KEY_SIZE, key_size_bits)) { in GetCurveAndSize()
63 if (key_description.GetTagValue(TAG_KEY_SIZE, &tag_key_size_bits) && in GetCurveAndSize()
173 if (!updated_description->GetTagValue(TAG_KEY_SIZE, key_size_bits)) { in UpdateImportKeyDescription()
184 if (!updated_description->GetTagValue(TAG_EC_CURVE, &curve)) { in UpdateImportKeyDescription()
191 if (!updated_description->GetTagValue(TAG_ALGORITHM, &algorithm)) { in UpdateImportKeyDescription()
Drsa_key_factory.cpp62 if (!authorizations.GetTagValue(TAG_RSA_PUBLIC_EXPONENT, &public_exponent)) { in GenerateKey()
72 if (!authorizations.GetTagValue(TAG_KEY_SIZE, &key_size)) { in GenerateKey()
148 if (!updated_description->GetTagValue(TAG_RSA_PUBLIC_EXPONENT, public_exponent)) in UpdateImportKeyDescription()
157 if (!updated_description->GetTagValue(TAG_KEY_SIZE, key_size)) in UpdateImportKeyDescription()
166 if (!updated_description->GetTagValue(TAG_ALGORITHM, &algorithm)) in UpdateImportKeyDescription()
Decies_kem.cpp27 if (!authorizations.GetTagValue(TAG_EC_CURVE, &curve_)) { in EciesKem()
46 if (!authorizations.GetTagValue(TAG_KDF, &kdf)) { in EciesKem()
65 if (!authorizations.GetTagValue(TAG_KEY_SIZE, &key_bytes_to_generate_)) { in EciesKem()
71 single_hash_mode_ = authorizations.GetTagValue(TAG_ECIES_SINGLE_HASH_MODE); in EciesKem()
Dhmac_operation.cpp40 if (!key.authorizations().GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length_bits)) { in CreateOperation()
47 if (begin_params.GetTagValue(TAG_MAC_LENGTH, &mac_length_bits)) { in CreateOperation()
61 if (!key.authorizations().GetTagValue(TAG_DIGEST, &digest)) { in CreateOperation()
Dsymmetric_key.cpp41 if (!key_description.GetTagValue(TAG_KEY_SIZE, &key_size_bits) || in GenerateKey()
76 if (!authorizations.GetTagValue(TAG_KEY_SIZE, &key_bits)) { in ImportKey()
Dblock_cipher_operation.cpp56 if (!begin_params.GetTagValue(TAG_MAC_LENGTH, &tag_length_bits)) { in GetAndValidateGcmTagLength()
61 if (!key_params.GetTagValue(TAG_MIN_MAC_LENGTH, &min_tag_length_bits)) { in GetAndValidateGcmTagLength()
84 if (!begin_params.GetTagValue(TAG_BLOCK_MODE, &block_mode)) { in CreateOperation()
116 bool caller_nonce = key.authorizations().GetTagValue(TAG_CALLER_NONCE); in CreateOperation()
258 if (!input_params.GetTagValue(TAG_NONCE, &iv_blob)) { in GetIv()
293 if (input_params.GetTagValue(TAG_ASSOCIATED_DATA, &aad)) { in HandleAad()
Dattestation_record.cpp345 auth_list.GetTagValue(TAG_KEY_SIZE, &key_size)) { in build_auth_list()
432 if (!attestation_params.GetTagValue(TAG_ATTESTATION_CHALLENGE, &attestation_challenge)) in build_attestation_record()
443 if (!attestation_params.GetTagValue(TAG_ATTESTATION_APPLICATION_ID, &attestation_app_id)) in build_attestation_record()
471 if (tee_enforced.GetTagValue(TAG_INCLUDE_UNIQUE_ID)) { in build_attestation_record()
475 if (!sw_enforced.GetTagValue(TAG_CREATION_DATETIME, &creation_datetime)) { in build_attestation_record()
481 sw_enforced.GetTagValue(TAG_APPLICATION_ID, &application_id); in build_attestation_record()
486 attestation_params.GetTagValue(TAG_RESET_SINCE_ID_ROTATION), &unique_id); in build_attestation_record()
Dattestation_utils.cpp309 if ((!key.sw_enforced().GetTagValue(TAG_ALGORITHM, &sign_algorithm) && in generate_attestation()
310 !key.hw_enforced().GetTagValue(TAG_ALGORITHM, &sign_algorithm))) in generate_attestation()
339 key.authorizations().GetTagValue(TAG_ACTIVE_DATETIME, &activeDateTime); in generate_attestation()
346 key.authorizations().GetTagValue(TAG_USAGE_EXPIRE_DATETIME, &usageExpireDateTime); in generate_attestation()
/system/security/keystore/
Dkeystore_client_impl.cpp93 auto init_vector_blob = output_params.GetTagValue(TAG_NONCE); in encryptWithAuthentication()
548 auto algorithm = NullOrOr(hardware_enforced_characteristics.GetTagValue(TAG_ALGORITHM), in verifyEncryptionKeyAttributes()
549 software_enforced_characteristics.GetTagValue(TAG_ALGORITHM)); in verifyEncryptionKeyAttributes()
554 auto key_size = NullOrOr(hardware_enforced_characteristics.GetTagValue(TAG_KEY_SIZE), in verifyEncryptionKeyAttributes()
555 software_enforced_characteristics.GetTagValue(TAG_KEY_SIZE)); in verifyEncryptionKeyAttributes()
560 auto block_mode = NullOrOr(hardware_enforced_characteristics.GetTagValue(TAG_BLOCK_MODE), in verifyEncryptionKeyAttributes()
561 software_enforced_characteristics.GetTagValue(TAG_BLOCK_MODE)); in verifyEncryptionKeyAttributes()
566 auto padding_mode = NullOrOr(hardware_enforced_characteristics.GetTagValue(TAG_PADDING), in verifyEncryptionKeyAttributes()
567 software_enforced_characteristics.GetTagValue(TAG_PADDING)); in verifyEncryptionKeyAttributes()
589 auto algorithm = NullOrOr(hardware_enforced_characteristics.GetTagValue(TAG_ALGORITHM), in verifyAuthenticationKeyAttributes()
[all …]
Dauth_token_table.cpp104 auto algorithm = defaultOr(key_info.GetTagValue(TAG_ALGORITHM), Algorithm::AES); in KeyRequiresAuthentication()
110 auto algorithm = defaultOr(key_info.GetTagValue(TAG_ALGORITHM), Algorithm::AES); in KeyRequiresAuthPerOperation()
123 defaultOr(key_info.GetTagValue(TAG_USER_AUTH_TYPE), HardwareAuthenticatorType::NONE); in FindAuthorization()
159 auto timeout = defaultOr(key_info.GetTagValue(TAG_AUTH_TIMEOUT), 0); in FindTimedAuthorization()
165 if (key_info.GetTagValue(TAG_ALLOW_WHILE_ON_BODY).isOk()) { in FindTimedAuthorization()
/system/keymaster/include/keymaster/
Dauthorization_set.h259 inline bool GetTagValue(TypedTag<KM_UINT, T> tag, uint32_t* val) const { in GetTagValue() function
269 bool GetTagValue(TypedTag<KM_UINT_REP, Tag> tag, size_t instance, uint32_t* val) const { in GetTagValue() function
278 inline bool GetTagValue(TypedTag<KM_ULONG, T> tag, uint64_t* val) const { in GetTagValue() function
288 bool GetTagValue(TypedTag<KM_ULONG_REP, Tag> tag, size_t instance, uint64_t* val) const { in GetTagValue() function
297 bool GetTagValue(TypedEnumTag<KM_ENUM, Tag, T> tag, T* val) const { in GetTagValue() function
307 bool GetTagValue(TypedEnumTag<KM_ENUM_REP, Tag, T> tag, size_t instance, T* val) const { in GetTagValue() function
317 bool GetTagValue(TypedEnumTag<KM_ENUM_REP, Tag, T> tag, T* val) const { in GetTagValue() function
328 bool GetTagValue(TypedTag<KM_UINT_REP, Tag> tag, size_t instance, in GetTagValue() function
338 bool GetTagValue(TypedTag<KM_BYTES, Tag> tag, keymaster_blob_t* val) const { in GetTagValue() function
347 bool GetTagValue(TypedTag<KM_BIGNUM, Tag> tag, keymaster_blob_t* val) const { in GetTagValue() function
[all …]
/system/keymaster/tests/
Dauthorization_set_test.cpp89 EXPECT_TRUE(set.GetTagValue(TAG_USER_ID, &int_val)); in TEST()
93 EXPECT_TRUE(set.GetTagValue(TAG_APPLICATION_ID, &blob_val)); in TEST()
439 EXPECT_TRUE(set.GetTagValue(TAG_USER_ID, &val)); in TEST()
443 EXPECT_FALSE(set.GetTagValue(TAG_KEY_SIZE, &val)); in TEST()
459 EXPECT_TRUE(set1.GetTagValue(TAG_RSA_PUBLIC_EXPONENT, &val)); in TEST()
463 EXPECT_FALSE(set2.GetTagValue(TAG_RSA_PUBLIC_EXPONENT, &val)); in TEST()
481 EXPECT_TRUE(set1.GetTagValue(TAG_USER_SECURE_ID, 0, &val)); in TEST()
483 EXPECT_TRUE(set1.GetTagValue(TAG_USER_SECURE_ID, 1, &val)); in TEST()
487 EXPECT_FALSE(set2.GetTagValue(TAG_USER_SECURE_ID, &val)); in TEST()
501 EXPECT_TRUE(set.GetTagValue(TAG_ALGORITHM, &val)); in TEST()
[all …]
Dwrapped_key_test.cpp95 auth_list.GetTagValue(TAG_KEY_SIZE, &key_size); in TEST()
99 auth_list.GetTagValue(TAG_ALGORITHM, &algorithm); in TEST()
/system/keymaster/legacy_support/
Dkeymaster1_legacy_support.cpp171 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in RequiresSoftwareDigesting()
195 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in RequiresSoftwareDigesting()
237 if (key_description.GetTagValue(TAG_EC_CURVE, &curve)) { in GenerateKey()
246 if (key_description.GetTagValue(TAG_KEY_SIZE, &key_size_from_desc)) { in GenerateKey()
268 if (!additional_params.GetTagValue(TAG_DIGEST, &digest)) { in LoadKey()
290 if (!additional_params.GetTagValue(TAG_DIGEST, &digest)) { in LoadKey()
Dkeymaster_passthrough_key.cpp62 if (additional_parameters_.GetTagValue(TAG_APPLICATION_DATA, &km_app_data)) { in formatted_key_material()
68 if (additional_parameters_.GetTagValue(TAG_APPLICATION_ID, &km_client_id)) { in formatted_key_material()
Drsa_keymaster0_key.cpp44 if (!key_description.GetTagValue(TAG_RSA_PUBLIC_EXPONENT, &public_exponent)) { in GenerateKey()
50 if (!key_description.GetTagValue(TAG_KEY_SIZE, &key_size)) { in GenerateKey()
/system/keymaster/contexts/
Dkeymaster2_passthrough_context.cpp76 if (!additional_params.GetTagValue(TAG_APPLICATION_ID, clientIdPtr)) { in ParseKeyBlob()
79 if (!additional_params.GetTagValue(TAG_APPLICATION_DATA, applicationDataPtr)) { in ParseKeyBlob()
98 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
99 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
Dkeymaster1_passthrough_context.cpp120 if (additional_params.GetTagValue(TAG_APPLICATION_ID, &client_id)) in parseKeymaster1HwBlob()
122 if (additional_params.GetTagValue(TAG_APPLICATION_DATA, &app_data)) in parseKeymaster1HwBlob()
166 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
167 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
236 if (!key.authorizations().GetTagValue(TAG_ALGORITHM, &key_algorithm)) { in GenerateAttestation()
Dsoft_keymaster_context.cpp288 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
289 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
405 if (additional_params.GetTagValue(TAG_APPLICATION_ID, &client_id)) in ParseKeymaster1HwBlob()
407 if (additional_params.GetTagValue(TAG_APPLICATION_DATA, &app_data)) in ParseKeymaster1HwBlob()
451 if (!key.authorizations().GetTagValue(TAG_ALGORITHM, &key_algorithm)) { in GenerateAttestation()
Dpure_soft_keymaster_context.cpp172 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
173 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
229 if (!key.authorizations().GetTagValue(TAG_ALGORITHM, &key_algorithm)) { in GenerateAttestation()
Dsoft_keymaster_device.cpp619 if (!params_copy.GetTagValue(TAG_OS_VERSION, &request.os_version) || in configure()
620 !params_copy.GetTagValue(TAG_OS_PATCHLEVEL, &request.os_patchlevel)) { in configure()
723 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in KeyRequiresSoftwareDigesting()
807 request.key_description.GetTagValue(TAG_EC_CURVE, &curve)) { in generate_key()
816 if (request.key_description.GetTagValue(TAG_KEY_SIZE, &key_size_from_desc)) { in generate_key()
1086 request.attest_params.GetTagValue(TAG_ATTESTATION_CHALLENGE, &attestation_challenge); in attest_key()
1222 if (!akmKey->hw_enforced().GetTagValue(TAG_ALGORITHM, &algorithm) && in begin()
1223 !akmKey->sw_enforced().GetTagValue(TAG_ALGORITHM, &algorithm)) { in begin()
1231 if (!akmKey->hw_enforced().GetTagValue(TAG_DIGEST, &digest) && in begin()
1232 !akmKey->sw_enforced().GetTagValue(TAG_DIGEST, &digest)) { in begin()
/system/keymaster/android_keymaster/
Doperation.cpp93 if (!begin_params.GetTagValue(TAG_PADDING, padding)) { in GetAndValidatePadding()
118 if (!begin_params.GetTagValue(TAG_DIGEST, digest)) { in GetAndValidateDigest()
Dandroid_keymaster.cpp50 if (tee_enforced.GetTagValue(TAG_OS_PATCHLEVEL, &key_os_patchlevel) || in CheckVersionInfo()
51 sw_enforced.GetTagValue(TAG_OS_PATCHLEVEL, &key_os_patchlevel)) { in CheckVersionInfo()
224 if (!request.key_description.GetTagValue(TAG_ALGORITHM, &algorithm) || in GenerateKey()
271 if (!key->authorizations().GetTagValue(TAG_ALGORITHM, &key_algorithm)) in BeginOperation()
402 if (request.attest_params.GetTagValue(TAG_ATTESTATION_APPLICATION_ID, in AttestKey()
437 if (!request.key_description.GetTagValue(TAG_ALGORITHM, &algorithm) || in ImportKey()
518 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm) || in ImportWrappedKey()

12