/aosp12/frameworks/base/keystore/java/android/security/keystore/ |
H A D | KeyInfo.java | 70 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 D | KeyProtection.java | 222 private final @KeyProperties.PurposeEnum int mPurposes; 225 private final @KeyProperties.DigestEnum String[] mDigests; 245 @KeyProperties.PurposeEnum int purposes, in KeyProtection() 248 @KeyProperties.DigestEnum String[] digests, in KeyProtection() 249 @KeyProperties.BlockModeEnum String[] blockModes, in KeyProtection() 252 @KeyProperties.AuthEnum int userAuthenticationType, in KeyProtection() 324 public @KeyProperties.PurposeEnum int getPurposes() { in getPurposes() 363 public @KeyProperties.DigestEnum String[] getDigests() { in getDigests() 569 private @KeyProperties.PurposeEnum int mPurposes; 576 private @KeyProperties.DigestEnum String[] mDigests; [all …]
|
H A D | KeyGenParameterSpec.java | 291 private final @KeyProperties.Namespace int mNamespace; 301 private final @KeyProperties.PurposeEnum int mPurposes; 334 @KeyProperties.Namespace int namespace, in KeyGenParameterSpec() 344 @KeyProperties.PurposeEnum int purposes, in KeyGenParameterSpec() 345 @KeyProperties.DigestEnum String[] digests, in KeyGenParameterSpec() 468 public @KeyProperties.Namespace int getNamespace() { in getNamespace() 559 public @KeyProperties.PurposeEnum int getPurposes() { in getPurposes() 574 public @KeyProperties.DigestEnum String[] getDigests() { in getDigests() 889 private @KeyProperties.PurposeEnum int mPurposes; 891 private @KeyProperties.Namespace int mNamespace = KeyProperties.NAMESPACE_APPLICATION; [all …]
|
/aosp12/frameworks/base/keystore/java/android/security/keystore2/ |
H A D | AndroidKeyStoreSpi.java | 31 import android.security.keystore.KeyProperties; 104 private @KeyProperties.Namespace int mNamespace = KeyProperties.NAMESPACE_APPLICATION; 283 KeyProperties.PURPOSE_SIGN | KeyProperties.PURPOSE_VERIFY); in getLegacyKeyProtectionParameter() 287 KeyProperties.DIGEST_NONE, in getLegacyKeyProtectionParameter() 288 KeyProperties.DIGEST_SHA1, in getLegacyKeyProtectionParameter() 289 KeyProperties.DIGEST_SHA224, in getLegacyKeyProtectionParameter() 290 KeyProperties.DIGEST_SHA256, in getLegacyKeyProtectionParameter() 302 KeyProperties.DIGEST_NONE, in getLegacyKeyProtectionParameter() 303 KeyProperties.DIGEST_MD5, in getLegacyKeyProtectionParameter() 304 KeyProperties.DIGEST_SHA1, in getLegacyKeyProtectionParameter() [all …]
|
H A D | AndroidKeyStoreKeyPairGeneratorSpi.java | 42 import android.security.keystore.KeyProperties; 399 KeyProperties.PURPOSE_SIGN in buildKeyGenParameterSpecFromLegacy() 404 KeyProperties.DIGEST_NONE, in buildKeyGenParameterSpecFromLegacy() 405 KeyProperties.DIGEST_SHA1, in buildKeyGenParameterSpecFromLegacy() 406 KeyProperties.DIGEST_SHA224, in buildKeyGenParameterSpecFromLegacy() 407 KeyProperties.DIGEST_SHA256, in buildKeyGenParameterSpecFromLegacy() 408 KeyProperties.DIGEST_SHA384, in buildKeyGenParameterSpecFromLegacy() 420 KeyProperties.DIGEST_NONE, in buildKeyGenParameterSpecFromLegacy() 421 KeyProperties.DIGEST_MD5, in buildKeyGenParameterSpecFromLegacy() 422 KeyProperties.DIGEST_SHA1, in buildKeyGenParameterSpecFromLegacy() [all …]
|
H A D | AndroidKeyStoreSecretKeyFactorySpi.java | 26 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 D | AndroidKeyStoreKeyGeneratorSpi.java | 26 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 D | AndroidKeyStoreLoadStoreParameter.java | 19 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 D | AndroidKeyStoreRSACipherSpi.java | 23 import android.security.keystore.KeyProperties; 200 keymasterDigest = KeyProperties.Digest.toKeymaster(jcaDigest); in initAlgorithmSpecificParameters() 228 if (!KeyProperties.DIGEST_SHA1.equalsIgnoreCase(mgf1JcaDigest)) { in initAlgorithmSpecificParameters() 231 + ". Only " + KeyProperties.DIGEST_SHA1 + " supported"); in initAlgorithmSpecificParameters() 276 KeyProperties.Digest.fromKeymaster(mKeymasterDigest), in engineGetParameters() 380 return "RSA/ECB/" + KeyProperties.EncryptionPadding.fromKeymaster(mKeymasterPadding); in getTransform() 388 if (!KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(key.getAlgorithm())) { in initKey() 390 + ". Only " + KeyProperties.KEY_ALGORITHM_RSA + " supported"); in initKey() 414 + KeyProperties.EncryptionPadding.fromKeymaster(mKeymasterPadding) in initKey() 434 + KeyProperties.EncryptionPadding.fromKeymaster(mKeymasterPadding) in initKey()
|
H A D | AndroidKeyStoreProvider.java | 25 import android.security.keystore.KeyProperties; 221 if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(jcaKeyAlgorithm)) { in makeAndroidKeyStorePublicKeyFromKeyEntryResponse() 225 } else if (KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(jcaKeyAlgorithm)) { in makeAndroidKeyStorePublicKeyFromKeyEntryResponse() 297 @KeyProperties.KeyAlgorithmEnum String keyAlgorithmString; in makeAndroidKeyStoreSecretKeyFromKeyEntryResponse() 299 keyAlgorithmString = KeyProperties.KeyAlgorithm.fromKeymasterSecretKeyAlgorithm( in makeAndroidKeyStoreSecretKeyFromKeyEntryResponse() 329 if (namespace == KeyProperties.NAMESPACE_APPLICATION) { in loadAndroidKeyStoreKeyFromKeystore() 330 descriptor.nspace = KeyProperties.NAMESPACE_APPLICATION; // ignored; in loadAndroidKeyStoreKeyFromKeystore()
|
H A D | AndroidKeyStoreRSASignatureSpi.java | 22 import android.security.keystore.KeyProperties; 190 if (!KeyProperties.KEY_ALGORITHM_RSA.equalsIgnoreCase(key.getAlgorithm())) { in initKey() 192 + ". Only" + KeyProperties.KEY_ALGORITHM_RSA + " supported"); in initKey()
|
H A D | KeyStore2ParameterUtils.java | 27 import android.security.keystore.KeyProperties; 242 if (spec.getUserAuthenticationType() == (KeyProperties.AUTH_BIOMETRIC_STRONG in addSids() 243 | KeyProperties.AUTH_DEVICE_CREDENTIAL)) { in addSids() 256 if ((spec.getUserAuthenticationType() & KeyProperties.AUTH_BIOMETRIC_STRONG) != 0) { in addSids() 284 } else if ((spec.getUserAuthenticationType() & KeyProperties.AUTH_DEVICE_CREDENTIAL) in addSids()
|
/aosp12/frameworks/base/services/core/java/com/android/server/locksettings/ |
H A D | SyntheticPasswordCrypto.java | 20 import android.security.keystore.KeyProperties; 69 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in decrypt() 70 + KeyProperties.BLOCK_MODE_GCM + "/" + KeyProperties.ENCRYPTION_PADDING_NONE); in decrypt() 83 KeyProperties.KEY_ALGORITHM_AES + "/" + KeyProperties.BLOCK_MODE_GCM + "/" in encrypt() 84 + KeyProperties.ENCRYPTION_PADDING_NONE); in encrypt() 105 KeyProperties.KEY_ALGORITHM_AES); in encrypt() 119 KeyProperties.KEY_ALGORITHM_AES); in decrypt() 150 return KeyProperties.NAMESPACE_LOCKSETTINGS; in keyNamespace() 187 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in createBlob() 188 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in createBlob() [all …]
|
H A D | RebootEscrowKeyStoreManager.java | 20 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 D | ManagedProfilePasswordCache.java | 24 import android.security.keystore.KeyProperties; 96 generator = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES, in storePassword() 99 keyName, KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in storePassword() 101 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in storePassword() 103 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in storePassword()
|
/aosp12/packages/apps/Car/Dialer/src/com/android/car/dialer/storage/ |
H A D | CipherConverter.java | 20 import android.security.keystore.KeyProperties; 118 KeyGenerator kpg = KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES, in encrypt() 122 KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in encrypt() 123 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in encrypt() 124 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in encrypt() 159 KeyProperties.KEY_ALGORITHM_AES + "/" + KeyProperties.BLOCK_MODE_GCM + "/" in getCipherInstance() 160 + KeyProperties.ENCRYPTION_PADDING_NONE); in getCipherInstance()
|
/aosp12/frameworks/base/keystore/tests/src/android/security/ |
H A D | ParcelableKeyGenParameterSpecTest.java | 25 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()
|
/aosp12/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/ |
H A D | ApplicationKeyStorage.java | 24 import android.security.keystore.KeyProperties; 87 new SecretKeySpec(secretKey, KeyProperties.KEY_ALGORITHM_AES)), in setSymmetricKeyEntry() 89 KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in setSymmetricKeyEntry() 90 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in setSymmetricKeyEntry() 91 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in setSymmetricKeyEntry() 129 key.nspace = KeyProperties.NAMESPACE_APPLICATION; in makeKeystoreEngineGrantString()
|
/aosp12/packages/modules/Wifi/service/java/com/android/server/wifi/util/ |
H A D | WifiConfigStoreEncryptionUtil.java | 24 import android.security.keystore.KeyProperties; 162 .getInstance(KeyProperties.KEY_ALGORITHM_AES, KEY_STORE); in getOrCreateSecretKey() 165 KeyProperties.PURPOSE_ENCRYPT | KeyProperties.PURPOSE_DECRYPT) in getOrCreateSecretKey() 166 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in getOrCreateSecretKey() 167 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in getOrCreateSecretKey()
|
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/ |
H A D | PlatformKeyManagerTest.java | 36 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 D | RecoverableKeyGeneratorTest.java | 27 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 D | WrappedKeyTest.java | 25 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()
|
/aosp12/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/ |
H A D | PlatformKeyManager.java | 25 import android.security.keystore.KeyProperties; 427 new KeyProtection.Builder(KeyProperties.PURPOSE_DECRYPT) in generateAndLoadKey() 428 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generateAndLoadKey() 429 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE); in generateAndLoadKey() 444 new KeyProtection.Builder(KeyProperties.PURPOSE_ENCRYPT) in generateAndLoadKey() 445 .setBlockModes(KeyProperties.BLOCK_MODE_GCM) in generateAndLoadKey() 446 .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) in generateAndLoadKey()
|
/aosp12/frameworks/base/keystore/java/android/security/ |
H A D | KeyPairGeneratorSpec.java | 24 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()
|
/aosp12/packages/modules/Wifi/service/java/com/android/server/wifi/ |
H A D | MacAddressUtil.java | 22 import android.security.keystore.KeyProperties; 136 KeyProperties.KEY_ALGORITHM_HMAC_SHA256, "AndroidKeyStore"); in generateAndPersistNewMacRandomizationSecret() 139 KeyProperties.PURPOSE_SIGN) in generateAndPersistNewMacRandomizationSecret()
|