/system/keymaster/km_openssl/ |
D | rsa_key_factory.cpp | 51 keymaster_error_t RsaKeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument 61 if (!key_description.GetTagValue(TAG_RSA_PUBLIC_EXPONENT, &public_exponent)) { in GenerateKey() 71 if (!key_description.GetTagValue(TAG_KEY_SIZE, &key_size)) { in GenerateKey() 97 error = blob_maker_.CreateKeyBlob(key_description, KM_ORIGIN_GENERATED, key_material, key_blob, in GenerateKey() 105 if (key_description.Contains(TAG_ATTESTATION_CHALLENGE)) { in GenerateKey() 106 *cert_chain = context_.GenerateAttestation(key, key_description, move(attest_key), in GenerateKey() 112 key_size < 1024 || !key_description.Contains(TAG_PURPOSE, KM_PURPOSE_SIGN); in GenerateKey() 114 context_.GenerateSelfSignedCertificate(key, key_description, fake_signature, &error); in GenerateKey() 120 keymaster_error_t RsaKeyFactory::ImportKey(const AuthorizationSet& key_description, // in ImportKey() argument 135 UpdateImportKeyDescription(key_description, input_key_material_format, input_key_material, in ImportKey() [all …]
|
D | ec_key_factory.cpp | 49 keymaster_error_t EcKeyFactory::GetCurveAndSize(const AuthorizationSet& key_description, in GetCurveAndSize() argument 52 if (!key_description.GetTagValue(TAG_EC_CURVE, curve)) { in GetCurveAndSize() 54 if (!key_description.GetTagValue(TAG_KEY_SIZE, key_size_bits)) { in GetCurveAndSize() 68 if (key_description.GetTagValue(TAG_KEY_SIZE, &tag_key_size_bits) && in GetCurveAndSize() 79 keymaster_error_t EcKeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument 88 AuthorizationSet authorizations(key_description); in GenerateKey() 135 if (key_description.Contains(TAG_ATTESTATION_CHALLENGE)) { in GenerateKey() 136 *cert_chain = context_.GenerateAttestation(key, key_description, move(attest_key), in GenerateKey() 142 key, key_description, in GenerateKey() 143 !key_description.Contains(TAG_PURPOSE, KM_PURPOSE_SIGN) /* fake_signature */, &error); in GenerateKey() [all …]
|
D | symmetric_key.cpp | 33 keymaster_error_t SymmetricKeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument 43 if (!key_description.GetTagValue(TAG_KEY_SIZE, &key_size_bits) || in GenerateKey() 47 keymaster_error_t error = validate_algorithm_specific_new_key_params(key_description); in GenerateKey() 60 return blob_maker_.CreateKeyBlob(key_description, KM_ORIGIN_GENERATED, key_material, key_blob, in GenerateKey() 64 keymaster_error_t SymmetricKeyFactory::ImportKey(const AuthorizationSet& key_description, // in ImportKey() argument 75 AuthorizationSet authorizations(key_description); in ImportKey() 84 keymaster_error_t error = validate_algorithm_specific_new_key_params(key_description); in ImportKey()
|
D | aes_key.cpp | 69 const AuthorizationSet& key_description) const { in validate_algorithm_specific_new_key_params() 70 if (key_description.Contains(TAG_BLOCK_MODE, KM_MODE_GCM)) { in validate_algorithm_specific_new_key_params() 72 if (!key_description.GetTagValue(TAG_MIN_MAC_LENGTH, &min_tag_length)) in validate_algorithm_specific_new_key_params() 81 if (key_description.find(TAG_MIN_MAC_LENGTH) != -1) { in validate_algorithm_specific_new_key_params()
|
D | hmac_key.cpp | 61 const AuthorizationSet& key_description) const { in validate_algorithm_specific_new_key_params() 63 if (!key_description.GetTagValue(TAG_MIN_MAC_LENGTH, &min_mac_length_bits)) in validate_algorithm_specific_new_key_params() 67 if (!key_description.GetTagValue(TAG_DIGEST, &digest)) { in validate_algorithm_specific_new_key_params() 68 LOG_E("%d digests specified for HMAC key", key_description.GetTagCount(TAG_DIGEST)); in validate_algorithm_specific_new_key_params()
|
D | triple_des_key.cpp | 57 const AuthorizationSet& key_description) const { in validate_algorithm_specific_new_key_params() 58 if (key_description.Contains(TAG_MIN_MAC_LENGTH)) return KM_ERROR_INVALID_TAG; in validate_algorithm_specific_new_key_params()
|
/system/keymaster/include/keymaster/legacy_support/ |
D | keymaster1_legacy_support.h | 47 bool RequiresSoftwareDigesting(const AuthorizationSet& key_description) const; 49 const AuthProxy& key_description) const; 66 keymaster_error_t GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument 73 if (legacy_support_.RequiresSoftwareDigesting(key_description)) { in GenerateKey() 74 return software_digest_factory_.GenerateKey(key_description, move(attest_key), in GenerateKey() 78 return passthrough_factory_.GenerateKey(key_description, move(attest_key), in GenerateKey() 84 keymaster_error_t ImportKey(const AuthorizationSet& key_description, in ImportKey() argument 92 if (legacy_support_.RequiresSoftwareDigesting(key_description)) { in ImportKey() 94 key_description, input_key_material_format, input_key_material, move(attest_key), in ImportKey() 98 key_description, input_key_material_format, input_key_material, move(attest_key), in ImportKey() [all …]
|
D | keymaster_passthrough_key.h | 43 keymaster_error_t GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument 49 return engine_->GenerateKey(key_description, key_blob, hw_enforced, sw_enforced); in GenerateKey() 52 keymaster_error_t ImportKey(const AuthorizationSet& key_description, in ImportKey() argument 60 return engine_->ImportKey(key_description, input_key_material_format, input_key_material, in ImportKey()
|
D | keymaster_passthrough_engine.h | 42 virtual keymaster_error_t GenerateKey(const AuthorizationSet& key_description, 47 virtual keymaster_error_t ImportKey(const AuthorizationSet& key_description,
|
D | ec_keymaster1_key.h | 44 keymaster_error_t GenerateKey(const AuthorizationSet& key_description, 52 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
|
D | rsa_keymaster1_key.h | 44 keymaster_error_t GenerateKey(const AuthorizationSet& key_description, 52 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
|
D | keymaster1_engine.h | 44 keymaster_error_t GenerateKey(const AuthorizationSet& key_description, 48 keymaster_error_t ImportKey(const AuthorizationSet& key_description,
|
/system/keymaster/legacy_support/ |
D | ec_keymaster1_key.cpp | 42 static void UpdateToWorkAroundUnsupportedDigests(const AuthorizationSet& key_description, in UpdateToWorkAroundUnsupportedDigests() argument 46 for (const keymaster_key_param_t& entry : key_description) { in UpdateToWorkAroundUnsupportedDigests() 65 keymaster_error_t EcdsaKeymaster1KeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument 73 UpdateToWorkAroundUnsupportedDigests(key_description, &key_params_copy); in GenerateKey() 77 keymaster_error_t error = GetCurveAndSize(key_description, &ec_curve, &key_size); in GenerateKey() 80 } else if (!key_description.Contains(TAG_KEY_SIZE, key_size)) { in GenerateKey() 87 EcdsaKeymaster1KeyFactory::ImportKey(const AuthorizationSet& key_description, // in ImportKey() argument 97 UpdateToWorkAroundUnsupportedDigests(key_description, &key_params_copy); in ImportKey()
|
D | keymaster1_legacy_support.cpp | 164 const AuthorizationSet& key_description) const { in RequiresSoftwareDigesting() 167 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in RequiresSoftwareDigesting() 175 for (auto& entry : key_description) in RequiresSoftwareDigesting() 179 if (requiresSoftwareDigesting(algorithm, purpose, KM_DIGEST_NONE, key_description, in RequiresSoftwareDigesting() 188 const AuthProxy& key_description) const { in RequiresSoftwareDigesting() 191 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in RequiresSoftwareDigesting() 199 for (auto& entry : key_description) { in RequiresSoftwareDigesting() 203 if (requiresSoftwareDigesting(algorithm, purpose, digest, key_description, in RequiresSoftwareDigesting() 223 const AuthorizationSet& key_description, // in GenerateKey() argument 230 if (legacy_support_.RequiresSoftwareDigesting(key_description)) { in GenerateKey() [all …]
|
D | rsa_keymaster1_key.cpp | 41 static void UpdateToWorkAroundUnsupportedDigests(const AuthorizationSet& key_description, in UpdateToWorkAroundUnsupportedDigests() argument 47 for (const keymaster_key_param_t& entry : key_description) { in UpdateToWorkAroundUnsupportedDigests() 83 keymaster_error_t RsaKeymaster1KeyFactory::GenerateKey(const AuthorizationSet& key_description, in GenerateKey() argument 91 UpdateToWorkAroundUnsupportedDigests(key_description, &key_params_copy); in GenerateKey() 96 RsaKeymaster1KeyFactory::ImportKey(const AuthorizationSet& key_description, in ImportKey() argument 106 UpdateToWorkAroundUnsupportedDigests(key_description, &key_params_copy); in ImportKey()
|
D | keymaster_passthrough_engine.cpp | 84 keymaster_error_t GenerateKey(const AuthorizationSet& key_description, 88 keymaster_error_t ImportKey(const AuthorizationSet& key_description, 206 const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, in GenerateKey() argument 213 km_device_->generate_key(km_device_, &key_description, &blob, &characteristics); in GenerateKey() 226 const AuthorizationSet& key_description, KeymasterKeyBlob* key_blob, in GenerateKey() argument 233 km_device_->generate_key(km_device_, &key_description, &blob, &characteristics); in GenerateKey() 246 const AuthorizationSet& key_description, keymaster_key_format_t input_key_material_format, in ImportKey() argument 256 km_device_->import_key(km_device_, &key_description, input_key_material_format, &input_key, in ImportKey() 271 const AuthorizationSet& key_description, keymaster_key_format_t input_key_material_format, in ImportKey() argument 281 km_device_->import_key(km_device_, &key_description, input_key_material_format, &input_key, in ImportKey()
|
/system/keymaster/include/keymaster/km_openssl/ |
D | ec_key_factory.h | 35 keymaster_error_t GenerateKey(const AuthorizationSet& key_description, 42 keymaster_error_t ImportKey(const AuthorizationSet& key_description, 55 keymaster_error_t UpdateImportKeyDescription(const AuthorizationSet& key_description, 67 static keymaster_error_t GetCurveAndSize(const AuthorizationSet& key_description,
|
D | rsa_key_factory.h | 32 keymaster_error_t GenerateKey(const AuthorizationSet& key_description, 39 keymaster_error_t ImportKey(const AuthorizationSet& key_description, 58 keymaster_error_t UpdateImportKeyDescription(const AuthorizationSet& key_description,
|
D | symmetric_key.h | 35 keymaster_error_t GenerateKey(const AuthorizationSet& key_description, 42 keymaster_error_t ImportKey(const AuthorizationSet& key_description, 66 validate_algorithm_specific_new_key_params(const AuthorizationSet& key_description) const = 0;
|
/system/keymaster/include/keymaster/ |
D | key_factory.h | 39 virtual keymaster_error_t GenerateKey(const AuthorizationSet& key_description, 47 virtual keymaster_error_t ImportKey(const AuthorizationSet& key_description, //
|
D | soft_key_factory.h | 35 virtual keymaster_error_t CreateKeyBlob(const AuthorizationSet& key_description,
|
/system/keymaster/android_keymaster/ |
D | android_keymaster.cpp | 307 const KeyFactory* get_key_factory(const AuthorizationSet& key_description, in get_key_factory() argument 312 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm) || in get_key_factory() 324 get_key_factory(request.key_description, *context_, &response->error); in GenerateKey() 336 response->error = factory->GenerateKey(request.key_description, in GenerateKey() 357 gen_key_request.key_description.Reinitialize(kKeyMintEcdsaP256Params, in GenerateRkpKey() 766 get_key_factory(request.key_description, *context_, &response->error); in ImportKey() 770 request.key_description.GetTagValue(TAG_EARLY_BOOT_ONLY) && in ImportKey() 784 response->error = factory->ImportKey(request.key_description, // in ImportKey() 849 AuthorizationSet key_description; in ImportWrappedKey() local 854 request.masking_key, &key_description, &key_format, &secret_key); in ImportWrappedKey() [all …]
|
/system/keymaster/contexts/ |
D | soft_keymaster_context.cpp | 139 static keymaster_error_t SetAuthorizations(const AuthorizationSet& key_description, in SetAuthorizations() argument 145 for (auto& entry : key_description) { in SetAuthorizations() 179 keymaster_error_t SoftKeymasterContext::CreateKeyBlob(const AuthorizationSet& key_description, in CreateKeyBlob() argument 185 keymaster_error_t error = SetAuthorizations(key_description, origin, os_version_, in CreateKeyBlob() 190 error = BuildHiddenAuthorizations(key_description, &hidden, root_of_trust_); in CreateKeyBlob()
|
D | keymaster1_passthrough_context.cpp | 215 const AuthorizationSet& key_description, const keymaster_key_origin_t origin, in CreateKeyBlob() argument 218 keymaster_error_t error = SetKeyBlobAuthorizations(key_description, origin, os_version_, in CreateKeyBlob() 223 error = BuildHiddenAuthorizations(key_description, &hidden, softwareRootOfTrust); in CreateKeyBlob()
|
/system/core/trusty/keymaster/ |
D | TrustyKeymaster.cpp | 159 datedRequest.key_description = request.key_description; in GenerateKey() 161 if (!request.key_description.Contains(TAG_CREATION_DATETIME)) { in GenerateKey() 162 datedRequest.key_description.push_back(TAG_CREATION_DATETIME, java_time(time(NULL))); in GenerateKey()
|