Home
last modified time | relevance | path

Searched refs:algorithm (Results 1 – 25 of 92) sorted by relevance

1234

/system/core/trusty/keymaster/set_attestation_key/
Dset_attestation_key.cpp78 buf = keymaster::append_uint32_to_buf(buf, end, algorithm); in Serialize()
82 return keymaster::copy_uint32_from_buf(buf_ptr, end, &algorithm) && in Deserialize()
86 keymaster_algorithm_t algorithm; member
107 return keymaster::append_uint32_to_buf(buf, end, algorithm); in Serialize()
110 return keymaster::copy_uint32_from_buf(buf_ptr, end, &algorithm); in Deserialize()
113 keymaster_algorithm_t algorithm; member
118 static int set_attestation_key_or_cert_bin(uint32_t cmd, keymaster_algorithm_t algorithm, in set_attestation_key_or_cert_bin() argument
123 req.algorithm = algorithm; in set_attestation_key_or_cert_bin()
136 static int set_attestation_key_or_cert_pem(uint32_t cmd, keymaster_algorithm_t algorithm, in set_attestation_key_or_cert_pem() argument
163 ret = set_attestation_key_or_cert_bin(cmd, algorithm, key, keylen); in set_attestation_key_or_cert_pem()
[all …]
/system/keymaster/legacy_support/
Dkeymaster1_legacy_support.cpp59 keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, in add_digests() argument
61 auto key = std::make_pair(algorithm, purpose); in add_digests()
66 dev->get_supported_digests(dev, algorithm, purpose, &digests, &digests_length); in add_digests()
86 for (auto algorithm : sig_algorithms) in map_digests() local
90 add_digests(dev, algorithm, purpose, map, &alg_purpose_supports_all); in map_digests()
97 for (auto algorithm : crypt_algorithms) in map_digests() local
101 add_digests(dev, algorithm, purpose, map, &alg_purpose_supports_all); in map_digests()
118 static bool findUnsupportedDigest(keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, in findUnsupportedDigest() argument
121 auto supported_digests = digest_map.find(std::make_pair(algorithm, purpose)); in findUnsupportedDigest()
142 bool requiresSoftwareDigesting(keymaster_algorithm_t algorithm, keymaster_purpose_t purpose, in requiresSoftwareDigesting() argument
[all …]
/system/keymaster/contexts/
Dkeymaster2_passthrough_context.cpp44 KeyFactory* Keymaster2PassthroughContext::GetKeyFactory(keymaster_algorithm_t algorithm) const { in GetKeyFactory()
45 auto& result = factories_[algorithm]; in GetKeyFactory()
47 result.reset(new (std::nothrow) KeymasterPassthroughKeyFactory(engine_.get(), algorithm)); in GetKeyFactory()
52 Keymaster2PassthroughContext::GetOperationFactory(keymaster_algorithm_t algorithm, in GetOperationFactory() argument
54 auto keyfactory = GetKeyFactory(algorithm); in GetOperationFactory()
102 keymaster_algorithm_t algorithm; in ParseKeyBlob() local
103 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
104 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
109 auto factory = GetKeyFactory(algorithm); in ParseKeyBlob()
Dsoft_attestation_cert.cpp281 const keymaster_key_blob_t* getAttestationKey(keymaster_algorithm_t algorithm, in getAttestationKey() argument
286 switch (algorithm) { in getAttestationKey()
299 CertificateChain getAttestationChain(keymaster_algorithm_t algorithm, keymaster_error_t* error) { in getAttestationChain() argument
304 switch (algorithm) { in getAttestationChain()
Dkeymaster1_passthrough_context.cpp58 KeyFactory* Keymaster1PassthroughContext::GetKeyFactory(keymaster_algorithm_t algorithm) const { in GetKeyFactory()
59 auto& result = factories_[algorithm]; in GetKeyFactory()
61 switch (algorithm) { in GetKeyFactory()
90 Keymaster1PassthroughContext::GetOperationFactory(keymaster_algorithm_t algorithm, in GetOperationFactory() argument
92 auto keyfactory = GetKeyFactory(algorithm); in GetOperationFactory()
169 keymaster_algorithm_t algorithm; in ParseKeyBlob() local
170 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
171 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
174 auto factory = GetKeyFactory(algorithm); in ParseKeyBlob()
Dsoft_keymaster_device.cpp109 static keymaster_error_t add_digests(keymaster1_device_t* dev, keymaster_algorithm_t algorithm, in add_digests() argument
112 auto key = std::make_pair(algorithm, purpose); in add_digests()
117 dev->get_supported_digests(dev, algorithm, purpose, &digests, &digests_length); in add_digests()
137 for (auto algorithm : sig_algorithms) in map_digests() local
141 add_digests(dev, algorithm, purpose, map, &alg_purpose_supports_all); in map_digests()
148 for (auto algorithm : crypt_algorithms) in map_digests() local
152 add_digests(dev, algorithm, purpose, map, &alg_purpose_supports_all); in map_digests()
404 keymaster_algorithm_t algorithm, in get_supported_block_modes() argument
414 return km1_dev->get_supported_block_modes(km1_dev, algorithm, purpose, modes, modes_length); in get_supported_block_modes()
418 request.algorithm = algorithm; in get_supported_block_modes()
[all …]
Dsoft_keymaster_context.cpp97 KeyFactory* SoftKeymasterContext::GetKeyFactory(keymaster_algorithm_t algorithm) const { in GetKeyFactory()
98 switch (algorithm) { in GetKeyFactory()
123 OperationFactory* SoftKeymasterContext::GetOperationFactory(keymaster_algorithm_t algorithm, in GetOperationFactory() argument
125 KeyFactory* key_factory = GetKeyFactory(algorithm); in GetOperationFactory()
270 keymaster_algorithm_t algorithm; in ParseKeyBlob() local
271 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
272 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
275 auto factory = GetKeyFactory(algorithm); in ParseKeyBlob()
/system/keymaster/include/keymaster/contexts/
Dsoft_attestation_context.h35 KeymasterKeyBlob GetAttestationKey(keymaster_algorithm_t algorithm, in GetAttestationKey() argument
37 return KeymasterKeyBlob(*getAttestationKey(algorithm, error)); in GetAttestationKey()
40 CertificateChain GetAttestationChain(keymaster_algorithm_t algorithm, in GetAttestationChain() argument
42 return getAttestationChain(algorithm, error); in GetAttestationChain()
Dsoft_attestation_cert.h26 const keymaster_key_blob_t* getAttestationKey(keymaster_algorithm_t algorithm,
28 CertificateChain getAttestationChain(keymaster_algorithm_t algorithm, keymaster_error_t* error);
/system/keymaster/include/keymaster/
Dsoft_keymaster_device.h81 bool FindUnsupportedDigest(keymaster_algorithm_t algorithm, keymaster_purpose_t purpose,
84 bool RequiresSoftwareDigesting(keymaster_algorithm_t algorithm, keymaster_purpose_t purpose,
88 static void StoreDefaultNewKeyParams(keymaster_algorithm_t algorithm,
91 keymaster_algorithm_t* algorithm);
105 keymaster_algorithm_t algorithm,
110 keymaster_algorithm_t algorithm,
115 keymaster_algorithm_t algorithm,
120 keymaster_algorithm_t algorithm,
124 keymaster_algorithm_t algorithm,
Doperation.h45 : algorithm(alg), purpose(purp) {} in KeyType()
47 keymaster_algorithm_t algorithm; member
51 return algorithm == rhs.algorithm && purpose == rhs.purpose;
Dattestation_context.h91 virtual KeymasterKeyBlob GetAttestationKey(keymaster_algorithm_t algorithm,
98 virtual CertificateChain GetAttestationChain(keymaster_algorithm_t algorithm,
/system/tools/mkbootimg/gki/
Dgenerate_gki_certificate.py25 def generate_gki_certificate(image, avbtool, name, algorithm, key, salt, argument
37 '--algorithm', algorithm,
87 algorithm=args.algorithm, key=args.key, salt=args.salt,
Dcertify_bootimg.py44 def add_certificate(boot_img, algorithm, key, extra_args): argument
58 algorithm=algorithm, key=key, salt='d00df00d',
249 def certify_bootimg(boot_img, output_img, algorithm, key, extra_args, argument
257 add_certificate(boot_tmp, algorithm, key, extra_args)
267 algorithm, key, extra_args, extra_footer_args): argument
279 algorithm=algorithm, key=key, extra_args=extra_args,
302 args.algorithm, args.key, args.extra_args,
305 certify_bootimg(args.boot_img, args.output, args.algorithm,
/system/sepolicy/prebuilts/api/30.0/private/
Dfsverity_init.te18 # When kernel requests an algorithm, the crypto API first looks for an
19 # already registered algorithm with that name. If it fails, the kernel creates
20 # an implementation of the algorithm from templates.
/system/sepolicy/prebuilts/api/34.0/private/
Dfsverity_init.te18 # When kernel requests an algorithm, the crypto API first looks for an
19 # already registered algorithm with that name. If it fails, the kernel creates
20 # an implementation of the algorithm from templates.
/system/sepolicy/private/
Dfsverity_init.te18 # When kernel requests an algorithm, the crypto API first looks for an
19 # already registered algorithm with that name. If it fails, the kernel creates
20 # an implementation of the algorithm from templates.
/system/security/keystore2/src/
Dsuper_key.rs81 pub algorithm: SuperEncryptionAlgorithm, field
87 SuperKeyType { alias: "USER_SUPER_KEY", algorithm: SuperEncryptionAlgorithm::Aes256Gcm };
93 algorithm: SuperEncryptionAlgorithm::Aes256Gcm,
100 algorithm: SuperEncryptionAlgorithm::EcdhP521,
146 algorithm: SuperEncryptionAlgorithm, field
159 if self.algorithm == SuperEncryptionAlgorithm::Aes256Gcm { in decrypt()
167 if self.algorithm == SuperEncryptionAlgorithm::Aes256Gcm { in encrypt()
178 algorithm: SuperEncryptionAlgorithm, field
188 Ok(LockedKey { algorithm: to_encrypt.algorithm, id: to_encrypt.id, nonce, ciphertext }) in new()
224 Ok(Arc::new(SuperKey { algorithm: self.algorithm, key, id: self.id, reencrypt_with })) in decrypt()
[all …]
/system/sepolicy/prebuilts/api/29.0/private/
Dfsverity_init.te22 # When kernel requests an algorithm, the crypto API first looks for an
23 # already registered algorithm with that name. If it fails, the kernel creates
24 # an implementation of the algorithm from templates.
/system/sepolicy/prebuilts/api/33.0/private/
Dfsverity_init.te21 # When kernel requests an algorithm, the crypto API first looks for an
22 # already registered algorithm with that name. If it fails, the kernel creates
23 # an implementation of the algorithm from templates.
/system/sepolicy/prebuilts/api/32.0/private/
Dfsverity_init.te22 # When kernel requests an algorithm, the crypto API first looks for an
23 # already registered algorithm with that name. If it fails, the kernel creates
24 # an implementation of the algorithm from templates.
/system/sepolicy/prebuilts/api/31.0/private/
Dfsverity_init.te22 # When kernel requests an algorithm, the crypto API first looks for an
23 # already registered algorithm with that name. If it fails, the kernel creates
24 # an implementation of the algorithm from templates.
/system/security/keystore2/test_utils/
Dkey_generations.rs343 .algorithm(Algorithm::EC) in generate_ec_p256_signing_key()
387 .algorithm(Algorithm::EC) in generate_ec_key()
426 .algorithm(Algorithm::RSA) in generate_rsa_key()
479 algorithm: Algorithm, in generate_sym_key()
488 .algorithm(algorithm) in generate_sym_key()
530 .algorithm(Algorithm::HMAC) in generate_hmac_key()
567 algorithm: Algorithm, in generate_attestation_key()
570 assert!(algorithm == Algorithm::RSA || algorithm == Algorithm::EC); in generate_attestation_key()
572 if algorithm == Algorithm::RSA { in generate_attestation_key()
616 .algorithm(Algorithm::EC) in generate_ec_attestation_key()
[all …]
/system/keymint/common/src/crypto/
Dec.rs165 algorithm: AlgorithmIdentifier { oid, parameters }, in subject_public_key_info()
199 coset::CoseKeyBuilder::new_ec2_pub_key(cose_nist_curve, x, y).algorithm(nist_algo) in public_cose_key()
210 .algorithm(coset::iana::Algorithm::EdDSA), in public_cose_key()
220 .algorithm(coset::iana::Algorithm::ECDH_ES_HKDF_256), in public_cose_key()
363 let algorithm = in import_sec1_private_key() localVariable
365 let pkcs8_key = pkcs8::PrivateKeyInfo::new(algorithm, data); in import_sec1_private_key()
378 let algo_params = key_info.algorithm.parameters; in import_pkcs8_key_impl()
379 match key_info.algorithm.oid { in import_pkcs8_key_impl()
385 key_info.algorithm.oid in import_pkcs8_key_impl()
449 key_info.algorithm.oid, in import_pkcs8_key_impl()
/system/keymaster/tests/
Dwrapped_key_test.cpp97 keymaster_algorithm_t algorithm; in TEST() local
98 auth_list.GetTagValue(TAG_ALGORITHM, &algorithm); in TEST()
99 EXPECT_EQ(algorithm, KM_ALGORITHM_AES); in TEST()

1234