| /system/security/keystore2/src/key_parameter/ | 
| D | basic_tests.rs | 21         KeyParameter::new(KeyParameterValue::Algorithm(Algorithm::RSA), SecurityLevel::STRONGBOX);  in test_key_parameter() 25     assert_eq!(*key_parameter.key_parameter_value(), KeyParameterValue::Algorithm(Algorithm::RSA));  in test_key_parameter()
  | 
| /system/security/keystore2/tests/ | 
| D | keystore2_client_keystore_engine_tests.rs | 16     Algorithm::Algorithm, Digest::Digest, EcCurve::EcCurve, KeyPurpose::KeyPurpose, 38         .algorithm(Algorithm::RSA)  in generate_rsa_key_and_grant_to_user() 75         .algorithm(Algorithm::EC)  in generate_ec_key_and_grant_to_user() 106     algo: Algorithm,  in generate_key_and_grant_to_user()  argument 110     assert!(matches!(algo, Algorithm::RSA | Algorithm::EC));  in generate_key_and_grant_to_user() 113         Algorithm::RSA => generate_rsa_key_and_grant_to_user(  in generate_key_and_grant_to_user() 120         Algorithm::EC => generate_ec_key_and_grant_to_user(  in generate_key_and_grant_to_user() 164         generate_key_and_grant_to_user(&sl, alias, GRANTEE_UID, Algorithm::RSA).unwrap()  in keystore2_perform_crypto_op_using_keystore2_engine_rsa_key_success() 193         generate_key_and_grant_to_user(&sl, alias, GRANTEE_UID, Algorithm::EC).unwrap()  in keystore2_perform_crypto_op_using_keystore2_engine_ec_key_success() 224             generate_key_and_grant_to_user(&sl, alias, GRANTEE_UID, Algorithm::RSA).unwrap();  in keystore2_perform_crypto_op_using_keystore2_engine_pem_pub_key_success()
  | 
| D | keystore2_client_attest_key_tests.rs | 25     Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve, 49     for algo in [Algorithm::RSA, Algorithm::EC] {  in keystore2_attest_rsa_signing_key_success() 102     for algo in [Algorithm::RSA, Algorithm::EC] {  in keystore2_attest_rsa_encrypt_key_success() 156     for algo in [Algorithm::RSA, Algorithm::EC] {  in keystore2_attest_ec_key_success() 276         .algorithm(Algorithm::RSA)  in keystore2_generate_rsa_attest_key_with_multi_purpose_fail() 319         .algorithm(Algorithm::EC)  in keystore2_ec_attest_key_with_multi_purpose_fail() 354         key_generations::generate_attestation_key(&sl, Algorithm::RSA, att_challenge),  in keystore2_attest_key_fails_missing_challenge() 436         Algorithm::AES,  in keystore2_attest_rsa_key_with_symmetric_key_fails_sys_error() 501 fn generate_attested_key_with_device_attest_ids(algorithm: Algorithm) {  in generate_attested_key_with_device_attest_ids()  argument 553     generate_attested_key_with_device_attest_ids(Algorithm::EC);  in keystore2_attest_ecdsa_attestation_id() [all …] 
 | 
| D | keystore2_client_3des_key_tests.rs | 19     Algorithm::Algorithm, BlockMode::BlockMode, ErrorCode::ErrorCode, KeyPurpose::KeyPurpose, 38         Algorithm::TRIPLE_DES,  in create_3des_key_and_operation() 103         Algorithm::TRIPLE_DES,  in keystore2_3des_key_fails_unsupported_key_size() 124         .algorithm(Algorithm::TRIPLE_DES)  in keystore2_3des_key_fails_missing_padding() 168         Algorithm::TRIPLE_DES,  in keystore2_3des_key_encrypt_fails_invalid_input_length()
  | 
| D | keystore2_client_authorizations_tests.rs | 23     Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve, 53         .algorithm(Algorithm::EC)  in gen_key_including_unique_id() 166         .algorithm(Algorithm::EC)  in keystore2_gen_key_auth_active_datetime_test_success() 196         .algorithm(Algorithm::EC)  in keystore2_gen_key_auth_future_active_datetime_test_op_fail() 226         .algorithm(Algorithm::EC)  in keystore2_gen_key_auth_future_origination_expire_datetime_test_success() 256         .algorithm(Algorithm::EC)  in keystore2_gen_key_auth_origination_expire_datetime_test_op_fail() 286         .algorithm(Algorithm::HMAC)  in keystore2_gen_key_auth_future_usage_expire_datetime_hmac_verify_op_success() 315         .algorithm(Algorithm::HMAC)  in keystore2_gen_key_auth_usage_expire_datetime_hmac_verify_op_fail() 353         .algorithm(Algorithm::AES)  in keystore2_gen_key_auth_usage_future_expire_datetime_decrypt_op_success() 404         .algorithm(Algorithm::AES)  in keystore2_gen_key_auth_usage_expire_datetime_decrypt_op_fail() [all …] 
 | 
| D | keystore2_client_aes_key_tests.rs | 19     Algorithm::Algorithm, BlockMode::BlockMode, ErrorCode::ErrorCode, KeyPurpose::KeyPurpose, 41         Algorithm::AES,  in create_aes_key_and_operation() 174         Algorithm::AES,  in keystore2_aes_key_fails_unsupported_key_size() 194         Algorithm::AES,  in keystore2_aes_gcm_key_fails_missing_min_mac_len() 214         .algorithm(Algorithm::AES)  in keystore2_aes_key_op_fails_multi_block_modes() 267         .algorithm(Algorithm::AES)  in keystore2_aes_key_op_fails_multi_padding_modes() 321         Algorithm::AES,  in keystore2_aes_key_op_fails_incompatible_padding() 352         Algorithm::AES,  in keystore2_aes_key_op_fails_incompatible_blockmode() 453         Algorithm::AES,  in keystore2_aes_key_op_fails_nonce_prohibited()
  | 
| D | keystore2_client_device_unique_attestation_tests.rs | 22     Algorithm::Algorithm, Digest::Digest, EcCurve::EcCurve, ErrorCode::ErrorCode, 54         .algorithm(Algorithm::EC)  in generate_ec_key_device_unique_attested_with_id_attest() 74         .algorithm(Algorithm::RSA)  in generate_rsa_key_device_unique_attested_with_id_attest() 161         .algorithm(Algorithm::EC)  in keystore2_gen_key_device_unique_attest_with_default_sec_level_unimplemented() 191         .algorithm(Algorithm::EC)  in keystore2_gen_ec_key_device_unique_attest_with_strongbox_sec_level_test_success() 229         .algorithm(Algorithm::RSA)  in keystore2_gen_rsa_key_device_unique_attest_with_strongbox_sec_level_test_success() 279             .algorithm(Algorithm::EC)  in keystore2_device_unique_attest_key_fails_with_invalid_attestation_id()
  | 
| D | keystore2_client_import_keys_tests.rs | 21     Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve, 136         .algorithm(Algorithm::RSA)  in keystore2_rsa_import_key_success() 168         .algorithm(Algorithm::RSA)  in keystore2_rsa_import_key_determine_key_size_and_pub_exponent() 195         .algorithm(Algorithm::RSA)  in keystore2_rsa_import_key_fails_with_keysize_param_mismatch_error() 227         .algorithm(Algorithm::RSA)  in keystore2_rsa_import_key_fails_with_public_exponent_param_mismatch_error() 260         .algorithm(Algorithm::RSA)  in keystore2_rsa_import_key_with_multipurpose_fails_incompt_purpose_error() 311         .algorithm(Algorithm::EC)  in keystore2_import_ec_key_success() 335         .algorithm(Algorithm::EC)  in keystore2_ec_import_key_fails_with_mismatch_curve_error() 516         .algorithm(Algorithm::RSA)  in keystore2_import_wrapped_key_success() 555         .algorithm(Algorithm::RSA)  in keystore2_import_wrapped_key_fails_with_wrong_purpose()
  | 
| /system/keymint/tests/src/bin/ | 
| D | auth-keyblob-parse.rs | 30         Algorithm, DateTime, EcCurve, ErrorCode, KeyCharacteristics, KeyParam, SecurityLevel, 102     let algo_val = get_tag_value!(&combined, Algorithm, ErrorCode::InvalidArgument)  in process() 107         Algorithm::Aes => KeyMaterial::Aes(aes::Key::new(raw_key).unwrap().into()),  in process() 108         Algorithm::TripleDes => KeyMaterial::TripleDes(  in process() 111         Algorithm::Hmac => KeyMaterial::Hmac(hmac::Key(raw_key).into()),  in process() 112         Algorithm::Ec => {  in process() 140         Algorithm::Rsa => KeyMaterial::Rsa(rsa::Key(raw_key).into()),  in process() 157         Algorithm::Ec | Algorithm::Rsa => {  in process()
  | 
| /system/security/keystore2/src/ | 
| D | remote_provisioning.rs | 23     Algorithm::Algorithm, AttestationKey::AttestationKey, KeyParameter::KeyParameter, 72                     value: KeyParameterValue::Algorithm(Algorithm::RSA)  in is_asymmetric_key() 75                     value: KeyParameterValue::Algorithm(Algorithm::EC)  in is_asymmetric_key()
  | 
| D | sw_keyblob.rs | 21     Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve, 70         KeyParameterValue::Algorithm(Algorithm::AES)  in export_key() 71         | KeyParameterValue::Algorithm(Algorithm::TRIPLE_DES)  in export_key() 72         | KeyParameterValue::Algorithm(Algorithm::HMAC) => KeyFormat::RAW,  in export_key() 73         KeyParameterValue::Algorithm(Algorithm::RSA)  in export_key() 74         | KeyParameterValue::Algorithm(Algorithm::EC) => KeyFormat::PKCS8,  in export_key() 79         (KeyFormat::PKCS8, KeyParameterValue::Algorithm(Algorithm::EC)) => {  in export_key() 433                     Tag::ALGORITHM => KeyParameterValue::Algorithm(Algorithm(val)),  in deserialize_params() 520             KeyParameterValue::Algorithm(v) => {  in serialize_params()
  | 
| D | security_level.rs | 52     Algorithm::Algorithm, AttestationKey::AttestationKey, Certificate::Certificate, 509             Some(KeyParameter { tag: _, value: KeyParameterValue::Algorithm(Algorithm::RSA) })  in add_required_parameters() 510             | Some(KeyParameter { tag: _, value: KeyParameterValue::Algorithm(Algorithm::EC) }) => {  in add_required_parameters() 723                 KeyParameterValue::Algorithm(Algorithm::AES)  in import_key() 724                 | KeyParameterValue::Algorithm(Algorithm::HMAC)  in import_key() 725                 | KeyParameterValue::Algorithm(Algorithm::TRIPLE_DES) => Ok(KeyFormat::RAW),  in import_key() 726                 KeyParameterValue::Algorithm(Algorithm::RSA)  in import_key() 727                 | KeyParameterValue::Algorithm(Algorithm::EC) => Ok(KeyFormat::PKCS8),  in import_key() 1126         Algorithm::Algorithm, AttestationKey::AttestationKey, KeyParameter::KeyParameter, 1163                         value: KeyParameterValue::Algorithm(Algorithm::AES),  in test_rkpd_attestation_key_upgrade()
  | 
| /system/keymint/common/src/ | 
| D | crypto.rs | 30 use kmr_wire::keymint::{Algorithm, Digest, EcCurve}; 247             x if x == Algorithm::Aes as i32 => {  in from_cbor_value() 258             x if x == Algorithm::TripleDes as i32 => {  in from_cbor_value() 273             x if x == Algorithm::Hmac as i32 => {  in from_cbor_value() 281             x if x == Algorithm::Rsa as i32 => {  in from_cbor_value() 289             x if x == Algorithm::Ec as i32 => {  in from_cbor_value() 336                 cbor::value::Value::Integer((Algorithm::Aes as i32).into()),  in to_cbor_value() 342                 cbor::value::Value::Integer((Algorithm::TripleDes as i32).into()),  in to_cbor_value() 348                 cbor::value::Value::Integer((Algorithm::Hmac as i32).into()),  in to_cbor_value() 354                 cbor::value::Value::Integer((Algorithm::Rsa as i32).into()),  in to_cbor_value() [all …] 
 | 
| D | tag.rs | 25         Algorithm, BlockMode, Digest, EcCurve, ErrorCode, KeyCharacteristics, KeyFormat, KeyParam, 184 pub fn get_algorithm(params: &[KeyParam]) -> Result<Algorithm, Error> {  in get_algorithm()  argument 185     get_tag_value!(params, Algorithm, ErrorCode::UnsupportedAlgorithm)  in get_algorithm() 276         Algorithm::Rsa => check_rsa_gen_params(params, sec_level),  in extract_key_gen_characteristics() 277         Algorithm::Ec => check_ec_gen_params(params, sec_level),  in extract_key_gen_characteristics() 278         Algorithm::Aes => check_aes_gen_params(params, sec_level),  in extract_key_gen_characteristics() 279         Algorithm::TripleDes => check_3des_gen_params(params),  in extract_key_gen_characteristics() 280         Algorithm::Hmac => check_hmac_gen_params(params, sec_level),  in extract_key_gen_characteristics() 296         Algorithm::Rsa => {  in extract_key_import_characteristics() 299         Algorithm::Ec => check_ec_import_params(&*imp.ec, params, sec_level, key_format, key_data),  in extract_key_import_characteristics() [all …] 
 | 
| /system/security/keystore2/test_utils/ | 
| D | key_generations.rs | 24     Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve, 629         .algorithm(Algorithm::EC)  in generate_ec_p256_signing_key() 679         .algorithm(Algorithm::EC)  in generate_ec_key() 719         .algorithm(Algorithm::RSA)  in generate_rsa_key() 801     algorithm: Algorithm,  in generate_sym_key()  argument 853         .algorithm(Algorithm::HMAC)  in generate_hmac_key() 891     algorithm: Algorithm,  in generate_attestation_key()  argument 894     assert!(algorithm == Algorithm::RSA || algorithm == Algorithm::EC);  in generate_attestation_key() 896     if algorithm == Algorithm::RSA {  in generate_attestation_key() 930         .algorithm(Algorithm::EC)  in generate_ec_attestation_key() [all …] 
 | 
| /system/security/keystore2/src/legacy_blob/test_utils/ | 
| D | legacy_blob_test_vectors.rs | 18     Algorithm::Algorithm, Digest::Digest, EcCurve::EcCurve, 48         KeyParameter::new(KeyParameterValue::Algorithm(Algorithm::EC), SecurityLevel::KEYSTORE),  in structured_test_params() 86             KeyParameterValue::Algorithm(Algorithm::EC),  in structured_test_params_cache()
  | 
| /system/security/keystore2/src/sw_keyblob/ | 
| D | tests.rs | 18     Algorithm::Algorithm, BlockMode::BlockMode, Digest::Digest, EcCurve::EcCurve, 122                     KeyParameter { tag: Tag::ALGORITHM, value: KPV::Algorithm(Algorithm::AES) },  in test_key_new_from_serialized() 169                     KeyParameter { tag: Tag::ALGORITHM, value: KPV::Algorithm(Algorithm::EC) },  in test_key_new_from_serialized() 205                     KeyParameter { tag: Tag::ALGORITHM, value: KPV::Algorithm(Algorithm::HMAC) },  in test_key_new_from_serialized() 313                     KeyParameter { tag: Tag::ALGORITHM, value: KPV::Algorithm(Algorithm::RSA) },  in test_key_new_from_serialized()
  | 
| /system/authgraph/boringssl/src/ | 
| D | test_device.rs | 36     cose_sign_algorithm: RefCell<Option<iana::Algorithm>>, 57         cose_sign_algorithm: iana::Algorithm,  in set_identity()  argument 95             let (priv_key, mut pub_key) = crate::ec::create_p256_key_pair(iana::Algorithm::ES256)?;  in get_identity() 106             self.set_identity((EcSignKey::P256(priv_key), identity), iana::Algorithm::ES256);  in get_identity() 117     fn get_cose_sign_algorithm(&self) -> Result<iana::Algorithm, Error> {  in get_cose_sign_algorithm()  argument
  | 
| D | tests.rs | 219     source_device.set_identity((source_pvt_sign_key, source_identity), iana::Algorithm::EdDSA);  in test_key_exchange_with_non_empty_dice_chains() 230     sink_device.set_identity((sink_pvt_sign_key, sink_identity), iana::Algorithm::EdDSA);  in test_key_exchange_with_non_empty_dice_chains() 249     source_device.set_identity((source_pvt_sign_key, source_identity), iana::Algorithm::EdDSA);  in test_key_exchange_with_mixed_dice_chains() 260     sink_device.set_identity((sink_pvt_sign_key, sink_identity), iana::Algorithm::EdDSA);  in test_key_exchange_with_mixed_dice_chains() 278     let (priv_key, mut pub_key) = crate::ec::create_p256_key_pair(iana::Algorithm::ES256).unwrap();  in test_get_identity_with_root_key_in_incorrect_canonical_form() 296     test_device.set_identity((EcSignKey::P256(priv_key), identity), iana::Algorithm::ES256);  in test_get_identity_with_root_key_in_incorrect_canonical_form() 305     let (priv_key, mut pub_key) = crate::ec::create_p256_key_pair(iana::Algorithm::ES256).unwrap();  in test_get_identity_with_root_key_in_correct_canonical_form() 323     test_device.set_identity((EcSignKey::P256(priv_key), identity), iana::Algorithm::ES256);  in test_get_identity_with_root_key_in_correct_canonical_form()
  | 
| D | ec.rs | 42         let (priv_key, pub_key) = create_p256_key_pair(iana::Algorithm::ECDH_ES_HKDF_256)?;  in generate_key() 75             iana::EllipticCurve::P_256 => create_p256_key_pair(iana::Algorithm::ES256)  in generate_key() 77             iana::EllipticCurve::P_384 => create_p384_key_pair(iana::Algorithm::ES384)  in generate_key() 196 pub fn create_p256_key_pair(algorithm: iana::Algorithm) -> Result<(Vec<u8>, CoseKey), Error> {  in create_p256_key_pair() 204 pub fn create_p384_key_pair(algorithm: iana::Algorithm) -> Result<(Vec<u8>, CoseKey), Error> {  in create_p384_key_pair() 210     algorithm: iana::Algorithm,  in create_nist_key_pair()  argument 243         .algorithm(coset::iana::Algorithm::EdDSA) 290         iana::Algorithm::ECDH_ES_HKDF_256, // ECDH  in p256_ecdh_pkey_from_cose() 304         iana::Algorithm::ES256, // ECDSA  in p256_ecdsa_pkey_from_cose() 318         iana::Algorithm::ES384,  in p384_ecdsa_pkey_from_cose() [all …] 
 | 
| /system/security/keystore2/aidl/android/security/metrics/ | 
| D | KeyCreationWithPurposeAndModesInfo.aidl | 19 import android.security.metrics.Algorithm; 27     Algorithm algorithm;
  | 
| D | KeyCreationWithGeneralInfo.aidl | 19 import android.security.metrics.Algorithm; 29     Algorithm algorithm;
  | 
| /system/keymint/common/src/tag/ | 
| D | tests.rs | 47             KeyParam::Algorithm(Algorithm::Aes),  in test_legacy_serialization() 70         KeyParam::Algorithm(Algorithm::Hmac),  in test_check_begin_params_fail()
  | 
| /system/authgraph/core/src/ | 
| D | key.rs | 198     pub fn get_cose_sign_algorithm(&self) -> iana::Algorithm {  in get_cose_sign_algorithm()  argument 200             EcSignKey::Ed25519(_) => iana::Algorithm::EdDSA,  in get_cose_sign_algorithm() 201             EcSignKey::P256(_) => iana::Algorithm::ES256,  in get_cose_sign_algorithm() 202             EcSignKey::P384(_) => iana::Algorithm::ES384,  in get_cose_sign_algorithm() 262     pub fn get_cose_sign_algorithm(&self) -> iana::Algorithm {  in get_cose_sign_algorithm()  argument 264             EcVerifyKey::Ed25519(_) => iana::Algorithm::EdDSA,  in get_cose_sign_algorithm() 265             EcVerifyKey::P256(_) => iana::Algorithm::ES256,  in get_cose_sign_algorithm() 266             EcVerifyKey::P384(_) => iana::Algorithm::ES384,  in get_cose_sign_algorithm() 275             Some(coset::Algorithm::Assigned(iana::Algorithm::EdDSA)) => {  in from_cose_key() 278             Some(coset::Algorithm::Assigned(iana::Algorithm::ES256)) => {  in from_cose_key() [all …] 
 | 
| /system/security/keystore2/src/km_compat/ | 
| D | lib.rs | 33         Algorithm::Algorithm, BeginResult::BeginResult, BlockMode::BlockMode, Digest::Digest, 90                 value: KeyParameterValue::Algorithm(Algorithm::RSA),  in generate_rsa_key() 165             value: KeyParameterValue::Algorithm(Algorithm::AES),  in test_import_key() 219                 value: KeyParameterValue::Algorithm(Algorithm::AES),  in generate_aes_key() 419                 value: KeyParameterValue::Algorithm(Algorithm::RSA)  in test_get_key_characteristics()
  |