Home
last modified time | relevance | path

Searched refs:KeyProperties (Results 1 – 25 of 54) sorted by relevance

123

/aosp14/frameworks/base/keystore/java/android/security/keystore/
H A DKeyInfo.java70 private final @KeyProperties.OriginEnum int mOrigin;
74 private final @KeyProperties.PurposeEnum int mPurposes;
77 private final @KeyProperties.DigestEnum String[] mDigests;
95 @KeyProperties.OriginEnum int origin, in KeyInfo()
100 @KeyProperties.PurposeEnum int purposes, in KeyInfo()
103 @KeyProperties.DigestEnum String[] digests, in KeyInfo()
104 @KeyProperties.BlockModeEnum String[] blockModes, in KeyInfo()
107 @KeyProperties.AuthEnum int userAuthenticationType, in KeyInfo()
164 public @KeyProperties.OriginEnum int getOrigin() { in getOrigin()
211 public @KeyProperties.PurposeEnum int getPurposes() { in getPurposes()
[all …]
H A DKeyProtection.java222 private final @KeyProperties.PurposeEnum int mPurposes;
225 private final @KeyProperties.DigestEnum String[] mDigests;
246 @KeyProperties.PurposeEnum int purposes, in KeyProtection()
249 @KeyProperties.DigestEnum String[] digests, in KeyProtection()
250 @KeyProperties.BlockModeEnum String[] blockModes, in KeyProtection()
253 @KeyProperties.AuthEnum int userAuthenticationType, in KeyProtection()
327 public @KeyProperties.PurposeEnum int getPurposes() { in getPurposes()
366 public @KeyProperties.DigestEnum String[] getDigests() { in getDigests()
583 private @KeyProperties.PurposeEnum int mPurposes;
590 private @KeyProperties.DigestEnum String[] mDigests;
[all …]
H A DKeyGenParameterSpec.java291 private final @KeyProperties.Namespace int mNamespace;
301 private final @KeyProperties.PurposeEnum int mPurposes;
336 @KeyProperties.Namespace int namespace, in KeyGenParameterSpec()
346 @KeyProperties.PurposeEnum int purposes, in KeyGenParameterSpec()
347 @KeyProperties.DigestEnum String[] digests, in KeyGenParameterSpec()
472 public @KeyProperties.Namespace int getNamespace() { in getNamespace()
563 public @KeyProperties.PurposeEnum int getPurposes() { in getPurposes()
578 public @KeyProperties.DigestEnum String[] getDigests() { in getDigests()
903 private @KeyProperties.PurposeEnum int mPurposes;
905 private @KeyProperties.Namespace int mNamespace = KeyProperties.NAMESPACE_APPLICATION;
[all …]
/aosp14/frameworks/base/keystore/java/android/security/keystore2/
H A DAndroidKeyStoreKeyPairGeneratorSpi.java40 import android.security.keystore.KeyProperties;
388 final int allowedPurposes = KeyProperties.PURPOSE_SIGN | KeyProperties.PURPOSE_VERIFY in hasOnlyAllowedPurposeForEd25519()
389 | KeyProperties.PURPOSE_ATTEST_KEY; in hasOnlyAllowedPurposeForEd25519()
474 KeyProperties.PURPOSE_SIGN in buildKeyGenParameterSpecFromLegacy()
479 KeyProperties.DIGEST_NONE, in buildKeyGenParameterSpecFromLegacy()
480 KeyProperties.DIGEST_SHA1, in buildKeyGenParameterSpecFromLegacy()
481 KeyProperties.DIGEST_SHA224, in buildKeyGenParameterSpecFromLegacy()
482 KeyProperties.DIGEST_SHA256, in buildKeyGenParameterSpecFromLegacy()
495 KeyProperties.DIGEST_NONE, in buildKeyGenParameterSpecFromLegacy()
496 KeyProperties.DIGEST_MD5, in buildKeyGenParameterSpecFromLegacy()
[all …]
H A DAndroidKeyStoreSpi.java34 import android.security.keystore.KeyProperties;
114 private @KeyProperties.Namespace int mNamespace = KeyProperties.NAMESPACE_APPLICATION;
293 KeyProperties.PURPOSE_SIGN | KeyProperties.PURPOSE_VERIFY); in getLegacyKeyProtectionParameter()
297 KeyProperties.DIGEST_NONE, in getLegacyKeyProtectionParameter()
298 KeyProperties.DIGEST_SHA1, in getLegacyKeyProtectionParameter()
299 KeyProperties.DIGEST_SHA224, in getLegacyKeyProtectionParameter()
300 KeyProperties.DIGEST_SHA256, in getLegacyKeyProtectionParameter()
312 KeyProperties.DIGEST_NONE, in getLegacyKeyProtectionParameter()
313 KeyProperties.DIGEST_MD5, in getLegacyKeyProtectionParameter()
314 KeyProperties.DIGEST_SHA1, in getLegacyKeyProtectionParameter()
[all …]
H A DAndroidKeyStoreSecretKeyFactorySpi.java26 import android.security.keystore.KeyProperties;
75 @KeyProperties.SecurityLevelEnum int securityLevel = in getKeyInfo()
76 KeyProperties.SECURITY_LEVEL_SOFTWARE; in getKeyInfo()
78 @KeyProperties.OriginEnum int origin = -1; in getKeyInfo()
80 @KeyProperties.PurposeEnum int purposes = 0; in getKeyInfo()
98 int remainingUsageCount = KeyProperties.UNRESTRICTED_USAGE_COUNT; in getKeyInfo()
106 origin = KeyProperties.Origin.fromKeymaster( in getKeyInfo()
118 purposes |= KeyProperties.Purpose.fromKeymaster( in getKeyInfo()
126 @KeyProperties.SignaturePaddingEnum String padding = in getKeyInfo()
142 digestsList.add(KeyProperties.Digest.fromKeymaster( in getKeyInfo()
[all …]
H A DAndroidKeyStoreKeyGeneratorSpi.java26 import android.security.keystore.KeyProperties;
195 mKeymasterPaddings = KeyProperties.EncryptionPadding.allToKeymaster( in engineInit()
202 if (((spec.getPurposes() & KeyProperties.PURPOSE_ENCRYPT) != 0) in engineInit()
238 KeyProperties.Digest.allToKeymaster(spec.getDigests()); in engineInit()
244 + KeyProperties.Digest.fromKeymaster(mKeymasterDigest) in engineInit()
332 + KeyProperties.Digest.fromKeymaster(mKeymasterDigests[0])); in engineGenerateKey()
359 if (((spec.getPurposes() & KeyProperties.PURPOSE_ENCRYPT) != 0) in engineGenerateKey()
367 if (spec.getMaxUsageCount() != KeyProperties.UNRESTRICTED_USAGE_COUNT) { in engineGenerateKey()
391 descriptor.domain = descriptor.nspace == KeyProperties.NAMESPACE_APPLICATION in engineGenerateKey()
416 @KeyProperties.KeyAlgorithmEnum String keyAlgorithmJCA; in engineGenerateKey()
[all …]
H A DAndroidKeyStoreLoadStoreParameter.java19 import android.security.keystore.KeyProperties;
29 private final @KeyProperties.Namespace int mNamespace;
31 public AndroidKeyStoreLoadStoreParameter(@KeyProperties.Namespace int namespace) { in AndroidKeyStoreLoadStoreParameter()
40 @KeyProperties.Namespace int getNamespace() { in getNamespace()
H A DAndroidKeyStoreRSACipherSpi.java23 import android.security.keystore.KeyProperties;
201 keymasterDigest = KeyProperties.Digest.toKeymaster(jcaDigest); in initAlgorithmSpecificParameters()
243 mKeymasterMgf1Digest = KeyProperties.Digest.toKeymaster(mgf1JcaDigest); in initAlgorithmSpecificParameters()
273 KeyProperties.Digest.fromKeymaster(mKeymasterDigest), in engineGetParameters()
275 KeyProperties.Digest.fromKeymasterToMGF1ParameterSpec(mKeymasterMgf1Digest), in engineGetParameters()
398 return "RSA/ECB/" + KeyProperties.EncryptionPadding.fromKeymaster(mKeymasterPadding); in getTransform()
406 if (!KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(key.getAlgorithm())) { in initKey()
408 + ". Only " + KeyProperties.KEY_ALGORITHM_RSA + " supported"); in initKey()
432 + KeyProperties.EncryptionPadding.fromKeymaster(mKeymasterPadding) in initKey()
452 + KeyProperties.EncryptionPadding.fromKeymaster(mKeymasterPadding) in initKey()
H A DAndroidKeyStoreProvider.java25 import android.security.keystore.KeyProperties;
236 if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(jcaKeyAlgorithm)) { in makeAndroidKeyStorePublicKeyFromKeyEntryResponse()
239 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(jcaKeyAlgorithm)) { in makeAndroidKeyStorePublicKeyFromKeyEntryResponse()
318 @KeyProperties.KeyAlgorithmEnum String keyAlgorithmString; in makeAndroidKeyStoreSecretKeyFromKeyEntryResponse()
320 keyAlgorithmString = KeyProperties.KeyAlgorithm.fromKeymasterSecretKeyAlgorithm( in makeAndroidKeyStoreSecretKeyFromKeyEntryResponse()
350 if (namespace == KeyProperties.NAMESPACE_APPLICATION) { in loadAndroidKeyStoreKeyFromKeystore()
351 descriptor.nspace = KeyProperties.NAMESPACE_APPLICATION; // ignored; in loadAndroidKeyStoreKeyFromKeystore()
H A DAndroidKeyStoreECPrivateKey.java21 import android.security.keystore.KeyProperties;
42 super(descriptor, keyId, authorizations, KeyProperties.KEY_ALGORITHM_EC, securityLevel); in AndroidKeyStoreECPrivateKey()
H A DAndroidKeyStoreRSAPrivateKey.java21 import android.security.keystore.KeyProperties;
43 super(descriptor, keyId, authorizations, KeyProperties.KEY_ALGORITHM_RSA, securityLevel); in AndroidKeyStoreRSAPrivateKey()
/aosp14/frameworks/base/services/core/java/com/android/server/locksettings/
H A DSyntheticPasswordCrypto.java20 import android.security.keystore.KeyProperties;
71 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in decrypt()
72 + KeyProperties.BLOCK_MODE_GCM + "/" + KeyProperties.ENCRYPTION_PADDING_NONE); in decrypt()
85 KeyProperties.KEY_ALGORITHM_AES + "/" + KeyProperties.BLOCK_MODE_GCM + "/" in encrypt()
86 + KeyProperties.ENCRYPTION_PADDING_NONE); in encrypt()
104 KeyProperties.KEY_ALGORITHM_AES); in encrypt()
118 KeyProperties.KEY_ALGORITHM_AES); in decrypt()
155 return KeyProperties.NAMESPACE_LOCKSETTINGS; in keyNamespace()
209 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in createBlob()
210 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in createBlob()
[all …]
H A DRebootEscrowKeyStoreManager.java20 import android.security.keystore.KeyProperties;
109 KeyProperties.KEY_ALGORITHM_AES, AndroidKeyStoreSpi.NAME); in generateKeyStoreEncryptionKeyIfNeeded()
112 KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in generateKeyStoreEncryptionKeyIfNeeded()
114 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generateKeyStoreEncryptionKeyIfNeeded()
115 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE); in generateKeyStoreEncryptionKeyIfNeeded()
H A DManagedProfilePasswordCache.java22 import android.security.keystore.KeyProperties;
89 generator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES, in storePassword()
92 keyName, KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in storePassword()
94 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in storePassword()
96 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in storePassword()
/aosp14/frameworks/base/keystore/tests/src/android/security/
H A DParcelableKeyGenParameterSpecTest.java25 import android.security.keystore.KeyProperties;
45 static final int KEY_PURPOSES = KeyProperties.PURPOSE_SIGN | KeyProperties.PURPOSE_VERIFY;
54 static final String DIGEST = KeyProperties.DIGEST_SHA256;
55 static final String ENCRYPTION_PADDING = KeyProperties.ENCRYPTION_PADDING_RSA_PKCS1;
56 static final String SIGNATURE_PADDING = KeyProperties.SIGNATURE_PADDING_RSA_PSS;
57 static final String BLOCK_MODE = KeyProperties.BLOCK_MODE_CBC;
63 .setNamespace(KeyProperties.NAMESPACE_WIFI) in configureDefaultSpec()
91 @KeyProperties.Namespace int namespace, String alias) { in validateSpecValues()
137 validateSpecValues(fromParcel.getSpec(), KeyProperties.NAMESPACE_WIFI, ALIAS); in testParcelingWithAllValues()
/aosp14/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
H A DApplicationKeyStorage.java25 import android.security.keystore.KeyProperties;
88 new SecretKeySpec(secretKey, KeyProperties.KEY_ALGORITHM_AES)), in setSymmetricKeyEntry()
90 KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in setSymmetricKeyEntry()
91 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in setSymmetricKeyEntry()
92 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in setSymmetricKeyEntry()
130 key.nspace = KeyProperties.NAMESPACE_APPLICATION; in makeKeystoreEngineGrantString()
/aosp14/frameworks/base/services/companion/java/com/android/server/companion/securechannel/
H A DKeyStoreUtils.java19 import static android.security.keystore.KeyProperties.DIGEST_SHA256;
20 import static android.security.keystore.KeyProperties.KEY_ALGORITHM_EC;
21 import static android.security.keystore.KeyProperties.PURPOSE_SIGN;
22 import static android.security.keystore.KeyProperties.PURPOSE_VERIFY;
/aosp14/frameworks/base/services/core/java/com/android/server/security/
H A DAttestationVerificationSelfTrustedVerifierForTesting.java28 import android.security.keystore.KeyProperties;
121 KeyPairGenerator.getInstance(KeyProperties.KEY_ALGORITHM_EC, ANDROID_KEYSTORE); in AttestationVerificationSelfTrustedVerifierForTesting()
123 GOLDEN_ALIAS, KeyProperties.PURPOSE_SIGN | KeyProperties.PURPOSE_VERIFY) in AttestationVerificationSelfTrustedVerifierForTesting()
125 .setDigests(KeyProperties.DIGEST_SHA256, KeyProperties.DIGEST_SHA512).build(); in AttestationVerificationSelfTrustedVerifierForTesting()
/aosp14/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
H A DPlatformKeyManager.java25 import android.security.keystore.KeyProperties;
425 new KeyProtection.Builder(KeyProperties.PURPOSE_DECRYPT) in generateAndLoadKey()
426 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generateAndLoadKey()
427 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE); in generateAndLoadKey()
442 new KeyProtection.Builder(KeyProperties.PURPOSE_ENCRYPT) in generateAndLoadKey()
443 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generateAndLoadKey()
444 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in generateAndLoadKey()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
H A DPlatformKeyManagerTest.java36 import android.security.keystore.KeyProperties;
136 assertEquals(KeyProperties.PURPOSE_ENCRYPT, getEncryptKeyProtection().getPurposes()); in init_createsEncryptKeyWithCorrectPurposes()
144 new String[] { KeyProperties.ENCRYPTION_PADDING_NONE }, in init_createsEncryptKeyWithCorrectPaddings()
153 new String[] { KeyProperties.BLOCK_MODE_GCM }, in init_createsEncryptKeyWithCorrectBlockModes()
178 assertEquals(KeyProperties.PURPOSE_DECRYPT, getDecryptKeyProtection().getPurposes()); in init_createsDecryptKeyWithCorrectPurposes()
186 new String[] { KeyProperties.ENCRYPTION_PADDING_NONE }, in init_createsDecryptKeyWithCorrectPaddings()
195 new String[] { KeyProperties.BLOCK_MODE_GCM }, in init_createsDecryptKeyWithCorrectBlockModes()
583 KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in generateAndroidKeyStoreKey()
584 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generateAndroidKeyStoreKey()
585 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in generateAndroidKeyStoreKey()
H A DRecoverableKeyGeneratorTest.java27 import android.security.keystore.KeyProperties;
176 WRAPPING_KEY_ALIAS, KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in generatePlatformKey()
177 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generatePlatformKey()
178 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in generatePlatformKey()
H A DWrappedKeyTest.java25 import android.security.keystore.KeyProperties;
205 KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in generateAndroidKeyStoreKey()
206 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generateAndroidKeyStoreKey()
207 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in generateAndroidKeyStoreKey()
/aosp14/frameworks/base/tests/AttestationVerificationTest/src/android/security/attestationverification/
H A DSystemAttestationVerificationTest.kt23 import android.security.keystore.KeyProperties
191 KeyProperties.KEY_ALGORITHM_EC,
196 KeyProperties.PURPOSE_SIGN or KeyProperties.PURPOSE_VERIFY
200 setDigests(KeyProperties.DIGEST_SHA256, KeyProperties.DIGEST_SHA512)
/aosp14/frameworks/base/keystore/java/android/security/
H A DKeyPairGeneratorSpec.java24 import android.security.keystore.KeyProperties;
167 public @KeyProperties.KeyAlgorithmEnum String getKeyType() { in getKeyType()
331 public Builder setKeyType(@NonNull @KeyProperties.KeyAlgorithmEnum String keyType) in setKeyType()
337 KeyProperties.KeyAlgorithm.toKeymasterAsymmetricKeyAlgorithm(keyType); in setKeyType()

123