/aosp14/frameworks/base/keystore/java/android/security/ |
H A D | KeyStoreException.java | 22 import android.security.keymaster.KeymasterDefs; 510 sErrorCodeToFailureInfo.put(KeymasterDefs.KM_ERROR_INVALID_USER_ID, in sErrorCodeToFailureInfo.put() 530 sErrorCodeToFailureInfo.put(KeymasterDefs.KM_ERROR_KEY_EXPIRED, in sErrorCodeToFailureInfo.put() 560 sErrorCodeToFailureInfo.put(KeymasterDefs.KM_ERROR_UNSUPPORTED_TAG, in sErrorCodeToFailureInfo.put() 562 sErrorCodeToFailureInfo.put(KeymasterDefs.KM_ERROR_INVALID_TAG, in sErrorCodeToFailureInfo.put() 574 sErrorCodeToFailureInfo.put(KeymasterDefs.KM_ERROR_SECURE_HW_BUSY, in sErrorCodeToFailureInfo.put() 580 sErrorCodeToFailureInfo.put(KeymasterDefs.KM_ERROR_MISSING_NONCE, in sErrorCodeToFailureInfo.put() 582 sErrorCodeToFailureInfo.put(KeymasterDefs.KM_ERROR_INVALID_NONCE, in sErrorCodeToFailureInfo.put() 617 sErrorCodeToFailureInfo.put(KeymasterDefs.KM_ERROR_DEVICE_LOCKED, in sErrorCodeToFailureInfo.put() 633 sErrorCodeToFailureInfo.put(KeymasterDefs.KM_ERROR_UNIMPLEMENTED, in sErrorCodeToFailureInfo.put() [all …]
|
/aosp14/frameworks/base/keystore/java/android/security/keystore/ |
H A D | KeyProperties.java | 26 import android.security.keymaster.KeymasterDefs; 385 return KeymasterDefs.KM_MODE_ECB; in toKeymaster() 387 return KeymasterDefs.KM_MODE_CBC; in toKeymaster() 389 return KeymasterDefs.KM_MODE_CTR; in toKeymaster() 391 return KeymasterDefs.KM_MODE_GCM; in toKeymaster() 400 case KeymasterDefs.KM_MODE_ECB: in fromKeymaster() 402 case KeymasterDefs.KM_MODE_CBC: in fromKeymaster() 404 case KeymasterDefs.KM_MODE_CTR: in fromKeymaster() 406 case KeymasterDefs.KM_MODE_GCM: in fromKeymaster() 496 case KeymasterDefs.KM_PAD_NONE: in fromKeymaster() [all …]
|
H A D | SecureKeyImportUnavailableException.java | 20 import android.security.keymaster.KeymasterDefs; 34 super(message, new KeyStoreException(KeymasterDefs.KM_ERROR_HARDWARE_TYPE_UNAVAILABLE, in SecureKeyImportUnavailableException()
|
H A D | StrongBoxUnavailableException.java | 20 import android.security.keymaster.KeymasterDefs; 36 new KeyStoreException(KeymasterDefs.KM_ERROR_HARDWARE_TYPE_UNAVAILABLE, in StrongBoxUnavailableException()
|
/aosp14/frameworks/base/keystore/java/android/security/keystore2/ |
H A D | AndroidKeyStoreRSASignatureSpi.java | 21 import android.security.keymaster.KeymasterDefs; 49 super(KeymasterDefs.KM_DIGEST_NONE); in NONEWithPKCS1Padding() 59 super(KeymasterDefs.KM_DIGEST_MD5); in MD5WithPKCS1Padding() 69 super(KeymasterDefs.KM_DIGEST_SHA1); in SHA1WithPKCS1Padding() 79 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in SHA224WithPKCS1Padding() 89 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in SHA256WithPKCS1Padding() 99 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in SHA384WithPKCS1Padding() 109 super(KeymasterDefs.KM_DIGEST_SHA_2_512); in SHA512WithPKCS1Padding() 132 super(KeymasterDefs.KM_DIGEST_SHA1); in SHA1WithPSSPadding() 142 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in SHA224WithPSSPadding() [all …]
|
H A D | KeymasterUtils.java | 20 import android.security.keymaster.KeymasterDefs; 40 case KeymasterDefs.KM_DIGEST_NONE: in getDigestOutputSizeBits() 42 case KeymasterDefs.KM_DIGEST_MD5: in getDigestOutputSizeBits() 44 case KeymasterDefs.KM_DIGEST_SHA1: in getDigestOutputSizeBits() 63 case KeymasterDefs.KM_MODE_ECB: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto() 65 case KeymasterDefs.KM_MODE_CBC: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto() 66 case KeymasterDefs.KM_MODE_CTR: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto() 67 case KeymasterDefs.KM_MODE_GCM: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto() 78 case KeymasterDefs.KM_PAD_NONE: in isKeymasterPaddingSchemeIndCpaCompatibleWithAsymmetricCrypto() 80 case KeymasterDefs.KM_PAD_RSA_OAEP: in isKeymasterPaddingSchemeIndCpaCompatibleWithAsymmetricCrypto() [all …]
|
H A D | AndroidKeyStoreRSACipherSpi.java | 22 import android.security.keymaster.KeymasterDefs; 55 super(KeymasterDefs.KM_PAD_NONE); in NoPadding() 171 super(KeymasterDefs.KM_PAD_RSA_OAEP); in OAEPWithMGF1Padding() 207 case KeymasterDefs.KM_DIGEST_SHA1: in initAlgorithmSpecificParameters() 340 case KeymasterDefs.KM_DIGEST_SHA1: in getTransform() 359 super(KeymasterDefs.KM_DIGEST_SHA1); in OAEPWithSHA1AndMGF1Padding() 365 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in OAEPWithSHA224AndMGF1Padding() 371 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in OAEPWithSHA256AndMGF1Padding() 377 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in OAEPWithSHA384AndMGF1Padding() 506 KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_RSA in addAlgorithmSpecificParametersToBegin() [all …]
|
H A D | KeyStore2ParameterUtils.java | 26 import android.security.keymaster.KeymasterDefs; 50 int type = KeymasterDefs.getTagType(tag); in makeBool() 51 if (type != KeymasterDefs.KM_BOOL) { in makeBool() 113 int type = KeymasterDefs.getTagType(tag); in makeInt() 114 if (type != KeymasterDefs.KM_UINT && type != KeymasterDefs.KM_UINT_REP) { in makeInt() 132 if (type != KeymasterDefs.KM_ULONG && type != KeymasterDefs.KM_ULONG_REP) { in makeLong() 149 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BYTES) { in makeBytes() 166 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BIGNUM) { in makeBignum() 183 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_DATE) { in makeDate() 203 if (KeymasterDefs.getTagType(param.keyParameter.tag) != KeymasterDefs.KM_UINT) { in getUnsignedInt() [all …]
|
H A D | AndroidKeyStoreKeyGeneratorSpi.java | 23 import android.security.keymaster.KeymasterDefs; 57 super(KeymasterDefs.KM_ALGORITHM_AES, 128); in AES() 74 super(KeymasterDefs.KM_ALGORITHM_3DES, 168); in DESede() 80 super(KeymasterDefs.KM_ALGORITHM_HMAC, in HmacBase() 88 super(KeymasterDefs.KM_DIGEST_SHA1); in HmacSHA1() 94 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in HmacSHA224() 100 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in HmacSHA256() 106 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in HmacSHA384() 112 super(KeymasterDefs.KM_DIGEST_SHA_2_512); in HmacSHA512() 303 if (blockMode == KeymasterDefs.KM_MODE_GCM in engineGenerateKey() [all …]
|
H A D | AndroidKeyStoreSecretKeyFactorySpi.java | 23 import android.security.keymaster.KeymasterDefs; 102 case KeymasterDefs.KM_TAG_ORIGIN: in getKeyInfo() 109 case KeymasterDefs.KM_TAG_KEY_SIZE: in getKeyInfo() 117 case KeymasterDefs.KM_TAG_PURPOSE: in getKeyInfo() 121 case KeymasterDefs.KM_TAG_PADDING: in getKeyInfo() 141 case KeymasterDefs.KM_TAG_DIGEST: in getKeyInfo() 145 case KeymasterDefs.KM_TAG_BLOCK_MODE: in getKeyInfo() 151 case KeymasterDefs.KM_TAG_USER_AUTH_TYPE: in getKeyInfo() 159 case KeymasterDefs.KM_TAG_USER_SECURE_ID: in getKeyInfo() 164 case KeymasterDefs.KM_TAG_ACTIVE_DATETIME: in getKeyInfo() [all …]
|
H A D | AndroidKeyStoreECDSASignatureSpi.java | 23 import android.security.keymaster.KeymasterDefs; 50 super(KeymasterDefs.KM_DIGEST_NONE); in NONE() 127 super(KeymasterDefs.KM_DIGEST_NONE); in Ed25519() 138 super(KeymasterDefs.KM_DIGEST_SHA1); in SHA1() 148 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in SHA224() 158 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in SHA256() 168 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in SHA384() 178 super(KeymasterDefs.KM_DIGEST_SHA_2_512); in SHA512() 204 if (a.keyParameter.tag == KeymasterDefs.KM_TAG_KEY_SIZE) { in initKey() 239 KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_EC in addAlgorithmSpecificParametersToBegin() [all …]
|
H A D | AndroidKeyStoreUnauthenticatedAESCipherSpi.java | 22 import android.security.keymaster.KeymasterDefs; 49 super(KeymasterDefs.KM_MODE_ECB, keymasterPadding, false); in ECB() 54 super(KeymasterDefs.KM_PAD_NONE); in NoPadding() 65 super(KeymasterDefs.KM_PAD_PKCS7); in PKCS7Padding() 82 super(KeymasterDefs.KM_PAD_NONE); in NoPadding() 93 super(KeymasterDefs.KM_PAD_PKCS7); in PKCS7Padding() 110 super(KeymasterDefs.KM_PAD_NONE); in NoPadding() 278 KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_AES in addAlgorithmSpecificParametersToBegin() 284 KeymasterDefs.KM_TAG_PADDING, mKeymasterPadding in addAlgorithmSpecificParametersToBegin() 288 KeymasterDefs.KM_TAG_NONCE, mIv in addAlgorithmSpecificParametersToBegin() [all …]
|
H A D | AndroidKeyStoreHmacSpi.java | 22 import android.security.keymaster.KeymasterDefs; 46 super(KeymasterDefs.KM_DIGEST_SHA1); in HmacSHA1() 52 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in HmacSHA224() 58 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in HmacSHA256() 64 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in HmacSHA384() 70 super(KeymasterDefs.KM_DIGEST_SHA_2_512); in HmacSHA512() 166 KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_SIGN in ensureKeystoreOperationInitialized() 169 KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_HMAC in ensureKeystoreOperationInitialized() 172 KeymasterDefs.KM_TAG_DIGEST, mKeymasterDigest in ensureKeystoreOperationInitialized() 175 KeymasterDefs.KM_TAG_MAC_LENGTH, mMacSizeBits in ensureKeystoreOperationInitialized()
|
H A D | AndroidKeyStoreKeyPairGeneratorSpi.java | 35 import android.security.keymaster.KeymasterDefs; 100 super(KeymasterDefs.KM_ALGORITHM_RSA); in RSA() 106 super(KeymasterDefs.KM_ALGORITHM_EC); in EC() 116 super(KeymasterDefs.KM_ALGORITHM_EC); in XDH() 471 case KeymasterDefs.KM_ALGORITHM_EC: in buildKeyGenParameterSpecFromLegacy() 486 case KeymasterDefs.KM_ALGORITHM_RSA: in buildKeyGenParameterSpecFromLegacy() 590 case KeymasterDefs.KM_ALGORITHM_EC: in initAlgorithmSpecificParameters() 927 case KeymasterDefs.KM_ALGORITHM_RSA: in addAlgorithmSpecificParameters() 932 case KeymasterDefs.KM_ALGORITHM_EC: in addAlgorithmSpecificParameters() 941 case KeymasterDefs.KM_ALGORITHM_EC: in getDefaultKeySize() [all …]
|
H A D | AndroidKeyStore3DESCipherSpi.java | 21 import android.security.keymaster.KeymasterDefs; 74 super(KeymasterDefs.KM_PAD_NONE); in NoPadding() 85 super(KeymasterDefs.KM_PAD_PKCS7); in PKCS7Padding() 97 super(KeymasterDefs.KM_MODE_CBC, keymasterPadding, true); in CBC() 102 super(KeymasterDefs.KM_PAD_NONE); in NoPadding() 114 super(KeymasterDefs.KM_PAD_PKCS7); in PKCS7Padding() 285 KeymasterDefs.KM_TAG_ALGORITHM, in addAlgorithmSpecificParametersToBegin() 286 KeymasterDefs.KM_ALGORITHM_3DES in addAlgorithmSpecificParametersToBegin() 289 KeymasterDefs.KM_TAG_BLOCK_MODE, in addAlgorithmSpecificParametersToBegin() 293 KeymasterDefs.KM_TAG_PADDING, in addAlgorithmSpecificParametersToBegin() [all …]
|
H A D | AndroidKeyStoreSpi.java | 31 import android.security.keymaster.KeymasterDefs; 477 KeymasterDefs.KM_TAG_ALGORITHM, in setPrivateKeyEntry() 483 KeymasterDefs.KM_TAG_PURPOSE, in setPrivateKeyEntry() 521 KeymasterDefs.KM_TAG_PADDING, in setPrivateKeyEntry() 549 KeymasterDefs.KM_TAG_PADDING, in setPrivateKeyEntry() 577 if (KeymasterDefs.KM_ALGORITHM_EC in setPrivateKeyEntry() 716 KeymasterDefs.KM_TAG_ALGORITHM, in setSecretKeyEntry() 897 KeymasterDefs.KM_TAG_ALGORITHM, in setWrappedKeyEntry() 898 KeymasterDefs.KM_ALGORITHM_RSA in setWrappedKeyEntry() 908 KeymasterDefs.KM_TAG_BLOCK_MODE, in setWrappedKeyEntry() [all …]
|
H A D | KeyStoreCryptoOperationUtils.java | 26 import android.security.keymaster.KeymasterDefs; 60 case KeymasterDefs.KM_TAG_USER_SECURE_ID: in canUserAuthorizationSucceed() 114 case KeymasterDefs.KM_ERROR_KEY_EXPIRED: in getInvalidKeyException() 116 case KeymasterDefs.KM_ERROR_KEY_NOT_YET_VALID: in getInvalidKeyException() 124 case KeymasterDefs.KM_ERROR_KEY_USER_NOT_AUTHENTICATED: in getInvalidKeyException() 145 case KeymasterDefs.KM_ERROR_INVALID_NONCE: in getExceptionForCipherInit() 147 case KeymasterDefs.KM_ERROR_CALLER_NONCE_PROHIBITED: in getExceptionForCipherInit()
|
H A D | AndroidKeyStoreAuthenticatedAESCipherSpi.java | 24 import android.security.keymaster.KeymasterDefs; 63 super(KeymasterDefs.KM_MODE_GCM, keymasterPadding); in GCM() 223 KeymasterDefs.KM_TAG_MAC_LENGTH, in addAlgorithmSpecificParametersToBegin() 234 super(KeymasterDefs.KM_PAD_NONE); in NoPadding() 306 KeymasterDefs.KM_TAG_ALGORITHM, in addAlgorithmSpecificParametersToBegin() 307 KeymasterDefs.KM_ALGORITHM_AES in addAlgorithmSpecificParametersToBegin() 310 KeymasterDefs.KM_TAG_BLOCK_MODE, in addAlgorithmSpecificParametersToBegin() 314 KeymasterDefs.KM_TAG_PADDING, in addAlgorithmSpecificParametersToBegin() 319 parameters.add(KeyStore2ParameterUtils.makeBytes(KeymasterDefs.KM_TAG_NONCE, mIv)); in addAlgorithmSpecificParametersToBegin() 332 if (p.tag == KeymasterDefs.KM_TAG_NONCE) { in loadAlgorithmSpecificParametersFromBeginResult()
|
H A D | AndroidKeyStoreProvider.java | 23 import android.security.keymaster.KeymasterDefs; 399 case KeymasterDefs.KM_TAG_ALGORITHM: in loadAndroidKeyStoreKeyFromKeystore() 402 case KeymasterDefs.KM_TAG_DIGEST: in loadAndroidKeyStoreKeyFromKeystore() 411 if (keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_HMAC || in loadAndroidKeyStoreKeyFromKeystore() 412 keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_AES || in loadAndroidKeyStoreKeyFromKeystore() 413 keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_3DES) { in loadAndroidKeyStoreKeyFromKeystore() 416 } else if (keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_RSA || in loadAndroidKeyStoreKeyFromKeystore() 417 keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_EC) { in loadAndroidKeyStoreKeyFromKeystore()
|
/aosp14/frameworks/base/core/java/android/security/keymaster/ |
H A D | KeymasterArguments.java | 88 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM_REP) { in addEnums() 103 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM) { in getEnum() 119 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM_REP) { in getEnums() 165 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_UINT) { in getUnsignedInt() 230 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BOOL) { in addBoolean() 242 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BOOL) { in getBoolean() 258 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BYTES) { in addBytes() 274 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BYTES) { in getBytes() 291 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_DATE) { in addDate() 313 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_DATE) { in addDateIfNotNull() [all …]
|
H A D | KeymasterArgument.java | 39 switch (KeymasterDefs.getTagType(tag)) { 40 case KeymasterDefs.KM_ENUM: 41 case KeymasterDefs.KM_ENUM_REP: 42 case KeymasterDefs.KM_UINT: 43 case KeymasterDefs.KM_UINT_REP: 45 case KeymasterDefs.KM_ULONG: 46 case KeymasterDefs.KM_ULONG_REP: 48 case KeymasterDefs.KM_DATE: 50 case KeymasterDefs.KM_BYTES: 51 case KeymasterDefs.KM_BIGNUM: [all …]
|
H A D | KeymasterIntArgument.java | 33 switch (KeymasterDefs.getTagType(tag)) { in KeymasterIntArgument() 34 case KeymasterDefs.KM_UINT: in KeymasterIntArgument() 35 case KeymasterDefs.KM_UINT_REP: in KeymasterIntArgument() 36 case KeymasterDefs.KM_ENUM: in KeymasterIntArgument() 37 case KeymasterDefs.KM_ENUM_REP: in KeymasterIntArgument()
|
H A D | KeymasterBlobArgument.java | 33 switch (KeymasterDefs.getTagType(tag)) { in KeymasterBlobArgument() 34 case KeymasterDefs.KM_BIGNUM: in KeymasterBlobArgument() 35 case KeymasterDefs.KM_BYTES: in KeymasterBlobArgument()
|
H A D | KeymasterLongArgument.java | 33 switch (KeymasterDefs.getTagType(tag)) { in KeymasterLongArgument() 34 case KeymasterDefs.KM_ULONG: in KeymasterLongArgument() 35 case KeymasterDefs.KM_ULONG_REP: in KeymasterLongArgument()
|
H A D | KeymasterBooleanArgument.java | 33 switch (KeymasterDefs.getTagType(tag)) { in KeymasterBooleanArgument() 34 case KeymasterDefs.KM_BOOL: in KeymasterBooleanArgument()
|