/system/keymaster/ |
D | operation.h | 42 : algorithm(alg), purpose(purp) {} in KeyType() 45 keymaster_purpose_t purpose; member 48 return algorithm == rhs.algorithm && purpose == rhs.purpose; 90 Operation(keymaster_purpose_t purpose) : purpose_(purpose) {} in Operation() argument 93 keymaster_purpose_t purpose() const { return purpose_; } in purpose() function
|
D | keymaster_enforcement.cpp | 84 static keymaster_error_t authorized_purpose(const keymaster_purpose_t purpose, in authorized_purpose() argument 86 switch (purpose) { in authorized_purpose() 91 if (auth_set.Contains(TAG_PURPOSE, purpose)) in authorized_purpose() 100 inline bool is_origination_purpose(keymaster_purpose_t purpose) { in is_origination_purpose() argument 101 return purpose == KM_PURPOSE_ENCRYPT || purpose == KM_PURPOSE_SIGN; in is_origination_purpose() 104 inline bool is_usage_purpose(keymaster_purpose_t purpose) { in is_usage_purpose() argument 105 return purpose == KM_PURPOSE_DECRYPT || purpose == KM_PURPOSE_VERIFY; in is_usage_purpose() 118 keymaster_error_t KeymasterEnforcement::AuthorizeOperation(const keymaster_purpose_t purpose, in AuthorizeOperation() argument 125 switch (purpose) { in AuthorizeOperation() 139 return AuthorizeBegin(purpose, keyid, auth_set, operation_params); in AuthorizeOperation() [all …]
|
D | rsa_keymaster1_operation.h | 32 RsaKeymaster1WrappedOperation(keymaster_purpose_t purpose, const Keymaster1Engine* engine) in RsaKeymaster1WrappedOperation() argument 33 : purpose_(purpose), operation_handle_(0), engine_(engine) {} in RsaKeymaster1WrappedOperation() 58 : BaseOperation(digest, padding, key), wrapped_operation_(super::purpose(), engine) { in RsaKeymaster1Operation() 60 assert(super::purpose() != KM_PURPOSE_VERIFY); in RsaKeymaster1Operation() 61 assert(super::purpose() != KM_PURPOSE_ENCRYPT); in RsaKeymaster1Operation() 103 RsaKeymaster1OperationFactory(keymaster_purpose_t purpose, const Keymaster1Engine* engine) in RsaKeymaster1OperationFactory() argument 104 : purpose_(purpose), engine_(engine) {} in RsaKeymaster1OperationFactory()
|
D | ecdsa_keymaster1_operation.h | 32 EcdsaKeymaster1WrappedOperation(keymaster_purpose_t purpose, const Keymaster1Engine* engine) in EcdsaKeymaster1WrappedOperation() argument 33 : purpose_(purpose), operation_handle_(0), engine_(engine) {} in EcdsaKeymaster1WrappedOperation() 58 : BaseOperation(digest, key), wrapped_operation_(super::purpose(), engine) { in EcdsaKeymaster1Operation() 60 assert(super::purpose() != KM_PURPOSE_VERIFY); in EcdsaKeymaster1Operation() 61 assert(super::purpose() != KM_PURPOSE_ENCRYPT); in EcdsaKeymaster1Operation() 103 EcdsaKeymaster1OperationFactory(keymaster_purpose_t purpose, const Keymaster1Engine* engine) in EcdsaKeymaster1OperationFactory() argument 104 : purpose_(purpose), engine_(engine) {} in EcdsaKeymaster1OperationFactory()
|
D | rsa_key.cpp | 36 bool RsaKey::SupportedMode(keymaster_purpose_t purpose, keymaster_padding_t padding) { in SupportedMode() argument 37 switch (purpose) { in SupportedMode() 53 bool RsaKey::SupportedMode(keymaster_purpose_t purpose, keymaster_digest_t digest) { in SupportedMode() argument 54 switch (purpose) { in SupportedMode()
|
D | hmac_operation.h | 28 HmacOperation(keymaster_purpose_t purpose, const uint8_t* key_data, size_t key_data_size, 57 virtual KeyType registry_key() const { return KeyType(KM_ALGORITHM_HMAC, purpose()); } in registry_key() 64 virtual keymaster_purpose_t purpose() const = 0; 68 keymaster_purpose_t purpose() const { return KM_PURPOSE_SIGN; } in purpose() function 72 keymaster_purpose_t purpose() const { return KM_PURPOSE_VERIFY; } in purpose() function
|
D | hmac_operation.cpp | 48 if (purpose() == KM_PURPOSE_VERIFY) { in CreateOperation() 54 if (purpose() == KM_PURPOSE_SIGN) { in CreateOperation() 70 purpose(), symmetric_key->key_data(), symmetric_key->key_data_size(), digest, in CreateOperation() 91 HmacOperation::HmacOperation(keymaster_purpose_t purpose, const uint8_t* key_data, in HmacOperation() argument 94 : Operation(purpose), error_(KM_ERROR_OK), mac_length_(mac_length), in HmacOperation() 127 if (purpose == KM_PURPOSE_SIGN) { in HmacOperation() 175 switch (purpose()) { in Finish()
|
D | rsa_operation.h | 36 RsaOperation(keymaster_purpose_t purpose, keymaster_digest_t digest, in RsaOperation() argument 38 : Operation(purpose), rsa_key_(key), padding_(padding), digest_(digest), in RsaOperation() 75 RsaDigestingOperation(keymaster_purpose_t purpose, keymaster_digest_t digest, 134 RsaCryptOperation(keymaster_purpose_t purpose, keymaster_digest_t digest, in RsaCryptOperation() argument 136 : RsaOperation(purpose, digest, padding, key) {} in RsaCryptOperation() 176 KeyType registry_key() const override { return KeyType(KM_ALGORITHM_RSA, purpose()); } in registry_key() 177 virtual keymaster_purpose_t purpose() const = 0; 219 keymaster_purpose_t purpose() const override { return KM_PURPOSE_SIGN; } in purpose() function 230 keymaster_purpose_t purpose() const override { return KM_PURPOSE_VERIFY; } in purpose() function 241 keymaster_purpose_t purpose() const override { return KM_PURPOSE_ENCRYPT; } in purpose() function [all …]
|
D | ecdsa_operation.h | 31 EcdsaOperation(keymaster_purpose_t purpose, keymaster_digest_t digest, EVP_PKEY* key) in EcdsaOperation() argument 32 : Operation(purpose), digest_(digest), ecdsa_key_(key) { in EcdsaOperation() 80 KeyType registry_key() const override { return KeyType(KM_ALGORITHM_EC, purpose()); } in registry_key() 85 virtual keymaster_purpose_t purpose() const = 0; 91 keymaster_purpose_t purpose() const override { return KM_PURPOSE_SIGN; } in purpose() function 99 keymaster_purpose_t purpose() const override { return KM_PURPOSE_VERIFY; } in purpose() function
|
D | soft_keymaster_device.cpp | 84 keymaster_purpose_t purpose, in add_digests() argument 86 auto key = std::make_pair(algorithm, purpose); in add_digests() 91 dev->get_supported_digests(dev, algorithm, purpose, &digests, &digests_length); in add_digests() 109 for (auto purpose : sig_purposes) { in map_digests() local 110 keymaster_error_t error = add_digests(dev, algorithm, purpose, map); in map_digests() 118 for (auto purpose : crypt_purposes) { in map_digests() local 119 keymaster_error_t error = add_digests(dev, algorithm, purpose, map); in map_digests() 434 keymaster_purpose_t purpose, in get_supported_block_modes() argument 445 return km1_dev->get_supported_block_modes(km1_dev, algorithm, purpose, modes, modes_length); in get_supported_block_modes() 449 request.purpose = purpose; in get_supported_block_modes() [all …]
|
D | aes_operation.h | 33 KeyType registry_key() const override { return KeyType(KM_ALGORITHM_AES, purpose()); } in registry_key() 40 virtual keymaster_purpose_t purpose() const = 0; 47 keymaster_purpose_t purpose() const override { return KM_PURPOSE_ENCRYPT; } in purpose() function 54 keymaster_purpose_t purpose() const override { return KM_PURPOSE_DECRYPT; } in purpose() function 61 AesEvpOperation(keymaster_purpose_t purpose, keymaster_block_mode_t block_mode,
|
D | rsa_key.h | 35 bool SupportedMode(keymaster_purpose_t purpose, keymaster_padding_t padding); 36 bool SupportedMode(keymaster_purpose_t purpose, keymaster_digest_t digest);
|
D | android_keymaster_test_utils.cpp | 232 keymaster_error_t Keymaster2Test::BeginOperation(keymaster_purpose_t purpose) { in BeginOperation() argument 236 device()->begin(device(), purpose, &blob_, &in_params, &out_params, &op_handle_); in BeginOperation() 242 keymaster_error_t Keymaster2Test::BeginOperation(keymaster_purpose_t purpose, in BeginOperation() argument 247 device()->begin(device(), purpose, &blob_, &input_set, &out_params, &op_handle_); in BeginOperation() 352 string Keymaster2Test::ProcessMessage(keymaster_purpose_t purpose, const string& message) { in ProcessMessage() argument 353 EXPECT_EQ(KM_ERROR_OK, BeginOperation(purpose, client_params(), NULL /* output_params */)); in ProcessMessage() 363 string Keymaster2Test::ProcessMessage(keymaster_purpose_t purpose, const string& message, in ProcessMessage() argument 367 EXPECT_EQ(KM_ERROR_OK, BeginOperation(purpose, begin_params, begin_out_params)); in ProcessMessage() 378 string Keymaster2Test::ProcessMessage(keymaster_purpose_t purpose, const string& message, in ProcessMessage() argument 382 EXPECT_EQ(KM_ERROR_OK, BeginOperation(purpose, begin_params, output_params)); in ProcessMessage() [all …]
|
D | android_keymaster.cpp | 123 keymaster_purpose_t purpose, in GetSupported() argument 129 const OperationFactory* factory = context.GetOperationFactory(algorithm, purpose); in GetSupported() 142 GetSupported(*context_, request.algorithm, request.purpose, in SupportedBlockModes() 148 GetSupported(*context_, request.algorithm, request.purpose, in SupportedPaddingModes() 154 GetSupported(*context_, request.algorithm, request.purpose, &OperationFactory::SupportedDigests, in SupportedDigests() 258 OperationFactory* factory = key_factory->GetOperationFactory(request.purpose); in BeginOperation() 274 request.purpose, key_id, key->authorizations(), request.additional_params, in BeginOperation() 301 operation->purpose(), operation->key_id(), operation->authorizations(), in UpdateOperation() 330 operation->purpose(), operation->key_id(), operation->authorizations(), in FinishOperation()
|
D | aes_key.cpp | 33 OperationFactory* AesKeyFactory::GetOperationFactory(keymaster_purpose_t purpose) const { in GetOperationFactory() 34 switch (purpose) { in GetOperationFactory()
|
D | hmac_key.cpp | 31 OperationFactory* HmacKeyFactory::GetOperationFactory(keymaster_purpose_t purpose) const { in GetOperationFactory() 32 switch (purpose) { in GetOperationFactory()
|
/system/security/keystore/ |
D | auth_token_table.cpp | 63 inline bool is_secret_key_operation(keymaster_algorithm_t algorithm, keymaster_purpose_t purpose) { in is_secret_key_operation() argument 66 if (purpose == KM_PURPOSE_SIGN || purpose == KM_PURPOSE_DECRYPT) in is_secret_key_operation() 72 keymaster_purpose_t purpose) { in KeyRequiresAuthentication() argument 75 return is_secret_key_operation(algorithm, purpose) && key_info.find(TAG_NO_AUTH_REQUIRED) == -1; in KeyRequiresAuthentication() 79 keymaster_purpose_t purpose) { in KeyRequiresAuthPerOperation() argument 82 return is_secret_key_operation(algorithm, purpose) && key_info.find(TAG_AUTH_TIMEOUT) == -1; in KeyRequiresAuthPerOperation() 86 keymaster_purpose_t purpose, in FindAuthorization() argument 89 if (!KeyRequiresAuthentication(key_info, purpose)) in FindAuthorization() 98 if (KeyRequiresAuthPerOperation(key_info, purpose)) in FindAuthorization()
|
D | operation.h | 51 keymaster_purpose_t purpose, const keymaster2_device_t* dev, 72 Operation(keymaster_operation_handle_t handle, uint64_t keyid, keymaster_purpose_t purpose, 77 keymaster_purpose_t purpose; member
|
D | operation.cpp | 27 keymaster_purpose_t purpose, const keymaster2_device_t* dev, in addOperation() argument 32 mMap[token] = Operation(handle, keyid, purpose, dev, characteristics, appToken); in addOperation() 58 *outPurpose = entry->second.purpose; in getOperation() 151 : handle(handle_), keyid(keyid_), purpose(purpose_), device(device_), in Operation()
|
D | auth_token_table.h | 73 Error FindAuthorization(const AuthorizationSet& key_info, keymaster_purpose_t purpose, 87 keymaster_purpose_t purpose, keymaster_operation_handle_t op_handle, in FindAuthorization() argument 89 return FindAuthorization(AuthorizationSet(params, params_count), purpose, op_handle, found); in FindAuthorization()
|
D | key_store_service.cpp | 815 keymaster_purpose_t purpose, bool pruneable, in begin() argument 867 int32_t authResult = getAuthToken(characteristics.get(), 0, purpose, &authToken, in begin() 903 err = enforcement_policy.AuthorizeOperation(purpose, keyid, key_auths, operation_params, in begin() 921 err = dev->begin(dev, purpose, &key, &inParams, &outParams, &handle); in begin() 933 err = dev->begin(dev, purpose, &key, &inParams, &outParams, &handle); in begin() 940 sp<IBinder> operationToken = mOperationMap.addOperation(handle, keyid, purpose, dev, appToken, in begin() 967 keymaster_purpose_t purpose; in update() local 970 if (!mOperationMap.getOperation(token, &handle, &keyid, &purpose, &dev, &characteristics)) { in update() 991 purpose, keyid, key_auths, operation_params, handle, false /* is_begin_operation */); in update() 1018 keymaster_purpose_t purpose; in finish() local [all …]
|
/system/keymaster/include/keymaster/ |
D | soft_keymaster_device.h | 89 bool FindUnsupportedDigest(keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, 92 bool RequiresSoftwareDigesting(keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, 114 keymaster_purpose_t purpose, 119 keymaster_purpose_t purpose, 124 keymaster_purpose_t purpose, 161 static keymaster_error_t begin(const keymaster1_device_t* dev, keymaster_purpose_t purpose, 218 static keymaster_error_t begin(const keymaster2_device_t* dev, keymaster_purpose_t purpose,
|
D | keymaster_enforcement.h | 52 keymaster_error_t AuthorizeOperation(const keymaster_purpose_t purpose, const km_id_t keyid, 63 keymaster_error_t AuthorizeBegin(const keymaster_purpose_t purpose, const km_id_t keyid,
|
/system/vold/ |
D | Keymaster.cpp | 34 virtual keymaster_error_t begin(keymaster_purpose_t purpose, const keymaster_key_blob_t* key, 65 keymaster_error_t begin(keymaster_purpose_t purpose, const keymaster_key_blob_t* key, in begin() argument 69 return mDevice->begin(mDevice, purpose, key, in_params, out_params, operation_handle); in begin() 220 KeymasterOperation Keymaster::begin(keymaster_purpose_t purpose, const std::string& key, in begin() argument 226 auto error = mDevice->begin(purpose, &keyBlob, &inParams, &outParams_set, &mOpHandle); in begin() 237 KeymasterOperation Keymaster::begin(keymaster_purpose_t purpose, const std::string& key, in begin() argument 241 auto error = mDevice->begin(purpose, &keyBlob, &inParams, nullptr, &mOpHandle); in begin()
|
D | Keymaster.h | 83 KeymasterOperation begin(keymaster_purpose_t purpose, const std::string& key, 86 KeymasterOperation begin(keymaster_purpose_t purpose, const std::string& key,
|