Home
last modified time | relevance | path

Searched refs:KeyParameterValue (Results 1 – 18 of 18) sorted by relevance

/system/keymaster/ng/
DKeyMintUtils.cpp31 return KeyParameter{Tag::PURPOSE, KeyParameterValue::make<KeyParameterValue::keyPurpose>( in kmEnumParam2Aidl()
34 return KeyParameter{Tag::ALGORITHM, KeyParameterValue::make<KeyParameterValue::algorithm>( in kmEnumParam2Aidl()
37 return KeyParameter{Tag::BLOCK_MODE, KeyParameterValue::make<KeyParameterValue::blockMode>( in kmEnumParam2Aidl()
40 return KeyParameter{Tag::DIGEST, KeyParameterValue::make<KeyParameterValue::digest>( in kmEnumParam2Aidl()
43 return KeyParameter{Tag::PADDING, KeyParameterValue::make<KeyParameterValue::paddingMode>( in kmEnumParam2Aidl()
46 return KeyParameter{Tag::EC_CURVE, KeyParameterValue::make<KeyParameterValue::ecCurve>( in kmEnumParam2Aidl()
50 KeyParameterValue::make<KeyParameterValue::hardwareAuthenticatorType>( in kmEnumParam2Aidl()
53 return KeyParameter{Tag::ORIGIN, KeyParameterValue::make<KeyParameterValue::origin>( in kmEnumParam2Aidl()
64 template <KeyParameterValue::Tag aidl_tag>
65 keymaster_key_param_t aidlEnumVal2Km(keymaster_tag_t km_tag, const KeyParameterValue& value) { in aidlEnumVal2Km()
[all …]
/system/security/ondevice-signing/
DKeystoreHmacKey.cpp37 using android::hardware::security::keymint::KeyParameterValue;
73 algo.value = KeyParameterValue::make<KeyParameterValue::algorithm>(Algorithm::HMAC); in createKey()
78 key_size.value = KeyParameterValue::make<KeyParameterValue::integer>(kHmacKeySize); in createKey()
83 min_mac_length.value = KeyParameterValue::make<KeyParameterValue::integer>(256); in createKey()
88 digest.value = KeyParameterValue::make<KeyParameterValue::digest>(Digest::SHA_2_256); in createKey()
93 purposeSign.value = KeyParameterValue::make<KeyParameterValue::keyPurpose>(KeyPurpose::SIGN); in createKey()
99 KeyParameterValue::make<KeyParameterValue::keyPurpose>(KeyPurpose::VERIFY); in createKey()
104 auth.value = KeyParameterValue::make<KeyParameterValue::boolValue>(true); in createKey()
109 boot_level.value = KeyParameterValue::make<KeyParameterValue::integer>(kOdsignBootLevel); in createKey()
136 if (auth.keyParameter.value.get<KeyParameterValue::integer>() == kOdsignBootLevel) { in initialize()
[all …]
DKeystoreKey.cpp39 using android::hardware::security::keymint::KeyParameterValue;
80 algo.value = KeyParameterValue::make<KeyParameterValue::algorithm>(Algorithm::RSA); in createKey()
85 key_size.value = KeyParameterValue::make<KeyParameterValue::integer>(kRsaKeySize); in createKey()
90 digest.value = KeyParameterValue::make<KeyParameterValue::digest>(Digest::SHA_2_256); in createKey()
96 KeyParameterValue::make<KeyParameterValue::paddingMode>(PaddingMode::RSA_PKCS1_1_5_SIGN); in createKey()
101 exponent.value = KeyParameterValue::make<KeyParameterValue::longInteger>(kRsaKeyExponent); in createKey()
106 purpose.value = KeyParameterValue::make<KeyParameterValue::keyPurpose>(KeyPurpose::SIGN); in createKey()
111 auth.value = KeyParameterValue::make<KeyParameterValue::boolValue>(true); in createKey()
116 boot_level.value = KeyParameterValue::make<KeyParameterValue::integer>(kOdsignBootLevel); in createKey()
207 if (auth.keyParameter.value.get<KeyParameterValue::integer>() == kOdsignBootLevel) { in verifyExistingKey()
[all …]
/system/security/keystore2/src/km_compat/
Dlib.rs35 KeyParameterValue::KeyParameterValue, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
89 value: KeyParameterValue::Algorithm(Algorithm::RSA), in generate_rsa_key()
91 KeyParameter { tag: Tag::KEY_SIZE, value: KeyParameterValue::Integer(2048) }, in generate_rsa_key()
94 value: KeyParameterValue::LongInteger(65537), in generate_rsa_key()
96 KeyParameter { tag: Tag::DIGEST, value: KeyParameterValue::Digest(Digest::SHA_2_256) }, in generate_rsa_key()
99 value: KeyParameterValue::PaddingMode(PaddingMode::RSA_PSS), in generate_rsa_key()
101 KeyParameter { tag: Tag::NO_AUTH_REQUIRED, value: KeyParameterValue::BoolValue(true) }, in generate_rsa_key()
104 value: KeyParameterValue::KeyPurpose(KeyPurpose::SIGN), in generate_rsa_key()
108 value: KeyParameterValue::DateTime(0), in generate_rsa_key()
112 value: KeyParameterValue::DateTime(UNDEFINED_NOT_AFTER), in generate_rsa_key()
[all …]
Dkm_compat.cpp42 using ::aidl::android::hardware::security::keymint::KeyParameterValue;
451 keyParam.value.get<KeyParameterValue::Tag::keyPurpose>() == KeyPurpose::AGREE_KEY) { in generateKey()
/system/security/keystore2/src/
Dboot_level_keys.rs19 key_parameter::KeyParameterValue,
24 KeyParameterValue::KeyParameterValue as KmKeyParameterValue, KeyPurpose::KeyPurpose,
57 KeyParameterValue::Algorithm(Algorithm::HMAC).into(), in get_level_zero_key()
58 KeyParameterValue::Digest(Digest::SHA_2_256).into(), in get_level_zero_key()
59 KeyParameterValue::KeySize(256).into(), in get_level_zero_key()
60 KeyParameterValue::MinMacLength(256).into(), in get_level_zero_key()
61 KeyParameterValue::KeyPurpose(KeyPurpose::SIGN).into(), in get_level_zero_key()
62 KeyParameterValue::NoAuthRequired.into(), in get_level_zero_key()
68 params.push(KeyParameterValue::EarlyBootOnly.into()); in get_level_zero_key()
70 params.push(KeyParameterValue::MaxUsesPerBoot(1).into()) in get_level_zero_key()
[all …]
Denforcements.rs19 use crate::key_parameter::{KeyParameter, KeyParameterValue};
441 && *kp.key_parameter_value() != KeyParameterValue::Algorithm(Algorithm::EC) in authorize_create()
454 KeyParameterValue::Algorithm(Algorithm::RSA) in authorize_create()
455 | KeyParameterValue::Algorithm(Algorithm::EC) => { in authorize_create()
491 KeyParameterValue::NoAuthRequired => { in authorize_create()
494 KeyParameterValue::AuthTimeout(t) => { in authorize_create()
497 KeyParameterValue::HardwareAuthenticatorType(a) => { in authorize_create()
500 KeyParameterValue::KeyPurpose(p) => { in authorize_create()
506 KeyParameterValue::CallerNonce => { in authorize_create()
509 KeyParameterValue::ActiveDateTime(a) => { in authorize_create()
[all …]
Dkey_parameter.rs103 KeyParameterValue::KeyParameterValue as KmKeyParameterValue, KeyPurpose::KeyPurpose,
781 pub enum KeyParameterValue {
977 impl From<&KmKeyParameter> for KeyParameterValue { implementation
986 value: KeyParameterValue,
992 pub fn new(value: KeyParameterValue, security_level: SecurityLevel) -> Self { in new() argument
1008 value: KeyParameterValue::new_from_sql(tag_val, data)?, in new_from_sql()
1019 pub fn key_parameter_value(&self) -> &KeyParameterValue { in key_parameter_value() argument
1107 check_field_matches_tag_type(&KeyParameterValue::make_field_matches_tag_type_test_vector()); in key_parameter_value_field_matches_tag_type()
1119 KeyParameterValue::Algorithm(Algorithm::RSA), in test_key_parameter()
1127 KeyParameterValue::Algorithm(Algorithm::RSA) in test_key_parameter()
[all …]
Dsecurity_level.rs25 use crate::key_parameter::KeyParameterValue as KsKeyParamValue;
49 KeyParameterValue::KeyParameterValue, SecurityLevel::SecurityLevel, Tag::Tag,
282 KeyParameterValue::KeyPurpose(p) => Ok(p), in create_operation()
413 value: KeyParameterValue::Blob(aaid), in add_certificate_parameters()
427 value: KeyParameterValue::BoolValue(true), in add_certificate_parameters()
444 Some(KeyParameter { tag: _, value: KeyParameterValue::Algorithm(Algorithm::RSA) }) in add_certificate_parameters()
445 | Some(KeyParameter { tag: _, value: KeyParameterValue::Algorithm(Algorithm::EC) }) => { in add_certificate_parameters()
449 value: KeyParameterValue::DateTime(0), in add_certificate_parameters()
455 value: KeyParameterValue::DateTime(UNDEFINED_NOT_AFTER), in add_certificate_parameters()
618 KeyParameterValue::Algorithm(Algorithm::AES) in import_key()
[all …]
Dsuper_key.rs27 key_parameter::{KeyParameter, KeyParameterValue},
205 KeyParameterValue::Algorithm(Algorithm::AES), in decrypt()
206 KeyParameterValue::KeySize(256), in decrypt()
207 KeyParameterValue::BlockMode(BlockMode::GCM), in decrypt()
208 KeyParameterValue::PaddingMode(PaddingMode::NONE), in decrypt()
209 KeyParameterValue::Nonce(self.nonce.clone()), in decrypt()
210 KeyParameterValue::MacLength(128), in decrypt()
942 KeyParameterValue::Algorithm(Algorithm::AES), in lock_screen_lock_bound_key()
943 KeyParameterValue::KeySize(256), in lock_screen_lock_bound_key()
944 KeyParameterValue::BlockMode(BlockMode::GCM), in lock_screen_lock_bound_key()
[all …]
Ddatabase.rs3218 KeyParameterValue, KeyPurpose, PaddingMode, SecurityLevel,
5017 KeyParameter::new(KeyParameterValue::Invalid, SecurityLevel::TRUSTED_ENVIRONMENT), in make_test_params()
5019 KeyParameterValue::KeyPurpose(KeyPurpose::SIGN), in make_test_params()
5023 KeyParameterValue::KeyPurpose(KeyPurpose::DECRYPT), in make_test_params()
5027 KeyParameterValue::Algorithm(Algorithm::RSA), in make_test_params()
5030 KeyParameter::new(KeyParameterValue::KeySize(1024), SecurityLevel::TRUSTED_ENVIRONMENT), in make_test_params()
5032 KeyParameterValue::BlockMode(BlockMode::ECB), in make_test_params()
5036 KeyParameterValue::BlockMode(BlockMode::GCM), in make_test_params()
5039 KeyParameter::new(KeyParameterValue::Digest(Digest::NONE), SecurityLevel::STRONGBOX), in make_test_params()
5041 KeyParameterValue::Digest(Digest::MD5), in make_test_params()
[all …]
Dremote_provisioning.rs27 KeyParameter::KeyParameter, KeyParameterValue::KeyParameterValue,
156 value: KeyParameterValue::Algorithm(Algorithm::RSA) in is_asymmetric_key()
159 value: KeyParameterValue::Algorithm(Algorithm::EC) in is_asymmetric_key()
Dlegacy_blob.rs19 key_parameter::{KeyParameter, KeyParameterValue},
468 pub fn read_key_parameters(stream: &mut &[u8]) -> Result<Vec<KeyParameterValue>> { in read_key_parameters() argument
493 let mut params: Vec<KeyParameterValue> = Vec::new(); in read_key_parameters()
498 KeyParameterValue::new_from_tag_primitive_pair( in read_key_parameters()
505 KeyParameterValue::new_from_tag_primitive_pair( in read_key_parameters()
513 KeyParameterValue::new_from_tag_primitive_pair(tag, 1) in read_key_parameters()
526 KeyParameterValue::new_from_tag_primitive_pair( in read_key_parameters()
Dlegacy_migrator.rs17 use crate::key_parameter::KeyParameterValue;
647 KeyParameterValue::RollbackResistance == *kp.key_parameter_value() in bulk_delete()
Dmetrics_store.rs22 use crate::key_parameter::KeyParameterValue as KsKeyParamValue;
/system/hardware/interfaces/wifi/keystore/1.0/default/
Dkeystore.cpp235 algorithm = element.keyParameter.value.get<KMV1::KeyParameterValue::algorithm>(); in keyStore2Sign()
249 .value = KMV1::KeyParameterValue::make<KMV1::KeyParameterValue::keyPurpose>( in keyStore2Sign()
253 .value = KMV1::KeyParameterValue::make<KMV1::KeyParameterValue::algorithm>(*algorithm)}; in keyStore2Sign()
256 .value = KMV1::KeyParameterValue::make<KMV1::KeyParameterValue::paddingMode>( in keyStore2Sign()
261 KMV1::KeyParameterValue::make<KMV1::KeyParameterValue::digest>(KMV1::Digest::NONE)}; in keyStore2Sign()
/system/security/keystore-engine/
Dkeystore2_engine.cpp202 .value = KMV1::KeyParameterValue::make<KMV1::KeyParameterValue::keyPurpose>( in keystore2_sign()
206 .value = KMV1::KeyParameterValue::make<KMV1::KeyParameterValue::algorithm>(algorithm)}; in keystore2_sign()
209 .value = KMV1::KeyParameterValue::make<KMV1::KeyParameterValue::paddingMode>( in keystore2_sign()
213 .value = KMV1::KeyParameterValue::make<KMV1::KeyParameterValue::digest>( in keystore2_sign()
/system/security/keystore/
Dkeystore_cli_v2.cpp152 keymint::KeyParameterValue::make<keymint::KeyParameterValue::algorithm>( in verifyEncryptionKeyAttributes()
161 keymint::KeyParameterValue::make<keymint::KeyParameterValue::integer>( in verifyEncryptionKeyAttributes()
170 keymint::KeyParameterValue::make<keymint::KeyParameterValue::blockMode>( in verifyEncryptionKeyAttributes()
179 keymint::KeyParameterValue::make<keymint::KeyParameterValue::paddingMode>( in verifyEncryptionKeyAttributes()
193 keymint::KeyParameterValue::make<keymint::KeyParameterValue::algorithm>( in verifyAuthenticationKeyAttributes()
202 keymint::KeyParameterValue::make<keymint::KeyParameterValue::integer>( in verifyAuthenticationKeyAttributes()
211 keymint::KeyParameterValue::make<keymint::KeyParameterValue::integer>( in verifyAuthenticationKeyAttributes()
220 keymint::KeyParameterValue::make<keymint::KeyParameterValue::digest>( in verifyAuthenticationKeyAttributes()