/system/keymaster/ |
H A D | openssl_utils.cpp | 71 static int convert_to_evp(keymaster_algorithm_t algorithm) { argument 72 switch (algorithm) { 98 LOG_E("EVP key algorithm was %d, not the expected %d", EVP_PKEY_type((*pkey)->type),
|
H A D | operation.cpp | 52 inline bool is_public_key_algorithm(keymaster_algorithm_t algorithm) { argument 53 switch (algorithm) { 70 if (!is_public_key_algorithm(key_type.algorithm))
|
H A D | operation.h | 42 : algorithm(alg), purpose(purp) {} 44 keymaster_algorithm_t algorithm; member in struct:keymaster::OperationFactory::KeyType 48 return algorithm == rhs.algorithm && purpose == rhs.purpose;
|
H A D | rsa_key_factory.cpp | 167 keymaster_algorithm_t algorithm = KM_ALGORITHM_RSA; local 168 if (!updated_description->GetTagValue(TAG_ALGORITHM, &algorithm)) 170 if (algorithm != KM_ALGORITHM_RSA)
|
H A D | ec_key_factory.cpp | 190 keymaster_algorithm_t algorithm = KM_ALGORITHM_EC; local 191 if (!updated_description->GetTagValue(TAG_ALGORITHM, &algorithm)) { 193 } else if (algorithm != KM_ALGORITHM_EC) {
|
H A D | keymaster_enforcement.cpp | 79 keymaster_algorithm_t algorithm; local 80 return auth_set.GetTagValue(TAG_ALGORITHM, &algorithm) && 81 (algorithm == KM_ALGORITHM_RSA || algorithm == KM_ALGORITHM_EC);
|
H A D | android_keymaster.cpp | 85 bool check_supported(const KeymasterContext& context, keymaster_algorithm_t algorithm, argument 87 if (context.GetKeyFactory(algorithm) == NULL) { 122 void GetSupported(const KeymasterContext& context, keymaster_algorithm_t algorithm, argument 126 if (response == NULL || !check_supported(context, algorithm, response)) 129 const OperationFactory* factory = context.GetOperationFactory(algorithm, purpose); 142 GetSupported(*context_, request.algorithm, request.purpose, 148 GetSupported(*context_, request.algorithm, request.purpose, 154 GetSupported(*context_, request.algorithm, request.purpose, &OperationFactory::SupportedDigests, 160 if (response == NULL || !check_supported(*context_, request.algorithm, response)) 165 context_->GetKeyFactory(request.algorithm) 223 GetKeyFactory(const KeymasterContext& context, const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, keymaster_algorithm_t* algorithm, keymaster_error_t* error) argument [all...] |
H A D | attestation_record.cpp | 63 ASN1_INTEGER* algorithm; member in struct:keymaster::km_auth_list 98 ASN1_EXP_OPT(KM_AUTH_LIST, algorithm, ASN1_INTEGER, TAG_ALGORITHM.masked_tag()), 273 integer_ptr = &record->algorithm; 643 if (!get_enum(record->algorithm, TAG_ALGORITHM, auth_list))
|
H A D | soft_keymaster_context.cpp | 362 KeyFactory* SoftKeymasterContext::GetKeyFactory(keymaster_algorithm_t algorithm) const { 363 switch (algorithm) { 386 OperationFactory* SoftKeymasterContext::GetOperationFactory(keymaster_algorithm_t algorithm, argument 388 KeyFactory* key_factory = GetKeyFactory(algorithm); 764 EVP_PKEY* SoftKeymasterContext::AttestationKey(keymaster_algorithm_t algorithm, argument 771 switch (algorithm) { 796 keymaster_cert_chain_t* SoftKeymasterContext::AttestationChain(keymaster_algorithm_t algorithm, argument 815 switch (algorithm) {
|
H A D | android_keymaster_test_utils.cpp | 19 #include <algorithm> 743 keymaster_algorithm_t algorithm, 747 return unwrap(dev)->get_supported_block_modes(unwrap(dev), algorithm, purpose, modes, 751 keymaster_algorithm_t algorithm, 755 return unwrap(dev)->get_supported_padding_modes(unwrap(dev), algorithm, purpose, modes, 760 keymaster_algorithm_t algorithm, 765 unwrap(dev), algorithm, purpose, digests, digests_length); 783 keymaster_algorithm_t algorithm, 786 return unwrap(dev)->get_supported_import_formats(unwrap(dev), algorithm, formats, 790 keymaster_algorithm_t algorithm, 742 get_supported_block_modes(const struct keymaster1_device* dev, keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, keymaster_block_mode_t** modes, size_t* modes_length) argument 750 get_supported_padding_modes(const struct keymaster1_device* dev, keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, keymaster_padding_t** modes, size_t* modes_length) argument 759 get_supported_digests(const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, keymaster_digest_t** digests, size_t* digests_length) argument 782 get_supported_import_formats(const struct keymaster1_device* dev, keymaster_algorithm_t algorithm, keymaster_key_format_t** formats, size_t* formats_length) argument 789 get_supported_export_formats(const struct keymaster1_device* dev, keymaster_algorithm_t algorithm, keymaster_key_format_t** formats, size_t* formats_length) argument [all...] |
H A D | soft_keymaster_device.cpp | 26 #include <algorithm> 108 static keymaster_error_t add_digests(keymaster1_device_t* dev, keymaster_algorithm_t algorithm, argument 111 auto key = std::make_pair(algorithm, purpose); 116 dev->get_supported_digests(dev, algorithm, purpose, &digests, &digests_length); 136 for (auto algorithm : sig_algorithms) 140 add_digests(dev, algorithm, purpose, map, &alg_purpose_supports_all); 148 for (auto algorithm : crypt_algorithms) 152 add_digests(dev, algorithm, purpose, map, &alg_purpose_supports_all); 443 keymaster_algorithm_t algorithm, 455 return km1_dev->get_supported_block_modes(km1_dev, algorithm, purpos 442 get_supported_block_modes(const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, keymaster_block_mode_t** modes, size_t* modes_length) argument 478 get_supported_padding_modes(const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, keymaster_padding_t** modes, size_t* modes_length) argument 514 get_supported_digests(const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, keymaster_digest_t** digests, size_t* digests_length) argument 549 get_supported_import_formats( const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, keymaster_key_format_t** formats, size_t* formats_length) argument 582 get_supported_export_formats( const keymaster1_device_t* dev, keymaster_algorithm_t algorithm, keymaster_key_format_t** formats, size_t* formats_length) argument 669 FindUnsupportedDigest(keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, const AuthorizationSet& params, keymaster_digest_t* unsupported) const argument 691 RequiresSoftwareDigesting(keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, const AuthorizationSet& params) const argument 1226 keymaster_algorithm_t algorithm = KM_ALGORITHM_AES; local 1625 StoreDefaultNewKeyParams(keymaster_algorithm_t algorithm, AuthorizationSet* auth_set) argument [all...] |
/system/security/keystore/ |
H A D | auth_token_table.cpp | 22 #include <algorithm> 89 inline bool is_secret_key_operation(Algorithm algorithm, KeyPurpose purpose) { argument 90 if ((algorithm != Algorithm::RSA && algorithm != Algorithm::EC)) 98 auto algorithm = defaultOr(key_info.GetTagValue(TAG_ALGORITHM), Algorithm::AES); local 99 return is_secret_key_operation(algorithm, purpose) && 104 auto algorithm = defaultOr(key_info.GetTagValue(TAG_ALGORITHM), Algorithm::AES); local 105 return is_secret_key_operation(algorithm, purpose) && key_info.find(Tag::AUTH_TIMEOUT) == -1;
|
H A D | keymaster_enforcement.cpp | 78 auto algorithm = auth_set.GetTagValue(TAG_ALGORITHM); local 79 return algorithm.isOk() && 80 (algorithm.value() == Algorithm::RSA || algorithm.value() == Algorithm::EC);
|
H A D | keystore_client_impl.cpp | 65 // The encryption algorithm is AES-256-CBC with PKCS #7 padding and a random 66 // IV. The authentication algorithm is HMAC-SHA256 and is computed over the 451 auto algorithm = NullOrOr(hardware_enforced_characteristics.GetTagValue(TAG_ALGORITHM), local 453 if (!algorithm.isOk() || algorithm.value() != Algorithm::AES) { 454 ALOGW("Found encryption key with invalid algorithm."); 492 auto algorithm = NullOrOr(hardware_enforced_characteristics.GetTagValue(TAG_ALGORITHM), local 494 if (!algorithm.isOk() || algorithm.value() != Algorithm::HMAC){ 495 ALOGW("Found authentication key with invalid algorithm [all...] |
H A D | key_store_service.cpp | 24 #include <algorithm> 1769 // Look up the algorithm of the key. 1777 auto algorithm = getKeyAlgoritmFromKeyCharacteristics(characteristics); local 1778 if (!algorithm.isOk()) { 1782 params->push_back(TAG_ALGORITHM, algorithm.value());
|
/system/tpm/trunks/ |
H A D | tpm_state_impl.cc | 180 bool TpmStateImpl::GetAlgorithmProperties(TPM_ALG_ID algorithm, argument 183 if (algorithm_properties_.count(algorithm) == 0) { 187 *properties = algorithm_properties_[algorithm];
|
H A D | tpm_generated.h | 1274 TPMI_ALG_SYM algorithm; member in struct:trunks::TPMT_SYM_DEF 1281 TPMI_ALG_SYM_OBJECT algorithm; member in struct:trunks::TPMT_SYM_DEF_OBJECT
|
/system/core/trusty/keymaster/ |
H A D | trusty_keymaster_device.cpp | 209 keymaster_algorithm_t algorithm; local 210 keymaster_error_t err = GetPkcs8KeyAlgorithm(key, key_length, &algorithm); 213 request.key_description.push_back(TAG_ALGORITHM, algorithm); 231 keymaster_algorithm_t* algorithm) { 252 *algorithm = KM_ALGORITHM_RSA; 255 *algorithm = KM_ALGORITHM_EC; 258 ALOGE("Unsupported algorithm %d", EVP_PKEY_type(pkey->type)); 482 ALOGE("Error %d extracting public key to determine algorithm", err); 230 GetPkcs8KeyAlgorithm(const uint8_t* key, size_t key_length, keymaster_algorithm_t* algorithm) argument
|
/system/keymaster/include/keymaster/ |
H A D | android_keymaster_messages.h | 137 return append_uint32_to_buf(buf, end, algorithm); 140 return copy_uint32_from_buf(buf_ptr, end, &algorithm); 143 keymaster_algorithm_t algorithm; member in struct:keymaster::SupportedByAlgorithmRequest 162 buf = append_uint32_to_buf(buf, end, algorithm); 166 return copy_uint32_from_buf(buf_ptr, end, &algorithm) && 170 keymaster_algorithm_t algorithm; member in struct:keymaster::SupportedByAlgorithmAndPurposeRequest
|