Home
last modified time | relevance | path

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

12

/frameworks/base/keystore/java/android/security/keystore/
DKeyProtection.java221 private final @KeyProperties.PurposeEnum int mPurposes;
222 private final @KeyProperties.EncryptionPaddingEnum String[] mEncryptionPaddings;
223 private final @KeyProperties.SignaturePaddingEnum String[] mSignaturePaddings;
224 private final @KeyProperties.DigestEnum String[] mDigests;
225 private final @KeyProperties.BlockModeEnum String[] mBlockModes;
228 private final @KeyProperties.AuthEnum int mUserAuthenticationType;
243 @KeyProperties.PurposeEnum int purposes, in KeyProtection()
244 @KeyProperties.EncryptionPaddingEnum String[] encryptionPaddings, in KeyProtection()
245 @KeyProperties.SignaturePaddingEnum String[] signaturePaddings, in KeyProtection()
246 @KeyProperties.DigestEnum String[] digests, in KeyProtection()
[all …]
DKeyInfo.java70 private final @KeyProperties.OriginEnum int mOrigin;
74 private final @KeyProperties.PurposeEnum int mPurposes;
75 private final @KeyProperties.EncryptionPaddingEnum String[] mEncryptionPaddings;
76 private final @KeyProperties.SignaturePaddingEnum String[] mSignaturePaddings;
77 private final @KeyProperties.DigestEnum String[] mDigests;
78 private final @KeyProperties.BlockModeEnum String[] mBlockModes;
81 private final @KeyProperties.AuthEnum int mUserAuthenticationType;
93 @KeyProperties.OriginEnum int origin, in KeyInfo()
98 @KeyProperties.PurposeEnum int purposes, in KeyInfo()
99 @KeyProperties.EncryptionPaddingEnum String[] encryptionPaddings, in KeyInfo()
[all …]
DKeyGenParameterSpec.java258 private final @KeyProperties.PurposeEnum int mPurposes;
259 private final @KeyProperties.DigestEnum String[] mDigests;
260 private final @KeyProperties.EncryptionPaddingEnum String[] mEncryptionPaddings;
261 private final @KeyProperties.SignaturePaddingEnum String[] mSignaturePaddings;
262 private final @KeyProperties.BlockModeEnum String[] mBlockModes;
266 private final @KeyProperties.AuthEnum int mUserAuthenticationType;
297 @KeyProperties.PurposeEnum int purposes, in KeyGenParameterSpec()
298 @KeyProperties.DigestEnum String[] digests, in KeyGenParameterSpec()
299 @KeyProperties.EncryptionPaddingEnum String[] encryptionPaddings, in KeyGenParameterSpec()
300 @KeyProperties.SignaturePaddingEnum String[] signaturePaddings, in KeyGenParameterSpec()
[all …]
DAndroidKeyStoreSpi.java27 import android.security.keystore.KeyProperties;
306 if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm)) { in getLegacyKeyProtectionParameter()
309 KeyProperties.PURPOSE_SIGN | KeyProperties.PURPOSE_VERIFY); in getLegacyKeyProtectionParameter()
313 KeyProperties.DIGEST_NONE, in getLegacyKeyProtectionParameter()
314 KeyProperties.DIGEST_SHA1, in getLegacyKeyProtectionParameter()
315 KeyProperties.DIGEST_SHA224, in getLegacyKeyProtectionParameter()
316 KeyProperties.DIGEST_SHA256, in getLegacyKeyProtectionParameter()
317 KeyProperties.DIGEST_SHA384, in getLegacyKeyProtectionParameter()
318 KeyProperties.DIGEST_SHA512); in getLegacyKeyProtectionParameter()
319 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in getLegacyKeyProtectionParameter()
[all …]
DAndroidKeyStoreKeyPairGeneratorSpi.java158 private @KeyProperties.KeyAlgorithmEnum String mJcaKeyAlgorithm;
212 KeyProperties.KeyAlgorithm.toKeymasterAsymmetricKeyAlgorithm( in initialize()
223 KeyProperties.PURPOSE_SIGN in initialize()
224 | KeyProperties.PURPOSE_VERIFY); in initialize()
228 KeyProperties.DIGEST_NONE, in initialize()
229 KeyProperties.DIGEST_SHA1, in initialize()
230 KeyProperties.DIGEST_SHA224, in initialize()
231 KeyProperties.DIGEST_SHA256, in initialize()
232 KeyProperties.DIGEST_SHA384, in initialize()
233 KeyProperties.DIGEST_SHA512); in initialize()
[all …]
DAndroidKeyStoreSecretKeyFactorySpi.java90 @KeyProperties.OriginEnum int origin; in getKeyInfo()
92 @KeyProperties.PurposeEnum int purposes; in getKeyInfo()
95 @KeyProperties.DigestEnum String[] digests; in getKeyInfo()
96 @KeyProperties.BlockModeEnum String[] blockModes; in getKeyInfo()
103 origin = KeyProperties.Origin.fromKeymaster( in getKeyInfo()
107 origin = KeyProperties.Origin.fromKeymaster( in getKeyInfo()
120 purposes = KeyProperties.Purpose.allFromKeymaster( in getKeyInfo()
128 @KeyProperties.EncryptionPaddingEnum String jcaPadding = in getKeyInfo()
129 KeyProperties.EncryptionPadding.fromKeymaster(keymasterPadding); in getKeyInfo()
133 @KeyProperties.SignaturePaddingEnum String padding = in getKeyInfo()
[all …]
DAndroidKeyStoreKeyGeneratorSpi.java25 import android.security.keystore.KeyProperties;
184 mKeymasterPurposes = KeyProperties.Purpose.allToKeymaster(spec.getPurposes()); in engineInit()
185 mKeymasterPaddings = KeyProperties.EncryptionPadding.allToKeymaster( in engineInit()
191 mKeymasterBlockModes = KeyProperties.BlockMode.allToKeymaster(spec.getBlockModes()); in engineInit()
192 if (((spec.getPurposes() & KeyProperties.PURPOSE_ENCRYPT) != 0) in engineInit()
200 + KeyProperties.BlockMode.fromKeymaster(keymasterBlockMode) in engineInit()
228 KeyProperties.Digest.allToKeymaster(spec.getDigests()); in engineInit()
234 + KeyProperties.Digest.fromKeymaster(mKeymasterDigest) in engineInit()
241 mKeymasterDigests = KeyProperties.Digest.allToKeymaster(spec.getDigests()); in engineInit()
298 if (((spec.getPurposes() & KeyProperties.PURPOSE_ENCRYPT) != 0) in engineGenerateKey()
[all …]
DAndroidKeyStoreRSACipherSpi.java199 keymasterDigest = KeyProperties.Digest.toKeymaster(jcaDigest); in initAlgorithmSpecificParameters()
227 if (!KeyProperties.DIGEST_SHA1.equalsIgnoreCase(mgf1JcaDigest)) { in initAlgorithmSpecificParameters()
230 + ". Only " + KeyProperties.DIGEST_SHA1 + " supported"); in initAlgorithmSpecificParameters()
275 KeyProperties.Digest.fromKeymaster(mKeymasterDigest), in engineGetParameters()
361 if (!KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(key.getAlgorithm())) { in initKey()
363 + ". Only " + KeyProperties.KEY_ALGORITHM_RSA + " supported"); in initKey()
387 + KeyProperties.EncryptionPadding.fromKeymaster(mKeymasterPadding) in initKey()
407 + KeyProperties.EncryptionPadding.fromKeymaster(mKeymasterPadding) in initKey()
DKeymasterUtils.java87 if (spec.getUserAuthenticationType() == (KeyProperties.AUTH_BIOMETRIC_STRONG in addSids()
88 | KeyProperties.AUTH_DEVICE_CREDENTIAL)) { in addSids()
100 if ((spec.getUserAuthenticationType() & KeyProperties.AUTH_BIOMETRIC_STRONG) != 0) { in addSids()
128 } else if ((spec.getUserAuthenticationType() & KeyProperties.AUTH_DEVICE_CREDENTIAL) in addSids()
226 + KeyProperties.Digest.fromKeymaster(keymasterDigest)); in addMinMacLengthAuthorizationIfNecessary()
DAndroidKeyStoreProvider.java196 @NonNull @KeyProperties.KeyAlgorithmEnum String keyAlgorithm, in getAndroidKeyStorePublicKey()
208 if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm)) { in getAndroidKeyStorePublicKey()
210 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in getAndroidKeyStorePublicKey()
222 if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(keyAlgorithm)) { in getAndroidKeyStorePrivateKey()
225 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(keyAlgorithm)) { in getAndroidKeyStorePrivateKey()
276 jcaKeyAlgorithm = KeyProperties.KeyAlgorithm.fromKeymasterAsymmetricKeyAlgorithm( in loadAndroidKeyStorePublicKeyFromKeystore()
357 @KeyProperties.KeyAlgorithmEnum String keyAlgorithmString; in loadAndroidKeyStoreSecretKeyFromKeystore()
359 keyAlgorithmString = KeyProperties.KeyAlgorithm.fromKeymasterSecretKeyAlgorithm( in loadAndroidKeyStoreSecretKeyFromKeystore()
DAndroidKeyStoreRSASignatureSpi.java140 if (!KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(key.getAlgorithm())) { in initKey()
142 + ". Only" + KeyProperties.KEY_ALGORITHM_RSA + " supported"); in initKey()
DUserAuthArgs.java31 @KeyProperties.AuthEnum int getUserAuthenticationType(); in getUserAuthenticationType()
/frameworks/base/services/core/java/com/android/server/locksettings/
DSyntheticPasswordCrypto.java19 import android.security.keystore.KeyProperties;
65 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in decrypt()
66 + KeyProperties.BLOCK_MODE_GCM + "/" + KeyProperties.ENCRYPTION_PADDING_NONE); in decrypt()
79 KeyProperties.KEY_ALGORITHM_AES + "/" + KeyProperties.BLOCK_MODE_GCM + "/" in encrypt()
80 + KeyProperties.ENCRYPTION_PADDING_NONE); in encrypt()
101 KeyProperties.KEY_ALGORITHM_AES); in encrypt()
115 KeyProperties.KEY_ALGORITHM_AES); in decrypt()
166 KeyGenerator keyGenerator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES); in createBlob()
171 KeyProtection.Builder builder = new KeyProtection.Builder(KeyProperties.PURPOSE_DECRYPT) in createBlob()
172 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in createBlob()
[all …]
DManagedProfilePasswordCache.java25 import android.security.keystore.KeyProperties;
97 generator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES, in storePassword()
100 keyName, KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in storePassword()
102 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in storePassword()
103 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in storePassword()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
DApplicationKeyStorage.java24 import android.security.keystore.KeyProperties;
86 new SecretKeySpec(secretKey, KeyProperties.KEY_ALGORITHM_AES)), in setSymmetricKeyEntry()
88 KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in setSymmetricKeyEntry()
89 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in setSymmetricKeyEntry()
90 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in setSymmetricKeyEntry()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DWifiConfigStoreEncryptionUtil.java24 import android.security.keystore.KeyProperties;
158 .getInstance(KeyProperties.KEY_ALGORITHM_AES, KEY_STORE); in getOrCreateSecretKey()
161 KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in getOrCreateSecretKey()
162 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in getOrCreateSecretKey()
163 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in getOrCreateSecretKey()
/frameworks/base/keystore/tests/src/android/security/
DParcelableKeyGenParameterSpecTest.java25 import android.security.keystore.KeyProperties;
45 static final int KEY_PURPOSES = KeyProperties.PURPOSE_SIGN | KeyProperties.PURPOSE_VERIFY;
55 static final String DIGEST = KeyProperties.DIGEST_SHA256;
56 static final String ENCRYPTION_PADDING = KeyProperties.ENCRYPTION_PADDING_RSA_PKCS1;
57 static final String SIGNATURE_PADDING = KeyProperties.SIGNATURE_PADDING_RSA_PSS;
58 static final String BLOCK_MODE = KeyProperties.BLOCK_MODE_CBC;
/frameworks/base/keystore/tests/src/android/security/keystore/
DKeyGenParameterSpecTest.java25 import android.security.keystore.KeyProperties;
36 static final int KEY_PURPOSES = KeyProperties.PURPOSE_SIGN | KeyProperties.PURPOSE_VERIFY;
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DPlatformKeyManager.java26 import android.security.keystore.KeyProperties;
430 new KeyProtection.Builder(KeyProperties.PURPOSE_DECRYPT) in generateAndLoadKey()
431 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generateAndLoadKey()
432 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE); in generateAndLoadKey()
461 new KeyProtection.Builder(KeyProperties.PURPOSE_ENCRYPT) in generateAndLoadKey()
462 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generateAndLoadKey()
463 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in generateAndLoadKey()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DRecoverableKeyGeneratorTest.java28 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()
DPlatformKeyManagerTest.java39 import android.security.keystore.KeyProperties;
138 assertEquals(KeyProperties.PURPOSE_ENCRYPT, getEncryptKeyProtection().getPurposes()); in init_createsEncryptKeyWithCorrectPurposes()
146 new String[] { KeyProperties.ENCRYPTION_PADDING_NONE }, in init_createsEncryptKeyWithCorrectPaddings()
155 new String[] { KeyProperties.BLOCK_MODE_GCM }, in init_createsEncryptKeyWithCorrectBlockModes()
180 assertEquals(KeyProperties.PURPOSE_DECRYPT, getDecryptKeyProtection().getPurposes()); in init_createsDecryptKeyWithCorrectPurposes()
188 new String[] { KeyProperties.ENCRYPTION_PADDING_NONE }, in init_createsDecryptKeyWithCorrectPaddings()
197 new String[] { KeyProperties.BLOCK_MODE_GCM }, in init_createsDecryptKeyWithCorrectBlockModes()
594 KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in generateAndroidKeyStoreKey()
595 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generateAndroidKeyStoreKey()
596 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in generateAndroidKeyStoreKey()
DWrappedKeyTest.java26 import android.security.keystore.KeyProperties;
206 KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in generateAndroidKeyStoreKey()
207 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generateAndroidKeyStoreKey()
208 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in generateAndroidKeyStoreKey()
/frameworks/base/keystore/java/android/security/
DKeyPairGeneratorSpec.java24 import android.security.keystore.KeyProperties;
170 public @KeyProperties.KeyAlgorithmEnum String getKeyType() { in getKeyType()
330 public Builder setKeyType(@NonNull @KeyProperties.KeyAlgorithmEnum String keyType) in setKeyType()
336 KeyProperties.KeyAlgorithm.toKeymasterAsymmetricKeyAlgorithm(keyType); in setKeyType()
DKeyChain.java40 import android.security.keystore.KeyProperties;
431 @Nullable @KeyProperties.KeyAlgorithmEnum String[] keyTypes, in choosePrivateKeyAlias()
486 @Nullable @KeyProperties.KeyAlgorithmEnum String[] keyTypes, in choosePrivateKeyAlias()
704 @NonNull @KeyProperties.KeyAlgorithmEnum String algorithm) { in isKeyAlgorithmSupported()
706 return KeyProperties.KEY_ALGORITHM_EC.equals(algUpper) in isKeyAlgorithmSupported()
707 || KeyProperties.KEY_ALGORITHM_RSA.equals(algUpper); in isKeyAlgorithmSupported()
731 @NonNull @KeyProperties.KeyAlgorithmEnum String algorithm) { in isBoundKeyAlgorithm()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DMacAddressUtil.java22 import android.security.keystore.KeyProperties;
136 KeyProperties.KEY_ALGORITHM_HMAC_SHA256, "AndroidKeyStore"); in generateAndPersistNewMacRandomizationSecret()
139 KeyProperties.PURPOSE_SIGN) in generateAndPersistNewMacRandomizationSecret()

12