Home
last modified time | relevance | path

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

12

/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/keystore/
Dkeymaster_enforcement.cpp43 static ErrorCode authorized_purpose(const KeyPurpose purpose, const AuthorizationSet& auth_set) { in authorized_purpose()
45 case KeyPurpose::VERIFY: in authorized_purpose()
46 case KeyPurpose::ENCRYPT: in authorized_purpose()
47 case KeyPurpose::SIGN: in authorized_purpose()
48 case KeyPurpose::DECRYPT: in authorized_purpose()
57 inline bool is_origination_purpose(KeyPurpose purpose) { in is_origination_purpose()
58 return purpose == KeyPurpose::ENCRYPT || purpose == KeyPurpose::SIGN; in is_origination_purpose()
61 inline bool is_usage_purpose(KeyPurpose purpose) { in is_usage_purpose()
62 return purpose == KeyPurpose::DECRYPT || purpose == KeyPurpose::VERIFY; in is_usage_purpose()
72 ErrorCode KeymasterEnforcement::AuthorizeOperation(const KeyPurpose purpose, const km_id_t keyid, in AuthorizeOperation()
[all …]
Doperation_proto_handler.cpp34 void determinePurpose(KeyPurpose purpose, OperationConfig* operationConfig) { in determinePurpose()
36 case KeyPurpose::VERIFY: in determinePurpose()
39 case KeyPurpose::ENCRYPT: in determinePurpose()
42 case KeyPurpose::SIGN: in determinePurpose()
45 case KeyPurpose::DECRYPT: in determinePurpose()
48 case KeyPurpose::WRAP_KEY: in determinePurpose()
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()
Doperation_struct.h39 Operation(uint64_t handle_, uint64_t keyid_, KeyPurpose purpose_, const sp<Keymaster>& device_, in Operation()
52 KeyPurpose purpose;
Dauth_token_table.cpp97 inline bool is_secret_key_operation(Algorithm algorithm, KeyPurpose purpose) { in is_secret_key_operation()
99 if (purpose == KeyPurpose::SIGN || purpose == KeyPurpose::DECRYPT) return true; in is_secret_key_operation()
103 inline bool KeyRequiresAuthentication(const AuthorizationSet& key_info, KeyPurpose purpose) { in KeyRequiresAuthentication()
109 inline bool KeyRequiresAuthPerOperation(const AuthorizationSet& key_info, KeyPurpose purpose) { in KeyRequiresAuthPerOperation()
115 AuthTokenTable::FindAuthorization(const AuthorizationSet& key_info, KeyPurpose purpose, in FindAuthorization()
Dkeymaster_enforcement.h98 ErrorCode AuthorizeOperation(const KeyPurpose purpose, const km_id_t keyid,
109 ErrorCode AuthorizeBegin(const KeyPurpose purpose, const km_id_t keyid,
Dlegacy_keymaster_device_wrapper.h36 using ::android::hardware::keymaster::V3_0::KeyPurpose;
72 Return<void> begin(KeyPurpose purpose, const hidl_vec<uint8_t>& key,
Doperation.h55 sp<IBinder> addOperation(uint64_t handle, uint64_t keyid, KeyPurpose purpose,
Dkeystore_client_impl.cpp88 if (!oneShotOperation(KeyPurpose::ENCRYPT, encryption_key_name, encrypt_params, data, in encryptWithAuthentication()
105 if (!oneShotOperation(KeyPurpose::SIGN, authentication_key_name, authenticate_params, in encryptWithAuthentication()
135 if (!oneShotOperation(KeyPurpose::VERIFY, authentication_key_name, authenticate_params, in decryptWithAuthentication()
147 if (!oneShotOperation(KeyPurpose::DECRYPT, encryption_key_name, encrypt_params, in decryptWithAuthentication()
156 bool KeystoreClientImpl::oneShotOperation(KeyPurpose purpose, const std::string& key_name, in oneShotOperation()
319 KeystoreClientImpl::beginOperation(KeyPurpose purpose, const std::string& key_name, in beginOperation()
Dkeymaster_worker.h190 getAuthToken(const KeyCharacteristics& characteristics, uint64_t handle, KeyPurpose purpose,
209 bool pruneable, KeyPurpose purpose, AuthorizationSet opParams,
283 void begin(KeyPurpose purpose, hidl_vec<uint8_t> key, hidl_vec<KeyParameter> inParams,
Dauth_token_table.h75 KeyPurpose purpose, uint64_t op_handle);
Doperation.cpp29 sp<IBinder> OperationMap::addOperation(uint64_t handle, uint64_t keyid, KeyPurpose purpose, in addOperation()
/system/hardware/interfaces/wifi/keystore/1.0/vts/functional/
DVtsHalWifiKeystoreV1_0TargetTest.cpp52 enum KeyPurpose { enum
137 bool generateKey(std::string keyName, KeyPurpose purpose, uid_t uid) { in generateKey()
143 if (purpose == KeyPurpose::SIGNING) { in generateKey()
147 if (purpose == KeyPurpose::ENCRYPTION) { in generateKey()
268 bool result = generateKey(kTestKeyName, KeyPurpose::SIGNING, AID_WIFI); in TEST_P()
293 bool result = generateKey(kTestKeyName, KeyPurpose::ENCRYPTION, AID_WIFI); in TEST_P()
342 bool result = generateKey(kTestKeyName, KeyPurpose::SIGNING, AID_WIFI); in TEST_P()
510 bool result = generateKey(kTestKeyName, KeyPurpose::SIGNING, UID_SELF); in TEST_P()
561 bool result = generateKey(kTestKeyName, KeyPurpose::SIGNING, AID_WIFI); in TEST_P()
/system/keymaster/ng/include/
Dauthorization_set.h315 Authorization(TAG_PURPOSE, KeyPurpose::SIGN); in SigningKey()
316 return Authorization(TAG_PURPOSE, KeyPurpose::VERIFY); in SigningKey()
320 Authorization(TAG_PURPOSE, KeyPurpose::ENCRYPT); in EncryptionKey()
321 return Authorization(TAG_PURPOSE, KeyPurpose::DECRYPT); in EncryptionKey()
DAndroidKeymaster3Device.h41 using ::android::hardware::keymaster::V3_0::KeyPurpose;
84 Return<void> begin(KeyPurpose purpose, const hidl_vec<uint8_t>& key,
DAndroidKeymaster4Device.h45 using ::android::hardware::keymaster::V4_0::KeyPurpose;
90 Return<void> begin(KeyPurpose purpose, const hidl_vec<uint8_t>& key,
DAndroidKeymaster41Device.h44 using ::android::hardware::keymaster::V4_0::KeyPurpose;
150 Return<void> begin(KeyPurpose purpose, const hidl_vec<uint8_t>& key, in begin()
/system/core/trusty/keymaster/include/trusty_keymaster/
DTrustyKeymaster3Device.h40 using ::android::hardware::keymaster::V3_0::KeyPurpose;
69 Return<void> begin(KeyPurpose purpose, const hidl_vec<uint8_t>& key,
DTrustyKeymaster4Device.h41 using ::android::hardware::keymaster::V4_0::KeyPurpose;
86 Return<void> begin(KeyPurpose purpose, const hidl_vec<uint8_t>& key,
/system/security/keystore/include/keystore/
Dkeystore_client.h81 virtual bool oneShotOperation(KeyPurpose purpose, const std::string& key_name,
142 beginOperation(KeyPurpose purpose, const std::string& key_name,
Dkeystore_client_impl.h43 bool oneShotOperation(KeyPurpose purpose, const std::string& key_name,
67 KeyStoreNativeReturnCode beginOperation(KeyPurpose purpose, const std::string& key_name,
Dkeymaster_types.h60 using keymaster::KeyPurpose;
/system/security/keystore-engine/
Dkeystore_backend_binder.cpp52 using android::hardware::keymaster::V4_0::KeyPurpose;
143 binder_result = service->begin(promise, token, key_name16, (int)KeyPurpose::SIGN, in sign()
/system/vold/
DKeymaster.h125 KeymasterOperation begin(km::KeyPurpose purpose, const std::string& key,

12