/system/security/keystore2/test_utils/ |
D | key_generations.rs | 31 use crate::authorizations::AuthSetBuilder; 678 pub fn check_key_param(authorizations: &[Authorization], key_param: KeyParameter) -> bool { in check_key_param() 679 for authrization in authorizations { in check_key_param() 710 &key_metadata.authorizations, in import_rsa_2048_key() 715 &key_metadata.authorizations, in import_rsa_2048_key() 720 &key_metadata.authorizations, in import_rsa_2048_key() 725 &key_metadata.authorizations, in import_rsa_2048_key() 733 &key_metadata.authorizations, in import_rsa_2048_key() 741 &key_metadata.authorizations, in import_rsa_2048_key() 770 &key_metadata.authorizations, in import_ec_p_256_key() [all …]
|
/system/keymaster/android_keymaster/ |
D | operation.cpp | 100 !key.authorizations().Contains(TAG_PADDING, *padding) && in GetAndValidatePadding() 101 !key.authorizations().Contains(TAG_PADDING_OLD, *padding)) { in GetAndValidatePadding() 125 if (key.authorizations().Contains(TAG_DIGEST, KM_DIGEST_NONE)) { in GetAndValidateDigest() 139 !key.authorizations().Contains(TAG_DIGEST, *digest) && in GetAndValidateDigest() 140 !key.authorizations().Contains(TAG_DIGEST_OLD, *digest)) { in GetAndValidateDigest()
|
/system/security/keystore2/tests/ |
D | keystore2_client_test_utils.rs | 44 authorizations, get_keystore_service, key_generations, key_generations::Error, run_as, 135 &authorizations::AuthSetBuilder::new().purpose(op_purpose).digest(op_digest), in create_signing_operation() 158 &authorizations::AuthSetBuilder::new() in perform_sample_hmac_sign_verify_op() 176 &authorizations::AuthSetBuilder::new() in perform_sample_hmac_sign_verify_op() 220 let mut authorizations = authorizations::AuthSetBuilder::new().purpose(KeyPurpose::SIGN); in perform_sample_asym_sign_verify_op() localVariable 222 authorizations = authorizations.padding_mode(value); in perform_sample_asym_sign_verify_op() 225 authorizations = authorizations.digest(value); in perform_sample_asym_sign_verify_op() 228 let sign_op = sec_level.createOperation(&key_metadata.key, &authorizations, false).unwrap(); in perform_sample_asym_sign_verify_op() 317 let mut op_params = authorizations::AuthSetBuilder::new() in perform_sample_sym_key_encrypt_op() 348 let mut op_params = authorizations::AuthSetBuilder::new() in perform_sample_sym_key_decrypt_op() [all …]
|
D | keystore2_client_key_agreement_tests.rs | 34 authorizations, get_keystore_service, key_generations, key_generations::Error, 62 let authorizations = authorizations::AuthSetBuilder::new().purpose(KeyPurpose::AGREE_KEY); in check_agreement() localVariable 63 let key_agree_op = sec_level.createOperation(keymint_key, &authorizations, false).unwrap(); in check_agreement() 171 let authorizations = authorizations::AuthSetBuilder::new().purpose(KeyPurpose::AGREE_KEY); in keystore2_ec_agree_key_with_different_curves_fail() localVariable 172 let key_agree_op = sec_level.createOperation(&keymint_key.key, &authorizations, false).unwrap(); in keystore2_ec_agree_key_with_different_curves_fail()
|
D | keystore2_client_import_keys_tests.rs | 32 authorizations, get_keystore_service, key_generations, key_generations::Error, 48 import_params: authorizations::AuthSetBuilder, in import_rsa_sign_key_and_perform_sample_operation() 141 let import_params = authorizations::AuthSetBuilder::new() in keystore2_rsa_import_key_success() 174 let import_params = authorizations::AuthSetBuilder::new() in keystore2_rsa_import_key_determine_key_size_and_pub_exponent() 202 let import_params = authorizations::AuthSetBuilder::new() in keystore2_rsa_import_key_fails_with_keysize_param_mismatch_error() 235 let import_params = authorizations::AuthSetBuilder::new() in keystore2_rsa_import_key_fails_with_public_exponent_param_mismatch_error() 269 let import_params = authorizations::AuthSetBuilder::new() in keystore2_rsa_import_key_with_multipurpose_fails_incompt_purpose_error() 308 let import_params = authorizations::AuthSetBuilder::new() in keystore2_import_ec_key_success() 338 let import_params = authorizations::AuthSetBuilder::new() in keystore2_ec_import_key_fails_with_mismatch_curve_error() 528 let wrapping_key_params = authorizations::AuthSetBuilder::new() in keystore2_import_wrapped_key_success() [all …]
|
D | keystore2_client_key_id_domain_tests.rs | 25 authorizations, get_keystore_service, key_generations, key_generations::Error, 91 &authorizations::AuthSetBuilder::new() in keystore2_find_key_with_key_id_as_domain() 147 &authorizations::AuthSetBuilder::new().purpose(KeyPurpose::SIGN).digest(Digest::SHA_2_256), in keystore2_key_id_alias_rebind_verify_by_alias() 158 &authorizations::AuthSetBuilder::new() in keystore2_key_id_alias_rebind_verify_by_alias() 232 &authorizations::AuthSetBuilder::new().purpose(KeyPurpose::SIGN).digest(Digest::SHA_2_256), in keystore2_key_id_alias_rebind_verify_by_key_id() 243 &authorizations::AuthSetBuilder::new() in keystore2_key_id_alias_rebind_verify_by_key_id()
|
D | keystore2_client_3des_key_tests.rs | 25 authorizations, get_keystore_service, key_generations, key_generations::Error, 129 let gen_params = authorizations::AuthSetBuilder::new() in keystore2_3des_key_fails_missing_padding() 152 let op_params = authorizations::AuthSetBuilder::new() in keystore2_3des_key_fails_missing_padding() 184 let op_params = authorizations::AuthSetBuilder::new() in keystore2_3des_key_encrypt_fails_invalid_input_length()
|
D | keystore2_client_ec_key_tests.rs | 29 authorizations, get_keystore_service, key_generations, key_generations::Error, run_as, 72 &authorizations::AuthSetBuilder::new().purpose(KeyPurpose::SIGN).digest(digest), in create_ec_key_and_operation() 252 let gen_params = authorizations::AuthSetBuilder::new() in keystore2_generate_ec_key_missing_curve() 288 let gen_params = authorizations::AuthSetBuilder::new() in keystore2_generate_ec_key_25519_multi_purpose() 334 &authorizations::AuthSetBuilder::new().purpose(KeyPurpose::SIGN).digest(Digest::NONE), in keystore2_ec_25519_generate_key_success() 379 &authorizations::AuthSetBuilder::new().purpose(KeyPurpose::SIGN).digest(digest), in keystore2_ec_25519_generate_key_fail() 412 &authorizations::AuthSetBuilder::new().purpose(KeyPurpose::SIGN).digest(digest), in keystore2_create_op_with_incompatible_key_digest() 503 &authorizations::AuthSetBuilder::new().purpose(KeyPurpose::SIGN).digest(Digest::SHA_2_256), in keystore2_generate_key_with_blob_domain()
|
D | keystore2_client_hmac_key_tests.rs | 24 authorizations, get_keystore_service, key_generations, key_generations::Error, 43 &authorizations::AuthSetBuilder::new() in create_hmac_key_and_operation() 166 let gen_params = authorizations::AuthSetBuilder::new() in keystore2_hmac_gen_key_multi_digests_fails_expect_unsupported_digest() 200 let gen_params = authorizations::AuthSetBuilder::new() in keystore2_hmac_gen_key_no_digests_fails_expect_unsupported_digest()
|
D | keystore2_client_aes_key_tests.rs | 25 authorizations, get_keystore_service, key_generations, key_generations::Error, 222 let gen_params = authorizations::AuthSetBuilder::new() in keystore2_aes_key_op_fails_multi_block_modes() 247 let op_params = authorizations::AuthSetBuilder::new() in keystore2_aes_key_op_fails_multi_block_modes() 270 let gen_params = authorizations::AuthSetBuilder::new() in keystore2_aes_key_op_fails_multi_padding_modes() 295 let op_params = authorizations::AuthSetBuilder::new() in keystore2_aes_key_op_fails_multi_padding_modes()
|
/system/keymaster/km_openssl/ |
D | symmetric_key.cpp | 77 AuthorizationSet authorizations(key_description); in ImportKey() local 80 if (!authorizations.GetTagValue(TAG_KEY_SIZE, &key_bits)) { in ImportKey() 83 authorizations.push_back(TAG_KEY_SIZE, key_bits); in ImportKey() 97 return blob_maker_.CreateKeyBlob(authorizations, KM_ORIGIN_IMPORTED, input_key_material, in ImportKey()
|
D | ecies_kem.cpp | 25 const AuthorizationSet& authorizations(kem_description); in EciesKem() local 27 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()
|
D | ec_key_factory.cpp | 92 AuthorizationSet authorizations(key_description); in GenerateKey() local 96 keymaster_error_t error = GetCurveAndSize(authorizations, &ec_curve, &key_size); in GenerateKey() 99 } else if (!authorizations.Contains(TAG_KEY_SIZE, key_size)) { in GenerateKey() 100 authorizations.push_back(TAG_KEY_SIZE, key_size); in GenerateKey() 101 } else if (!authorizations.Contains(TAG_EC_CURVE, ec_curve)) { in GenerateKey() 102 authorizations.push_back(TAG_EC_CURVE, ec_curve); in GenerateKey() 168 error = blob_maker_.CreateKeyBlob(authorizations, KM_ORIGIN_GENERATED, key_material, key_blob, in GenerateKey() 218 AuthorizationSet authorizations; in ImportKey() local 221 key_description, input_key_material_format, input_key_material, &authorizations, &key_size); in ImportKey() 224 error = blob_maker_.CreateKeyBlob(authorizations, KM_ORIGIN_IMPORTED, input_key_material, in ImportKey()
|
D | rsa_key_factory.cpp | 132 AuthorizationSet authorizations; in ImportKey() local 137 &authorizations, &public_exponent, &key_size); in ImportKey() 139 error = blob_maker_.CreateKeyBlob(authorizations, KM_ORIGIN_IMPORTED, input_key_material, in ImportKey()
|
D | certificate_utils.cpp | 359 (key.authorizations().Contains(TAG_PURPOSE, KM_PURPOSE_SIGN) || in generate_self_signed_cert() 360 key.authorizations().Contains(TAG_PURPOSE, KM_PURPOSE_ATTEST_KEY)); in generate_self_signed_cert() 361 cert_params.is_encryption_key = key.authorizations().Contains(TAG_PURPOSE, KM_PURPOSE_DECRYPT); in generate_self_signed_cert() 362 cert_params.is_agreement_key = key.authorizations().Contains(TAG_PURPOSE, KM_PURPOSE_AGREE_KEY); in generate_self_signed_cert()
|
D | hmac_operation.cpp | 40 if (!key.authorizations().GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length_bits)) { in CreateOperation() 66 if (!key.authorizations().GetTagValue(TAG_DIGEST, &digest)) { in CreateOperation()
|
/system/security/keystore/ |
D | keystore_cli_v2.cpp | 156 bool verifyEncryptionKeyAttributes(const std::vector<ks2::Authorization> authorizations) { in verifyEncryptionKeyAttributes() argument 160 std::any_of(authorizations.begin(), authorizations.end(), [&](const ks2::Authorization& a) { in verifyEncryptionKeyAttributes() 169 std::any_of(authorizations.begin(), authorizations.end(), [&](const ks2::Authorization& a) { in verifyEncryptionKeyAttributes() 178 std::any_of(authorizations.begin(), authorizations.end(), [&](const ks2::Authorization& a) { in verifyEncryptionKeyAttributes() 187 std::any_of(authorizations.begin(), authorizations.end(), [&](const ks2::Authorization& a) { in verifyEncryptionKeyAttributes() 197 bool verifyAuthenticationKeyAttributes(const std::vector<ks2::Authorization> authorizations) { in verifyAuthenticationKeyAttributes() argument 201 std::any_of(authorizations.begin(), authorizations.end(), [&](const ks2::Authorization& a) { in verifyAuthenticationKeyAttributes() 210 std::any_of(authorizations.begin(), authorizations.end(), [&](const ks2::Authorization& a) { in verifyAuthenticationKeyAttributes() 219 std::any_of(authorizations.begin(), authorizations.end(), [&](const ks2::Authorization& a) { in verifyAuthenticationKeyAttributes() 228 std::any_of(authorizations.begin(), authorizations.end(), [&](const ks2::Authorization& a) { in verifyAuthenticationKeyAttributes() [all …]
|
/system/hardware/interfaces/keystore2/aidl/aidl_api/android.system.keystore2/1/android/system/keystore2/ |
D | KeyMetadata.aidl | 40 android.system.keystore2.Authorization[] authorizations;
|
/system/hardware/interfaces/keystore2/aidl/aidl_api/android.system.keystore2/current/android/system/keystore2/ |
D | KeyMetadata.aidl | 40 android.system.keystore2.Authorization[] authorizations;
|
/system/hardware/interfaces/keystore2/aidl/aidl_api/android.system.keystore2/2/android/system/keystore2/ |
D | KeyMetadata.aidl | 40 android.system.keystore2.Authorization[] authorizations;
|
/system/hardware/interfaces/keystore2/aidl/aidl_api/android.system.keystore2/3/android/system/keystore2/ |
D | KeyMetadata.aidl | 40 android.system.keystore2.Authorization[] authorizations;
|
/system/core/trusty/keymaster/keymint/ |
D | TrustyKeyMintDevice.cpp | 50 const keymaster::AuthorizationSet& authorizations) { in convertAuthSet() argument 52 std::transform(authorizations.begin(), authorizations.end(), in convertAuthSet() 53 std::back_inserter(retval.authorizations), kmParam2Aidl); in convertAuthSet() 66 if (!keyMintEnforced.authorizations.empty()) retval.push_back(std::move(keyMintEnforced)); in convertKeyCharacteristics() 67 if (includeKeystoreEnforced && !keystoreEnforced.authorizations.empty()) { in convertKeyCharacteristics()
|
/system/hardware/interfaces/keystore2/aidl/android/system/keystore2/ |
D | KeyMetadata.aidl | 49 Authorization[] authorizations;
|
/system/keymaster/ng/ |
D | AndroidKeyMintDevice.cpp | 55 keyMintEnforced.authorizations = kmParamSet2Aidl(hw_enforced); in convertKeyCharacteristics() 96 keystoreEnforced.authorizations.push_back(kmParam2Aidl(entry)); in convertKeyCharacteristics() 163 keyMintEnforced.authorizations.push_back(kmParam2Aidl(entry)); in convertKeyCharacteristics() 175 keystoreEnforced.authorizations.push_back(kmParam2Aidl(entry)); in convertKeyCharacteristics() 182 if (!keyMintEnforced.authorizations.empty()) retval.push_back(std::move(keyMintEnforced)); in convertKeyCharacteristics() 183 if (include_keystore_enforced && !keystoreEnforced.authorizations.empty()) { in convertKeyCharacteristics()
|
/system/keymint/tests/src/bin/ |
D | auth-keyblob-parse.rs | 180 assert_eq!(extracted[0].authorizations, filtered); in process() 186 authorizations: keyblob.hw_enforced, in process() 190 authorizations: keyblob.sw_enforced, in process()
|