Home
last modified time | relevance | path

Searched refs:KeymasterDefs (Results 1 – 25 of 36) sorted by relevance

12

/aosp12/frameworks/base/keystore/java/android/security/keystore/
H A DKeyProperties.java26 import android.security.keymaster.KeymasterDefs;
375 return KeymasterDefs.KM_MODE_ECB; in toKeymaster()
377 return KeymasterDefs.KM_MODE_CBC; in toKeymaster()
379 return KeymasterDefs.KM_MODE_CTR; in toKeymaster()
381 return KeymasterDefs.KM_MODE_GCM; in toKeymaster()
390 case KeymasterDefs.KM_MODE_ECB: in fromKeymaster()
392 case KeymasterDefs.KM_MODE_CBC: in fromKeymaster()
394 case KeymasterDefs.KM_MODE_CTR: in fromKeymaster()
396 case KeymasterDefs.KM_MODE_GCM: in fromKeymaster()
486 case KeymasterDefs.KM_PAD_NONE: in fromKeymaster()
[all …]
H A DSecureKeyImportUnavailableException.java20 import android.security.keymaster.KeymasterDefs;
34 super(message, new KeyStoreException(KeymasterDefs.KM_ERROR_HARDWARE_TYPE_UNAVAILABLE, in SecureKeyImportUnavailableException()
H A DStrongBoxUnavailableException.java20 import android.security.keymaster.KeymasterDefs;
36 new KeyStoreException(KeymasterDefs.KM_ERROR_HARDWARE_TYPE_UNAVAILABLE, in StrongBoxUnavailableException()
/aosp12/frameworks/base/keystore/java/android/security/keystore2/
H A DKeymasterUtils.java20 import android.security.keymaster.KeymasterDefs;
35 case KeymasterDefs.KM_DIGEST_NONE: in getDigestOutputSizeBits()
37 case KeymasterDefs.KM_DIGEST_MD5: in getDigestOutputSizeBits()
39 case KeymasterDefs.KM_DIGEST_SHA1: in getDigestOutputSizeBits()
58 case KeymasterDefs.KM_MODE_ECB: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto()
60 case KeymasterDefs.KM_MODE_CBC: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto()
61 case KeymasterDefs.KM_MODE_CTR: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto()
62 case KeymasterDefs.KM_MODE_GCM: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto()
73 case KeymasterDefs.KM_PAD_NONE: in isKeymasterPaddingSchemeIndCpaCompatibleWithAsymmetricCrypto()
75 case KeymasterDefs.KM_PAD_RSA_OAEP: in isKeymasterPaddingSchemeIndCpaCompatibleWithAsymmetricCrypto()
[all …]
H A DAndroidKeyStoreRSASignatureSpi.java21 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 DKeyStore2ParameterUtils.java26 import android.security.keymaster.KeymasterDefs;
50 int type = KeymasterDefs.getTagType(tag); in makeBool()
51 if (type != KeymasterDefs.KM_BOOL) { in makeBool()
112 int type = KeymasterDefs.getTagType(tag); in makeInt()
113 if (type != KeymasterDefs.KM_UINT && type != KeymasterDefs.KM_UINT_REP) { in makeInt()
131 if (type != KeymasterDefs.KM_ULONG && type != KeymasterDefs.KM_ULONG_REP) { in makeLong()
148 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BYTES) { in makeBytes()
165 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_BIGNUM) { in makeBignum()
182 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_DATE) { in makeDate()
202 if (KeymasterDefs.getTagType(param.keyParameter.tag) != KeymasterDefs.KM_UINT) { in getUnsignedInt()
[all …]
H A DAndroidKeyStoreRSACipherSpi.java22 import android.security.keymaster.KeymasterDefs;
55 super(KeymasterDefs.KM_PAD_NONE); in NoPadding()
170 super(KeymasterDefs.KM_PAD_RSA_OAEP); in OAEPWithMGF1Padding()
206 case KeymasterDefs.KM_DIGEST_SHA1: in initAlgorithmSpecificParameters()
322 case KeymasterDefs.KM_DIGEST_SHA1: in getTransform()
341 super(KeymasterDefs.KM_DIGEST_SHA1); in OAEPWithSHA1AndMGF1Padding()
347 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in OAEPWithSHA224AndMGF1Padding()
353 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in OAEPWithSHA256AndMGF1Padding()
359 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in OAEPWithSHA384AndMGF1Padding()
488 KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_RSA in addAlgorithmSpecificParametersToBegin()
[all …]
H A DAndroidKeyStoreKeyGeneratorSpi.java23 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 DAndroidKeyStoreSecretKeyFactorySpi.java23 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 DAndroidKeyStoreKeyPairGeneratorSpi.java37 import android.security.keymaster.KeymasterDefs;
100 super(KeymasterDefs.KM_ALGORITHM_RSA); in RSA()
106 super(KeymasterDefs.KM_ALGORITHM_EC); in EC()
396 case KeymasterDefs.KM_ALGORITHM_EC: in buildKeyGenParameterSpecFromLegacy()
411 case KeymasterDefs.KM_ALGORITHM_RSA: in buildKeyGenParameterSpecFromLegacy()
514 case KeymasterDefs.KM_ALGORITHM_EC: in initAlgorithmSpecificParameters()
841 case KeymasterDefs.KM_ALGORITHM_RSA: in addAlgorithmSpecificParameters()
846 case KeymasterDefs.KM_ALGORITHM_EC: in addAlgorithmSpecificParameters()
855 case KeymasterDefs.KM_ALGORITHM_EC: in getDefaultKeySize()
857 case KeymasterDefs.KM_ALGORITHM_RSA: in getDefaultKeySize()
[all …]
H A DAndroidKeyStoreUnauthenticatedAESCipherSpi.java22 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 DAndroidKeyStoreHmacSpi.java22 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 DAndroidKeyStoreECDSASignatureSpi.java23 import android.security.keymaster.KeymasterDefs;
43 super(KeymasterDefs.KM_DIGEST_NONE); in NONE()
119 super(KeymasterDefs.KM_DIGEST_SHA1); in SHA1()
129 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in SHA224()
139 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in SHA256()
149 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in SHA384()
159 super(KeymasterDefs.KM_DIGEST_SHA_2_512); in SHA512()
184 if (a.keyParameter.tag == KeymasterDefs.KM_TAG_KEY_SIZE) { in initKey()
214 KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_EC in addAlgorithmSpecificParametersToBegin()
217 KeymasterDefs.KM_TAG_DIGEST, mKeymasterDigest in addAlgorithmSpecificParametersToBegin()
H A DAndroidKeyStore3DESCipherSpi.java21 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 DAndroidKeyStoreSpi.java28 import android.security.keymaster.KeymasterDefs;
467 KeymasterDefs.KM_TAG_ALGORITHM, in setPrivateKeyEntry()
473 KeymasterDefs.KM_TAG_PURPOSE, in setPrivateKeyEntry()
511 KeymasterDefs.KM_TAG_PADDING, in setPrivateKeyEntry()
517 KeymasterDefs.KM_TAG_PADDING, in setPrivateKeyEntry()
651 KeymasterDefs.KM_TAG_ALGORITHM, in setSecretKeyEntry()
709 KeymasterDefs.KM_TAG_PURPOSE, in setSecretKeyEntry()
826 KeymasterDefs.KM_TAG_ALGORITHM, in setWrappedKeyEntry()
827 KeymasterDefs.KM_ALGORITHM_RSA in setWrappedKeyEntry()
837 KeymasterDefs.KM_TAG_BLOCK_MODE, in setWrappedKeyEntry()
[all …]
H A DKeyStoreCryptoOperationUtils.java26 import android.security.keymaster.KeymasterDefs;
62 case KeymasterDefs.KM_TAG_USER_SECURE_ID: in canUserAuthorizationSucceed()
116 case KeymasterDefs.KM_ERROR_KEY_EXPIRED: in getInvalidKeyException()
118 case KeymasterDefs.KM_ERROR_KEY_NOT_YET_VALID: in getInvalidKeyException()
126 case KeymasterDefs.KM_ERROR_KEY_USER_NOT_AUTHENTICATED: in getInvalidKeyException()
147 case KeymasterDefs.KM_ERROR_INVALID_NONCE: in getExceptionForCipherInit()
149 case KeymasterDefs.KM_ERROR_CALLER_NONCE_PROHIBITED: in getExceptionForCipherInit()
H A DAndroidKeyStoreAuthenticatedAESCipherSpi.java24 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 DAndroidKeyStoreProvider.java23 import android.security.keymaster.KeymasterDefs;
378 case KeymasterDefs.KM_TAG_ALGORITHM: in loadAndroidKeyStoreKeyFromKeystore()
381 case KeymasterDefs.KM_TAG_DIGEST: in loadAndroidKeyStoreKeyFromKeystore()
390 if (keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_HMAC || in loadAndroidKeyStoreKeyFromKeystore()
391 keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_AES || in loadAndroidKeyStoreKeyFromKeystore()
392 keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_3DES) { in loadAndroidKeyStoreKeyFromKeystore()
395 } else if (keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_RSA || in loadAndroidKeyStoreKeyFromKeystore()
396 keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_EC) { in loadAndroidKeyStoreKeyFromKeystore()
/aosp12/frameworks/base/core/java/android/security/keymaster/
H A DKeymasterArguments.java88 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 DKeymasterArgument.java39 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 DKeymasterIntArgument.java33 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 DKeymasterBlobArgument.java33 switch (KeymasterDefs.getTagType(tag)) { in KeymasterBlobArgument()
34 case KeymasterDefs.KM_BIGNUM: in KeymasterBlobArgument()
35 case KeymasterDefs.KM_BYTES: in KeymasterBlobArgument()
H A DKeymasterLongArgument.java33 switch (KeymasterDefs.getTagType(tag)) { in KeymasterLongArgument()
34 case KeymasterDefs.KM_ULONG: in KeymasterLongArgument()
35 case KeymasterDefs.KM_ULONG_REP: in KeymasterLongArgument()
H A DKeymasterBooleanArgument.java33 switch (KeymasterDefs.getTagType(tag)) { in KeymasterBooleanArgument()
34 case KeymasterDefs.KM_BOOL: in KeymasterBooleanArgument()
H A DKeymasterDateArgument.java33 switch (KeymasterDefs.getTagType(tag)) { in KeymasterDateArgument()
34 case KeymasterDefs.KM_DATE: in KeymasterDateArgument()

12