Home
last modified time | relevance | path

Searched refs:KeyPurpose (Results 1 – 25 of 81) sorted by relevance

1234

/system/security/keystore/tests/
Dauth_token_table_test.cpp104 (std::tie(rc, found) = table.FindAuthorization(make_set(1), KeyPurpose::SIGN, 0), rc)); in TEST()
110 (std::tie(rc, found) = table.FindAuthorization(make_set(2), KeyPurpose::SIGN, 0), rc)); in TEST()
116 (std::tie(rc, found) = table.FindAuthorization(make_set(3), KeyPurpose::SIGN, 0), rc)); in TEST()
122 (std::tie(rc, found) = table.FindAuthorization(make_set(4), KeyPurpose::SIGN, 0), rc)); in TEST()
128 (std::tie(rc, found) = table.FindAuthorization(make_set(5), KeyPurpose::SIGN, 0), rc)); in TEST()
145 (std::tie(rc, found) = table.FindAuthorization(make_set(1), KeyPurpose::SIGN, 0), rc)); in TEST()
148 (std::tie(rc, found) = table.FindAuthorization(make_set(2), KeyPurpose::SIGN, 0), rc)); in TEST()
151 (std::tie(rc, found) = table.FindAuthorization(make_set(3), KeyPurpose::SIGN, 0), rc)); in TEST()
171 (std::tie(rc, found) = table.FindAuthorization(make_set(1), KeyPurpose::SIGN, 0), rc)); in TEST()
174 (std::tie(rc, found) = table.FindAuthorization(make_set(2), KeyPurpose::SIGN, 0), rc)); in TEST()
[all …]
/system/security/keystore2/src/
Dkm_compat.rs28 KeyParameterValue::KeyParameterValue, KeyPurpose::KeyPurpose, SecurityLevel::SecurityLevel,
281 purpose: KeyPurpose, in begin() argument
382 p.tag == Tag::PURPOSE && p.value == KeyParameterValue::KeyPurpose(KeyPurpose::AGREE_KEY) in emulation_required()
432 value: KeyParameterValue::KeyPurpose(KeyPurpose::SIGN), in test_keymintv1_emulation_required()
436 value: KeyParameterValue::KeyPurpose(KeyPurpose::VERIFY), in test_keymintv1_emulation_required()
445 value: KeyParameterValue::KeyPurpose(KeyPurpose::AGREE_KEY), in test_keymintv1_emulation_required()
454 value: KeyParameterValue::KeyPurpose(KeyPurpose::AGREE_KEY), in test_keymintv1_emulation_required()
468 value: KeyParameterValue::KeyPurpose(KeyPurpose::AGREE_KEY), in test_keymintv1_emulation_required()
482 value: KeyParameterValue::KeyPurpose(KeyPurpose::AGREE_KEY), in test_keymintv1_emulation_required()
508 value: KeyParameterValue::KeyPurpose(KeyPurpose::SIGN), in test_keymaster_emulation_required()
[all …]
Dmetrics_store.rs28 KeyParameter::KeyParameter, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
271 KsKeyParamValue::KeyPurpose(k) => { in process_key_creation_event_stats()
310 key_purpose: KeyPurpose, in log_key_operation_event_stats() argument
335 key_purpose: KeyPurpose, in process_key_operation_event_stats() argument
359 KeyPurpose::ENCRYPT => MetricsPurpose::ENCRYPT, in process_key_operation_event_stats()
360 KeyPurpose::DECRYPT => MetricsPurpose::DECRYPT, in process_key_operation_event_stats()
361 KeyPurpose::SIGN => MetricsPurpose::SIGN, in process_key_operation_event_stats()
362 KeyPurpose::VERIFY => MetricsPurpose::VERIFY, in process_key_operation_event_stats()
363 KeyPurpose::WRAP_KEY => MetricsPurpose::WRAP_KEY, in process_key_operation_event_stats()
364 KeyPurpose::AGREE_KEY => MetricsPurpose::AGREE_KEY, in process_key_operation_event_stats()
[all …]
Denforcements.rs29 KeyParameter::KeyParameter as KmKeyParameter, KeyPurpose::KeyPurpose, Tag::Tag,
404 purpose: KeyPurpose, in authorize_create() argument
425 KeyPurpose::SIGN | KeyPurpose::DECRYPT => {} in authorize_create()
427 KeyPurpose::WRAP_KEY => { in authorize_create()
432 KeyPurpose::AGREE_KEY => { in authorize_create()
442 KeyPurpose::VERIFY | KeyPurpose::ENCRYPT => { in authorize_create()
493 KeyParameterValue::KeyPurpose(p) => { in authorize_create()
509 if (purpose == KeyPurpose::ENCRYPT || purpose == KeyPurpose::SIGN) in authorize_create()
516 if (purpose == KeyPurpose::DECRYPT || purpose == KeyPurpose::VERIFY) in authorize_create()
578 if (purpose == KeyPurpose::ENCRYPT || purpose == KeyPurpose::SIGN) in authorize_create()
/system/security/keystore2/src/legacy_blob/test_utils/
Dlegacy_blob_test_vectors.rs20 KeyPurpose::KeyPurpose, SecurityLevel::SecurityLevel,
38 KeyParameter::new(KeyParameterValue::KeyPurpose(KeyPurpose::SIGN), SecurityLevel::KEYSTORE), in structured_test_params()
40 KeyParameterValue::KeyPurpose(KeyPurpose::VERIFY), in structured_test_params()
70 KeyParameterValue::KeyPurpose(KeyPurpose::SIGN), in structured_test_params_cache()
74 KeyParameterValue::KeyPurpose(KeyPurpose::VERIFY), in structured_test_params_cache()
/system/security/keystore2/tests/
Dkeystore2_client_attest_key_tests.rs19 ErrorCode::ErrorCode, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
66 purpose: vec![KeyPurpose::SIGN, KeyPurpose::VERIFY], in keystore2_attest_rsa_signing_key_success()
114 purpose: vec![KeyPurpose::ENCRYPT, KeyPurpose::DECRYPT], in keystore2_attest_rsa_encrypt_key_success()
207 purpose: vec![KeyPurpose::SIGN, KeyPurpose::VERIFY], in keystore2_attest_rsa_signing_key_with_ec_25519_key_success()
244 .purpose(KeyPurpose::ATTEST_KEY) in keystore2_generate_rsa_attest_key_with_multi_purpose_fail()
245 .purpose(KeyPurpose::SIGN) in keystore2_generate_rsa_attest_key_with_multi_purpose_fail()
246 .purpose(KeyPurpose::VERIFY) in keystore2_generate_rsa_attest_key_with_multi_purpose_fail()
282 .purpose(KeyPurpose::ATTEST_KEY) in keystore2_ec_attest_key_with_multi_purpose_fail()
283 .purpose(KeyPurpose::SIGN) in keystore2_ec_attest_key_with_multi_purpose_fail()
284 .purpose(KeyPurpose::VERIFY) in keystore2_ec_attest_key_with_multi_purpose_fail()
[all …]
Dkeystore2_client_import_keys_tests.rs23 KeyPurpose::KeyPurpose, PaddingMode::PaddingMode, SecurityLevel::SecurityLevel,
145 .purpose(KeyPurpose::SIGN) in keystore2_rsa_import_key_success()
146 .purpose(KeyPurpose::VERIFY) in keystore2_rsa_import_key_success()
178 .purpose(KeyPurpose::SIGN) in keystore2_rsa_import_key_determine_key_size_and_pub_exponent()
179 .purpose(KeyPurpose::VERIFY) in keystore2_rsa_import_key_determine_key_size_and_pub_exponent()
206 .purpose(KeyPurpose::SIGN) in keystore2_rsa_import_key_fails_with_keysize_param_mismatch_error()
207 .purpose(KeyPurpose::VERIFY) in keystore2_rsa_import_key_fails_with_keysize_param_mismatch_error()
239 .purpose(KeyPurpose::SIGN) in keystore2_rsa_import_key_fails_with_public_exponent_param_mismatch_error()
240 .purpose(KeyPurpose::VERIFY) in keystore2_rsa_import_key_fails_with_public_exponent_param_mismatch_error()
273 .purpose(KeyPurpose::SIGN) in keystore2_rsa_import_key_with_multipurpose_fails_incompt_purpose_error()
[all …]
Dkeystore2_client_rsa_key_tests.rs16 Digest::Digest, ErrorCode::ErrorCode, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
85 op_purpose: KeyPurpose, in create_rsa_key_and_operation() argument
126 purpose: vec![KeyPurpose::SIGN, KeyPurpose::VERIFY], in perform_rsa_sign_key_op_success()
133 KeyPurpose::SIGN, in perform_rsa_sign_key_op_success()
162 purpose: vec![KeyPurpose::SIGN, KeyPurpose::VERIFY], in perform_rsa_sign_key_op_failure()
169 KeyPurpose::SIGN, in perform_rsa_sign_key_op_failure()
200 purpose: vec![KeyPurpose::ENCRYPT, KeyPurpose::DECRYPT], in create_rsa_encrypt_decrypt_key_op_success()
207 KeyPurpose::DECRYPT, in create_rsa_encrypt_decrypt_key_op_success()
1547 purpose: vec![KeyPurpose::SIGN, KeyPurpose::VERIFY], in keystore2_rsa_generate_signing_key_padding_pss_fail()
1554 KeyPurpose::SIGN, in keystore2_rsa_generate_signing_key_padding_pss_fail()
[all …]
Dkeystore2_client_3des_key_tests.rs16 Algorithm::Algorithm, BlockMode::BlockMode, ErrorCode::ErrorCode, KeyPurpose::KeyPurpose,
132 .purpose(KeyPurpose::ENCRYPT) in keystore2_3des_key_fails_missing_padding()
133 .purpose(KeyPurpose::DECRYPT) in keystore2_3des_key_fails_missing_padding()
153 .purpose(KeyPurpose::ENCRYPT) in keystore2_3des_key_fails_missing_padding()
185 .purpose(KeyPurpose::ENCRYPT) in keystore2_3des_key_encrypt_fails_invalid_input_length()
Dkeystore2_client_hmac_key_tests.rs16 Algorithm::Algorithm, Digest::Digest, ErrorCode::ErrorCode, KeyPurpose::KeyPurpose,
44 .purpose(KeyPurpose::SIGN) in create_hmac_key_and_operation()
169 .purpose(KeyPurpose::SIGN) in keystore2_hmac_gen_key_multi_digests_fails_expect_unsupported_digest()
170 .purpose(KeyPurpose::VERIFY) in keystore2_hmac_gen_key_multi_digests_fails_expect_unsupported_digest()
203 .purpose(KeyPurpose::SIGN) in keystore2_hmac_gen_key_no_digests_fails_expect_unsupported_digest()
204 .purpose(KeyPurpose::VERIFY) in keystore2_hmac_gen_key_no_digests_fails_expect_unsupported_digest()
Dkeystore2_client_key_id_domain_tests.rs18 Digest::Digest, EcCurve::EcCurve, KeyPurpose::KeyPurpose, SecurityLevel::SecurityLevel,
92 .purpose(KeyPurpose::SIGN) 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()
159 .purpose(KeyPurpose::SIGN) 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()
244 .purpose(KeyPurpose::SIGN) in keystore2_key_id_alias_rebind_verify_by_key_id()
Dkeystore2_client_operation_tests.rs21 Digest::Digest, ErrorCode::ErrorCode, KeyPurpose::KeyPurpose, SecurityLevel::SecurityLevel,
147 KeyPurpose::SIGN, in keystore2_forced_op_after_backendbusy_test()
318 .purpose(KeyPurpose::SIGN) in keystore2_ops_prune_test()
344 .purpose(KeyPurpose::SIGN) in keystore2_ops_prune_test()
385 KeyPurpose::SIGN, in keystore2_forced_op_perm_denied_test()
414 KeyPurpose::SIGN, in keystore2_forced_op_success_test()
432 KeyPurpose::SIGN, in keystore2_op_fails_operation_busy()
Dkeystore2_client_ec_key_tests.rs20 KeyPurpose::KeyPurpose, SecurityLevel::SecurityLevel,
72 &authorizations::AuthSetBuilder::new().purpose(KeyPurpose::SIGN).digest(digest), in create_ec_key_and_operation()
255 .purpose(KeyPurpose::SIGN) in keystore2_generate_ec_key_missing_curve()
256 .purpose(KeyPurpose::VERIFY) in keystore2_generate_ec_key_missing_curve()
292 .purpose(KeyPurpose::SIGN) in keystore2_generate_ec_key_25519_multi_purpose()
293 .purpose(KeyPurpose::AGREE_KEY) 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()
Dkeystore2_client_test_utils.rs31 KeyParameterValue::KeyParameterValue, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
120 op_purpose: KeyPurpose, in create_signing_operation() argument
159 .purpose(KeyPurpose::SIGN) in perform_sample_hmac_sign_verify_op()
177 .purpose(KeyPurpose::VERIFY) in perform_sample_hmac_sign_verify_op()
220 let mut authorizations = authorizations::AuthSetBuilder::new().purpose(KeyPurpose::SIGN); in perform_sample_asym_sign_verify_op()
262 KeyPurpose::SIGN, in execute_op_run_as_child()
318 .purpose(KeyPurpose::ENCRYPT) in perform_sample_sym_key_encrypt_op()
349 .purpose(KeyPurpose::DECRYPT) in perform_sample_sym_key_decrypt_op()
389 .purpose(KeyPurpose::ENCRYPT) in encrypt_secure_key()
Dkeystore2_client_aes_key_tests.rs16 Algorithm::Algorithm, BlockMode::BlockMode, ErrorCode::ErrorCode, KeyPurpose::KeyPurpose,
225 .purpose(KeyPurpose::ENCRYPT) in keystore2_aes_key_op_fails_multi_block_modes()
226 .purpose(KeyPurpose::DECRYPT) in keystore2_aes_key_op_fails_multi_block_modes()
248 .purpose(KeyPurpose::ENCRYPT) in keystore2_aes_key_op_fails_multi_block_modes()
273 .purpose(KeyPurpose::ENCRYPT) in keystore2_aes_key_op_fails_multi_padding_modes()
274 .purpose(KeyPurpose::DECRYPT) in keystore2_aes_key_op_fails_multi_padding_modes()
296 .purpose(KeyPurpose::ENCRYPT) in keystore2_aes_key_op_fails_multi_padding_modes()
/system/keymint/common/src/
Dtag.rs12 KeyPurpose, PaddingMode, SecurityLevel, Tag, DEFAULT_CERT_SERIAL, DEFAULT_CERT_SUBJECT,
453 KeyPurpose::Sign | KeyPurpose::Decrypt | KeyPurpose::WrapKey => { in check_rsa_params()
456 KeyPurpose::AttestKey => seen_attest = true, in check_rsa_params()
457 KeyPurpose::Verify | KeyPurpose::Encrypt => {} // public key operations in check_rsa_params()
458 KeyPurpose::AgreeKey => { in check_rsa_params()
480 (EcCurve::Curve25519, Some(KeyPurpose::Sign)) => KeyGenInfo::Ed25519, in check_ec_gen_params()
481 (EcCurve::Curve25519, Some(KeyPurpose::AttestKey)) => KeyGenInfo::Ed25519, in check_ec_gen_params()
482 (EcCurve::Curve25519, Some(KeyPurpose::AgreeKey)) => KeyGenInfo::X25519, in check_ec_gen_params()
499 pub fn primary_purpose(params: &[KeyParam]) -> Result<KeyPurpose, Error> { in primary_purpose() argument
525 if primary_purpose(params)? == KeyPurpose::AgreeKey { in check_ec_import_params()
[all …]
/system/security/keystore2/test_utils/
Dkey_generations.rs23 KeyPurpose::KeyPurpose, PaddingMode::PaddingMode, Tag::Tag,
50 pub purpose: Vec<KeyPurpose>,
344 .purpose(KeyPurpose::SIGN) in generate_ec_p256_signing_key()
345 .purpose(KeyPurpose::VERIFY) in generate_ec_p256_signing_key()
388 .purpose(KeyPurpose::SIGN) in generate_ec_key()
389 .purpose(KeyPurpose::VERIFY) in generate_ec_key()
489 .purpose(KeyPurpose::ENCRYPT) in generate_sym_key()
490 .purpose(KeyPurpose::DECRYPT) in generate_sym_key()
531 .purpose(KeyPurpose::SIGN) in generate_hmac_key()
532 .purpose(KeyPurpose::VERIFY) in generate_hmac_key()
[all …]
Dauthorizations.rs21 KeyParameter::KeyParameter, KeyParameterValue::KeyParameterValue, KeyPurpose::KeyPurpose,
42 pub fn purpose(mut self, p: KeyPurpose) -> Self { in purpose()
43 self.0.push(KeyParameter { tag: Tag::PURPOSE, value: KeyParameterValue::KeyPurpose(p) }); in purpose()
/system/security/keystore2/src/km_compat/
Dlib.rs35 KeyParameterValue::KeyParameterValue, KeyPurpose::KeyPurpose, PaddingMode::PaddingMode,
104 value: KeyParameterValue::KeyPurpose(KeyPurpose::SIGN), in generate_rsa_key()
118 value: KeyParameterValue::KeyPurpose(KeyPurpose::ENCRYPT), in generate_rsa_key()
232 value: KeyParameterValue::KeyPurpose(KeyPurpose::ENCRYPT), in generate_aes_key()
236 value: KeyParameterValue::KeyPurpose(KeyPurpose::DECRYPT), in generate_aes_key()
247 purpose: KeyPurpose, in begin() argument
272 let begin_result = begin(legacy.as_ref(), &blob, KeyPurpose::ENCRYPT, None); in test_begin_abort()
285 let begin_result = begin(legacy.as_ref(), &blob, KeyPurpose::ENCRYPT, None); in test_begin_update_finish()
308 begin(legacy.as_ref(), &blob, KeyPurpose::DECRYPT, Some(begin_result.params)); in test_begin_update_finish()
400 value: KeyParameterValue::KeyPurpose(KeyPurpose::SIGN) in test_get_key_characteristics()
Dslot_test.cpp33 using ::aidl::android::hardware::security::keymint::KeyPurpose;
46 KMV1::makeKeyParameter(KMV1::TAG_PURPOSE, KeyPurpose::ENCRYPT), in generateAESKey()
47 KMV1::makeKeyParameter(KMV1::TAG_PURPOSE, KeyPurpose::DECRYPT), in generateAESKey()
65 KMV1::makeKeyParameter(KMV1::TAG_PURPOSE, KeyPurpose::SIGN), in generateECSingingKey()
66 KMV1::makeKeyParameter(KMV1::TAG_PURPOSE, KeyPurpose::VERIFY), in generateECSingingKey()
85 auto status = device->begin(KeyPurpose::ENCRYPT, blob, kps, HardwareAuthToken(), &beginResult); in begin()
101 KMV1::makeKeyParameter(KMV1::TAG_PURPOSE, KeyPurpose::AGREE_KEY), in generateAndBeginECDHKeyOperation()
113 auto bstatus = device->begin(KeyPurpose::AGREE_KEY, creationResult.keyBlob, kps, in generateAndBeginECDHKeyOperation()
218 KMV1::makeKeyParameter(KMV1::TAG_PURPOSE, KeyPurpose::SIGN), in TEST()
/system/keymint/common/src/tag/
Dtests.rs59 KeyParam::Purpose(KeyPurpose::Sign), in test_check_begin_params_fail()
60 KeyParam::Purpose(KeyPurpose::Verify), in test_check_begin_params_fail()
66 KeyPurpose::Encrypt, in test_check_begin_params_fail()
70 (KeyPurpose::Sign, vec![KeyParam::Digest(Digest::Sha256)], "MissingMacLength"), in test_check_begin_params_fail()
72 KeyPurpose::Sign, in test_check_begin_params_fail()
/system/hardware/interfaces/wifi/keystore/1.0/vts/functional/
DVtsHalWifiKeystoreV1_0TargetTest.cpp47 enum KeyPurpose { enum
147 bool generateKey(std::string keyName, KeyPurpose purpose, bool useWifiNamespace) { in generateKey()
152 if (purpose == KeyPurpose::SIGNING) { in generateKey()
156 if (purpose == KeyPurpose::ENCRYPTION) { in generateKey()
240 bool result = generateKey(kTestKeyName, KeyPurpose::SIGNING, true); in TEST_P()
265 bool result = generateKey(kTestKeyName, KeyPurpose::ENCRYPTION, true); in TEST_P()
289 bool result = generateKey(kTestKeyName, KeyPurpose::SIGNING, true); in TEST_P()
362 bool result = generateKey(kTestKeyName, KeyPurpose::SIGNING, false); in TEST_P()
390 bool result = generateKey(kTestKeyName, KeyPurpose::SIGNING, true); in TEST_P()
464 bool result = generateKey(kTestKeyName, KeyPurpose::SIGNING, false); in TEST_P()
[all …]
/system/keymaster/fuzzer/
DREADME.md24 | `keyPurpose` | 1. `KeyPurpose::ENCRYPT` 2.`KeyPurpose::DECRYPT` 3.`KeyPurpose::SIGN` 4. `KeyPurpo…
Dk4_AndroidKeymaster4Device_fuzzer.cpp30 using ::android::hardware::keymaster::V4_0::KeyPurpose;
59 constexpr KeyPurpose kKeyPurpose[] = {
60 KeyPurpose::ENCRYPT, KeyPurpose::DECRYPT, KeyPurpose::SIGN,
61 KeyPurpose::VERIFY, KeyPurpose::WRAP_KEY,
229 KeyPurpose keyPurpose = mFdp->PickValueInArray(kKeyPurpose); in process()
/system/security/keystore/
Dkeystore_utils.cpp110 params->push_back(TAG_PURPOSE, KeyPurpose::SIGN); in add_legacy_key_authorizations()
111 params->push_back(TAG_PURPOSE, KeyPurpose::VERIFY); in add_legacy_key_authorizations()
112 params->push_back(TAG_PURPOSE, KeyPurpose::ENCRYPT); in add_legacy_key_authorizations()
113 params->push_back(TAG_PURPOSE, KeyPurpose::DECRYPT); in add_legacy_key_authorizations()

1234