Home
last modified time | relevance | path

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

12345678910

/aosp12/system/core/trusty/keymaster/set_attestation_key/
H A Dset_attestation_key.cpp86 keymaster_algorithm_t algorithm; member
113 keymaster_algorithm_t algorithm; member
123 req.algorithm = algorithm; in set_attestation_key_or_cert_bin()
216 *algorithm = KM_ALGORITHM_RSA; in str_to_algorithm()
218 *algorithm = KM_ALGORITHM_EC; in str_to_algorithm()
229 keymaster_algorithm_t algorithm; in set_attestation_key_or_cert() local
231 ret = str_to_algorithm(&algorithm, algorithm_str); in set_attestation_key_or_cert()
252 ret = str_to_algorithm(&req.algorithm, algorithm_str); in clear_cert_chain()
267 const xmlChar* algorithm = NULL; in process_xml() local
282 ret = clear_cert_chain(algorithm); in process_xml()
[all …]
/aosp12/system/keymaster/legacy_support/
H A Dkeymaster1_legacy_support.cpp60 auto key = std::make_pair(algorithm, purpose); in add_digests()
85 for (auto algorithm : sig_algorithms) in map_digests() local
89 add_digests(dev, algorithm, purpose, map, &alg_purpose_supports_all); in map_digests()
96 for (auto algorithm : crypt_algorithms) in map_digests() local
120 auto supported_digests = digest_map.find(std::make_pair(algorithm, purpose)); in findUnsupportedDigest()
144 switch (algorithm) { in requiresSoftwareDigesting()
155 if (!findUnsupportedDigest(algorithm, purpose, digest, params, digest_map)) { in requiresSoftwareDigesting()
166 keymaster_algorithm_t algorithm; in RequiresSoftwareDigesting() local
167 if (!key_description.GetTagValue(TAG_ALGORITHM, &algorithm)) { in RequiresSoftwareDigesting()
190 keymaster_algorithm_t algorithm; in RequiresSoftwareDigesting() local
[all …]
/aosp12/packages/modules/IPsec/src/java/android/net/ipsec/ike/
H A DSaProposal.java504 switch (algorithm) { in isAead()
548 boolean isCurrentAead = isAead(algorithm); in validateAndAddEncryptAlgo()
649 if (SUPPORTED_ENCRYPTION_ALGO_TO_STR.contains(algorithm)) { in getEncryptionAlgorithmString()
650 return SUPPORTED_ENCRYPTION_ALGO_TO_STR.get(algorithm); in getEncryptionAlgorithmString()
652 return "ENC_Unknown_" + algorithm; in getEncryptionAlgorithmString()
661 if (SUPPORTED_PRF_TO_STR.contains(algorithm)) { in getPseudorandomFunctionString()
662 return SUPPORTED_PRF_TO_STR.get(algorithm); in getPseudorandomFunctionString()
664 return "PRF_Unknown_" + algorithm; in getPseudorandomFunctionString()
673 if (SUPPORTED_INTEGRITY_ALGO_TO_STR.contains(algorithm)) { in getIntegrityAlgorithmString()
674 return SUPPORTED_INTEGRITY_ALGO_TO_STR.get(algorithm); in getIntegrityAlgorithmString()
[all …]
H A DIkeSaProposal.java249 public Builder addEncryptionAlgorithm(@EncryptionAlgorithm int algorithm, int keyLength) { in addEncryptionAlgorithm() argument
250 validateAndAddEncryptAlgo(algorithm, keyLength, false /* isChild */); in addEncryptionAlgorithm()
264 public Builder addIntegrityAlgorithm(@IntegrityAlgorithm int algorithm) { in addIntegrityAlgorithm() argument
265 validateAndAddIntegrityAlgo(algorithm, false /* isChild */); in addIntegrityAlgorithm()
291 public Builder addPseudorandomFunction(@PseudorandomFunction int algorithm) { in addPseudorandomFunction() argument
293 mProposedPrfs.add(new PrfTransform(algorithm)); in addPseudorandomFunction()
/aosp12/frameworks/base/apex/blobstore/framework/java/android/app/blob/
H A DBlobHandle.java62 @NonNull public final String algorithm; field in BlobHandle
94 this.algorithm = algorithm; in BlobHandle()
102 this.algorithm = in.readString(); in BlobHandle()
110 public static @NonNull BlobHandle create(@NonNull String algorithm, @NonNull byte[] digest, in create() argument
194 dest.writeString(algorithm); in writeToParcel()
210 return this.algorithm.equals(other.algorithm) in equals()
219 return Objects.hash(algorithm, Arrays.hashCode(digest), label, expiryTimeMillis, tag); in hashCode()
225 fout.println("algo: " + algorithm); in dump()
237 Preconditions.checkArgumentIsSupported(SUPPORTED_ALGOS, algorithm); in assertIsValid()
250 + "algo:" + algorithm + "," in toString()
[all …]
/aosp12/frameworks/base/services/backup/java/com/android/server/backup/utils/
H A DPasswordUtils.java53 public static SecretKey buildPasswordKey(String algorithm, String pw, byte[] salt, int rounds) { in buildPasswordKey() argument
54 return buildCharArrayKey(algorithm, pw.toCharArray(), salt, rounds); in buildPasswordKey()
67 public static String buildPasswordHash(String algorithm, String pw, byte[] salt, int rounds) { in buildPasswordHash() argument
68 SecretKey key = buildPasswordKey(algorithm, pw, salt, rounds); in buildPasswordHash()
109 public static byte[] makeKeyChecksum(String algorithm, byte[] pwBytes, byte[] salt, in makeKeyChecksum() argument
116 Key checksum = buildCharArrayKey(algorithm, mkAsChar, salt, rounds); in makeKeyChecksum()
120 private static SecretKey buildCharArrayKey(String algorithm, char[] pwArray, byte[] salt, in buildCharArrayKey() argument
123 SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(algorithm); in buildCharArrayKey()
/aosp12/system/keymaster/contexts/
H A Dkeymaster2_passthrough_context.cpp42 KeyFactory* Keymaster2PassthroughContext::GetKeyFactory(keymaster_algorithm_t algorithm) const { in GetKeyFactory()
43 auto& result = factories_[algorithm]; in GetKeyFactory()
45 result.reset(new KeymasterPassthroughKeyFactory(engine_.get(), algorithm)); in GetKeyFactory()
50 Keymaster2PassthroughContext::GetOperationFactory(keymaster_algorithm_t algorithm, in GetOperationFactory() argument
52 auto keyfactory = GetKeyFactory(algorithm); in GetOperationFactory()
100 keymaster_algorithm_t algorithm; in ParseKeyBlob() local
101 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
102 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
107 auto factory = GetKeyFactory(algorithm); in ParseKeyBlob()
H A Dkeymaster1_passthrough_context.cpp56 KeyFactory* Keymaster1PassthroughContext::GetKeyFactory(keymaster_algorithm_t algorithm) const { in GetKeyFactory()
57 auto& result = factories_[algorithm]; in GetKeyFactory()
59 switch (algorithm) { in GetKeyFactory()
88 Keymaster1PassthroughContext::GetOperationFactory(keymaster_algorithm_t algorithm, in GetOperationFactory() argument
90 auto keyfactory = GetKeyFactory(algorithm); in GetOperationFactory()
167 keymaster_algorithm_t algorithm; in ParseKeyBlob() local
168 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
169 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
172 auto factory = GetKeyFactory(algorithm); in ParseKeyBlob()
H A Dsoft_keymaster_device.cpp137 for (auto algorithm : sig_algorithms) in map_digests() local
148 for (auto algorithm : crypt_algorithms) in map_digests() local
416 request.algorithm = algorithm; in get_supported_block_modes()
451 request.algorithm = algorithm; in get_supported_padding_modes()
484 request.algorithm = algorithm; in get_supported_digests()
515 request.algorithm = algorithm; in get_supported_import_formats()
546 request.algorithm = algorithm; in get_supported_export_formats()
640 switch (algorithm) { in RequiresSoftwareDigesting()
665 keymaster_algorithm_t algorithm; in KeyRequiresSoftwareDigesting() local
1128 if (algorithm == KM_ALGORITHM_HMAC) { in begin()
[all …]
H A 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()
H A Dsoft_keymaster_context.cpp94 KeyFactory* SoftKeymasterContext::GetKeyFactory(keymaster_algorithm_t algorithm) const { in GetKeyFactory()
95 switch (algorithm) { in GetKeyFactory()
120 OperationFactory* SoftKeymasterContext::GetOperationFactory(keymaster_algorithm_t algorithm, in GetOperationFactory() argument
122 KeyFactory* key_factory = GetKeyFactory(algorithm); in GetOperationFactory()
267 keymaster_algorithm_t algorithm; in ParseKeyBlob() local
268 if (!hw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm) && in ParseKeyBlob()
269 !sw_enforced.GetTagValue(TAG_ALGORITHM, &algorithm)) { in ParseKeyBlob()
272 auto factory = GetKeyFactory(algorithm); in ParseKeyBlob()
/aosp12/frameworks/base/core/java/android/security/net/config/
H A DPin.java39 public static boolean isSupportedDigestAlgorithm(String algorithm) { in isSupportedDigestAlgorithm() argument
42 return "SHA-256".equalsIgnoreCase(algorithm); in isSupportedDigestAlgorithm()
48 public static int getDigestLength(String algorithm) { in getDigestLength() argument
49 if ("SHA-256".equalsIgnoreCase(algorithm)) { in getDigestLength()
52 throw new IllegalArgumentException("Unsupported digest algorithm: " + algorithm); in getDigestLength()
H A DNetworkSecurityTrustManager.java131 for (String algorithm : pinAlgorithms) { in checkPins()
132 MessageDigest md = digestMap.get(algorithm); in checkPins()
135 md = MessageDigest.getInstance(algorithm); in checkPins()
139 digestMap.put(algorithm, md); in checkPins()
141 if (pinSet.pins.contains(new Pin(algorithm, md.digest(encodedSPKI)))) { in checkPins()
/aosp12/system/keymaster/include/keymaster/
H A 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,
/aosp12/system/keymaster/include/keymaster/contexts/
H A 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()
/aosp12/frameworks/base/keystore/java/android/security/keystore2/
H A DAndroidKeyStoreBCWorkaroundProvider.java244 private void putMacImpl(String algorithm, String implClass) { in putMacImpl() argument
245 put("Mac." + algorithm, implClass); in putMacImpl()
246 put("Mac." + algorithm + " SupportedKeyClasses", KEYSTORE_SECRET_KEY_CLASS_NAME); in putMacImpl()
260 private void putSignatureImpl(String algorithm, String implClass) { in putSignatureImpl() argument
261 put("Signature." + algorithm, implClass); in putSignatureImpl()
262 put("Signature." + algorithm + " SupportedKeyClasses", in putSignatureImpl()
H A DAndroidKeyStoreProvider.java142 private void putSecretKeyFactoryImpl(String algorithm) { in putSecretKeyFactoryImpl() argument
143 put("SecretKeyFactory." + algorithm, PACKAGE_NAME + ".AndroidKeyStoreSecretKeyFactorySpi"); in putSecretKeyFactoryImpl()
146 private void putKeyFactoryImpl(String algorithm) { in putKeyFactoryImpl() argument
147 put("KeyFactory." + algorithm, PACKAGE_NAME + ".AndroidKeyStoreKeyFactorySpi"); in putKeyFactoryImpl()
208 @NonNull KeyStoreSecurityLevel iSecurityLevel, int algorithm) in makeAndroidKeyStorePublicKeyFromKeyEntryResponse() argument
295 @NonNull KeyEntryResponse response, int algorithm, int digest) in makeAndroidKeyStoreSecretKeyFromKeyEntryResponse() argument
300 algorithm, digest); in makeAndroidKeyStoreSecretKeyFromKeyEntryResponse()
/aosp12/system/security/keystore2/src/
H A Dsuper_key.rs82 pub algorithm: SuperEncryptionAlgorithm, field
149 algorithm: SuperEncryptionAlgorithm, field
176 algorithm: SuperEncryptionAlgorithm, field
186 Ok(LockedKey { algorithm: to_encrypt.algorithm, id: to_encrypt.id, nonce, ciphertext }) in new()
222 Ok(Arc::new(SuperKey { algorithm: self.algorithm, key, id: self.id, reencrypt_with })) in decrypt()
457 match key.algorithm { in unwrap_key_with_key()
598 algorithm: SuperEncryptionAlgorithm, in populate_cache_from_super_key_blob()
612 algorithm: SuperEncryptionAlgorithm, in extract_super_key_from_key_entry()
648 algorithm, in extract_super_key_from_key_entry()
827 key_type.algorithm, in get_or_create_super_key()
[all …]
/aosp12/hardware/interfaces/usb/1.2/
H A DIUsb.hal30 * presence detection algorithm. Calling enableContaminantPresenceDetection
38 * @param enable true Enable contaminant presence detection algorithm.
39 * false Disable contaminant presence detection algorithm.
46 * presence protection algorithm. Calling
50 * Used to enable/disable contaminant presence protection algorithm.
57 * change in the status of contaminant presence protection algorithm.
/aosp12/frameworks/base/packages/BackupEncryption/proto/
H A Dwrapped_key.proto10 // Type of Cipher algorithm the key is used for.
17 // What kind of Cipher algorithm the key is used for. We assume at the moment
20 // change Cipher algorithm.
36 // Cipher algorithm used to wrap the key. We assume at the moment that this
38 // forwards compatibility if at some point we need to change Cipher algorithm.
/aosp12/frameworks/base/core/java/android/security/keystore/recovery/
H A DKeyDerivationParams.java101 private KeyDerivationParams(@KeyDerivationAlgorithm int algorithm, @NonNull byte[] salt) { in KeyDerivationParams() argument
102 this(algorithm, salt, /*memoryDifficulty=*/ -1); in KeyDerivationParams()
108 private KeyDerivationParams(@KeyDerivationAlgorithm int algorithm, @NonNull byte[] salt, in KeyDerivationParams() argument
110 mAlgorithm = algorithm; in KeyDerivationParams()
/aosp12/system/keymaster/cppcose/
H A Dcppcose.cpp195 auto& algorithm = parsedProtParams->asMap()->get(ALGORITHM); in verifyAndParseCoseSign1() local
196 if (!algorithm || !algorithm->asInt() || algorithm->asInt()->value() != EDDSA) { in verifyAndParseCoseSign1()
285 auto& algorithm = parsedProtParms->asMap()->get(ALGORITHM); in getSenderPubKeyFromCoseEncrypt() local
286 if (!algorithm || !algorithm->asInt() || algorithm->asInt()->value() != ECDH_ES_HKDF_256) { in getSenderPubKeyFromCoseEncrypt()
345 auto& algorithm = parsedProtParams->asMap()->get(ALGORITHM); in decryptCoseEncrypt() local
346 if (!algorithm || !algorithm->asInt() || algorithm->asInt()->value() != AES_GCM_256) { in decryptCoseEncrypt()
/aosp12/packages/apps/CertInstaller/src/com/android/certinstaller/
H A DUtil.java59 MessageDigest algorithm = MessageDigest.getInstance("MD5"); in toMd5() local
60 algorithm.reset(); in toMd5()
61 algorithm.update(bytes); in toMd5()
62 return toHexString(algorithm.digest(), ""); in toMd5()
/aosp12/frameworks/base/keystore/java/android/security/keystore/
H A DKeyProperties.java245 @NonNull @KeyAlgorithmEnum String algorithm) { in toKeymasterAsymmetricKeyAlgorithm()
246 if (KEY_ALGORITHM_EC.equalsIgnoreCase(algorithm)) { in toKeymasterAsymmetricKeyAlgorithm()
248 } else if (KEY_ALGORITHM_RSA.equalsIgnoreCase(algorithm)) { in toKeymasterAsymmetricKeyAlgorithm()
251 throw new IllegalArgumentException("Unsupported key algorithm: " + algorithm); in toKeymasterAsymmetricKeyAlgorithm()
270 @NonNull @KeyAlgorithmEnum String algorithm) { in toKeymasterSecretKeyAlgorithm()
271 if (KEY_ALGORITHM_AES.equalsIgnoreCase(algorithm)) { in toKeymasterSecretKeyAlgorithm()
273 } else if (KEY_ALGORITHM_3DES.equalsIgnoreCase(algorithm)) { in toKeymasterSecretKeyAlgorithm()
275 } else if (algorithm.toUpperCase(Locale.US).startsWith("HMAC")) { in toKeymasterSecretKeyAlgorithm()
279 "Unsupported secret key algorithm: " + algorithm); in toKeymasterSecretKeyAlgorithm()
318 public static int toKeymasterDigest(@NonNull @KeyAlgorithmEnum String algorithm) { in toKeymasterDigest() argument
[all …]
/aosp12/hardware/libhardware/include/hardware/
H A Dkeymaster1.h150 keymaster_algorithm_t algorithm,
169 keymaster_algorithm_t algorithm,
188 keymaster_algorithm_t algorithm,
207 keymaster_algorithm_t algorithm,
225 keymaster_algorithm_t algorithm,

12345678910