Home
last modified time | relevance | path

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

12

/frameworks/base/keystore/java/android/security/keystore/
DKeyProperties.java23 import android.security.keymaster.KeymasterDefs;
106 return KeymasterDefs.KM_PURPOSE_ENCRYPT; in toKeymaster()
108 return KeymasterDefs.KM_PURPOSE_DECRYPT; in toKeymaster()
110 return KeymasterDefs.KM_PURPOSE_SIGN; in toKeymaster()
112 return KeymasterDefs.KM_PURPOSE_VERIFY; in toKeymaster()
114 return KeymasterDefs.KM_PURPOSE_WRAP; in toKeymaster()
122 case KeymasterDefs.KM_PURPOSE_ENCRYPT: in fromKeymaster()
124 case KeymasterDefs.KM_PURPOSE_DECRYPT: in fromKeymaster()
126 case KeymasterDefs.KM_PURPOSE_SIGN: in fromKeymaster()
128 case KeymasterDefs.KM_PURPOSE_VERIFY: in fromKeymaster()
[all …]
DKeymasterUtils.java23 import android.security.keymaster.KeymasterDefs;
38 case KeymasterDefs.KM_DIGEST_NONE: in getDigestOutputSizeBits()
40 case KeymasterDefs.KM_DIGEST_MD5: in getDigestOutputSizeBits()
42 case KeymasterDefs.KM_DIGEST_SHA1: in getDigestOutputSizeBits()
44 case KeymasterDefs.KM_DIGEST_SHA_2_224: in getDigestOutputSizeBits()
46 case KeymasterDefs.KM_DIGEST_SHA_2_256: in getDigestOutputSizeBits()
48 case KeymasterDefs.KM_DIGEST_SHA_2_384: in getDigestOutputSizeBits()
50 case KeymasterDefs.KM_DIGEST_SHA_2_512: in getDigestOutputSizeBits()
60 case KeymasterDefs.KM_MODE_ECB: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto()
62 case KeymasterDefs.KM_MODE_CBC: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto()
[all …]
DAndroidKeyStoreRSASignatureSpi.java21 import android.security.keymaster.KeymasterDefs;
35 super(keymasterDigest, KeymasterDefs.KM_PAD_RSA_PKCS1_1_5_SIGN); in PKCS1Padding()
47 super(KeymasterDefs.KM_DIGEST_NONE); in NONEWithPKCS1Padding()
53 super(KeymasterDefs.KM_DIGEST_MD5); in MD5WithPKCS1Padding()
59 super(KeymasterDefs.KM_DIGEST_SHA1); in SHA1WithPKCS1Padding()
65 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in SHA224WithPKCS1Padding()
71 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in SHA256WithPKCS1Padding()
77 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in SHA384WithPKCS1Padding()
83 super(KeymasterDefs.KM_DIGEST_SHA_2_512); in SHA512WithPKCS1Padding()
91 super(keymasterDigest, KeymasterDefs.KM_PAD_RSA_PSS); in PSSPadding()
[all …]
DAndroidKeyStoreSecretKeyFactorySpi.java23 import android.security.keymaster.KeymasterDefs;
101 if (keyCharacteristics.hwEnforced.containsTag(KeymasterDefs.KM_TAG_ORIGIN)) { in getKeyInfo()
104 keyCharacteristics.hwEnforced.getEnum(KeymasterDefs.KM_TAG_ORIGIN, -1)); in getKeyInfo()
105 } else if (keyCharacteristics.swEnforced.containsTag(KeymasterDefs.KM_TAG_ORIGIN)) { in getKeyInfo()
108 keyCharacteristics.swEnforced.getEnum(KeymasterDefs.KM_TAG_ORIGIN, -1)); in getKeyInfo()
113 keyCharacteristics.getUnsignedInt(KeymasterDefs.KM_TAG_KEY_SIZE, -1); in getKeyInfo()
121 keyCharacteristics.getEnums(KeymasterDefs.KM_TAG_PURPOSE)); in getKeyInfo()
126 for (int keymasterPadding : keyCharacteristics.getEnums(KeymasterDefs.KM_TAG_PADDING)) { in getKeyInfo()
149 keyCharacteristics.getEnums(KeymasterDefs.KM_TAG_DIGEST)); in getKeyInfo()
151 keyCharacteristics.getEnums(KeymasterDefs.KM_TAG_BLOCK_MODE)); in getKeyInfo()
[all …]
DAndroidKeyStoreRSACipherSpi.java24 import android.security.keymaster.KeymasterDefs;
54 super(KeymasterDefs.KM_PAD_NONE); in NoPadding()
61 setKeymasterPurposeOverride(KeymasterDefs.KM_PURPOSE_SIGN); in adjustConfigForEncryptingWithPrivateKey()
108 super(KeymasterDefs.KM_PAD_RSA_PKCS1_1_5_ENCRYPT); in PKCS1Padding()
115 setKeymasterPurposeOverride(KeymasterDefs.KM_PURPOSE_SIGN); in adjustConfigForEncryptingWithPrivateKey()
116 setKeymasterPaddingOverride(KeymasterDefs.KM_PAD_RSA_PKCS1_1_5_SIGN); in adjustConfigForEncryptingWithPrivateKey()
169 super(KeymasterDefs.KM_PAD_RSA_OAEP); in OAEPWithMGF1Padding()
205 case KeymasterDefs.KM_DIGEST_SHA1: in initAlgorithmSpecificParameters()
206 case KeymasterDefs.KM_DIGEST_SHA_2_224: in initAlgorithmSpecificParameters()
207 case KeymasterDefs.KM_DIGEST_SHA_2_256: in initAlgorithmSpecificParameters()
[all …]
DAndroidKeyStoreKeyGeneratorSpi.java23 import android.security.keymaster.KeymasterDefs;
47 super(KeymasterDefs.KM_ALGORITHM_AES, 128); in AES()
64 super(KeymasterDefs.KM_ALGORITHM_3DES, 168); in DESede()
70 super(KeymasterDefs.KM_ALGORITHM_HMAC, in HmacBase()
78 super(KeymasterDefs.KM_DIGEST_SHA1); in HmacSHA1()
84 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in HmacSHA224()
90 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in HmacSHA256()
96 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in HmacSHA384()
102 super(KeymasterDefs.KM_DIGEST_SHA_2_512); in HmacSHA512()
137 if ((mKeymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_HMAC) && (mKeymasterDigest == -1)) { in AndroidKeyStoreKeyGeneratorSpi()
[all …]
DAndroidKeyStoreUnauthenticatedAESCipherSpi.java22 import android.security.keymaster.KeymasterDefs;
46 super(KeymasterDefs.KM_MODE_ECB, keymasterPadding, false); in ECB()
51 super(KeymasterDefs.KM_PAD_NONE); in NoPadding()
57 super(KeymasterDefs.KM_PAD_PKCS7); in PKCS7Padding()
64 super(KeymasterDefs.KM_MODE_CBC, keymasterPadding, true); in CBC()
69 super(KeymasterDefs.KM_PAD_NONE); in NoPadding()
75 super(KeymasterDefs.KM_PAD_PKCS7); in PKCS7Padding()
82 super(KeymasterDefs.KM_MODE_CTR, keymasterPadding, true); in CTR()
87 super(KeymasterDefs.KM_PAD_NONE); in NoPadding()
249 keymasterArgs.addEnum(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_AES); in addAlgorithmSpecificParametersToBegin()
[all …]
DAndroidKeyStoreECDSASignatureSpi.java25 import android.security.keymaster.KeymasterDefs;
42 super(KeymasterDefs.KM_DIGEST_NONE); in NONE()
113 super(KeymasterDefs.KM_DIGEST_SHA1); in SHA1()
119 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in SHA224()
125 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in SHA256()
131 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in SHA384()
137 super(KeymasterDefs.KM_DIGEST_SHA_2_512); in SHA512()
162 long keySizeBits = keyCharacteristics.getUnsignedInt(KeymasterDefs.KM_TAG_KEY_SIZE, -1); in initKey()
187 keymasterArgs.addEnum(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_EC); in addAlgorithmSpecificParametersToBegin()
188 keymasterArgs.addEnum(KeymasterDefs.KM_TAG_DIGEST, mKeymasterDigest); in addAlgorithmSpecificParametersToBegin()
DAndroidKeyStoreSpi.java25 import android.security.keymaster.KeymasterDefs;
487 importArgs.addEnum(KeymasterDefs.KM_TAG_ALGORITHM, in setPrivateKeyEntry()
491 importArgs.addEnums(KeymasterDefs.KM_TAG_PURPOSE, in setPrivateKeyEntry()
494 importArgs.addEnums(KeymasterDefs.KM_TAG_DIGEST, in setPrivateKeyEntry()
498 importArgs.addEnums(KeymasterDefs.KM_TAG_BLOCK_MODE, in setPrivateKeyEntry()
518 importArgs.addEnums(KeymasterDefs.KM_TAG_PADDING, keymasterEncryptionPaddings); in setPrivateKeyEntry()
519 importArgs.addEnums(KeymasterDefs.KM_TAG_PADDING, in setPrivateKeyEntry()
522 importArgs.addDateIfNotNull(KeymasterDefs.KM_TAG_ACTIVE_DATETIME, in setPrivateKeyEntry()
524 importArgs.addDateIfNotNull(KeymasterDefs.KM_TAG_ORIGINATION_EXPIRE_DATETIME, in setPrivateKeyEntry()
526 importArgs.addDateIfNotNull(KeymasterDefs.KM_TAG_USAGE_EXPIRE_DATETIME, in setPrivateKeyEntry()
[all …]
DAndroidKeyStore3DESCipherSpi.java20 import android.security.keymaster.KeymasterDefs;
65 super(KeymasterDefs.KM_MODE_ECB, keymasterPadding, false); in ECB()
70 super(KeymasterDefs.KM_PAD_NONE); in NoPadding()
76 super(KeymasterDefs.KM_PAD_PKCS7); in PKCS7Padding()
83 super(KeymasterDefs.KM_MODE_CBC, keymasterPadding, true); in CBC()
88 super(KeymasterDefs.KM_PAD_NONE); in NoPadding()
94 super(KeymasterDefs.KM_PAD_PKCS7); in PKCS7Padding()
259 keymasterArgs.addEnum(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_3DES); in addAlgorithmSpecificParametersToBegin()
260 keymasterArgs.addEnum(KeymasterDefs.KM_TAG_BLOCK_MODE, mKeymasterBlockMode); in addAlgorithmSpecificParametersToBegin()
261 keymasterArgs.addEnum(KeymasterDefs.KM_TAG_PADDING, mKeymasterPadding); in addAlgorithmSpecificParametersToBegin()
[all …]
DAndroidKeyStoreHmacSpi.java23 import android.security.keymaster.KeymasterDefs;
43 super(KeymasterDefs.KM_DIGEST_SHA1); in HmacSHA1()
49 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in HmacSHA224()
55 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in HmacSHA256()
61 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in HmacSHA384()
67 super(KeymasterDefs.KM_DIGEST_SHA_2_512); in HmacSHA512()
162 keymasterArgs.addEnum(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_HMAC); in ensureKeystoreOperationInitialized()
163 keymasterArgs.addEnum(KeymasterDefs.KM_TAG_DIGEST, mKeymasterDigest); in ensureKeystoreOperationInitialized()
164 keymasterArgs.addUnsignedInt(KeymasterDefs.KM_TAG_MAC_LENGTH, mMacSizeBits); in ensureKeystoreOperationInitialized()
168 KeymasterDefs.KM_PURPOSE_SIGN, in ensureKeystoreOperationInitialized()
DAndroidKeyStoreKeyPairGeneratorSpi.java26 import android.security.keymaster.KeymasterDefs;
96 super(KeymasterDefs.KM_ALGORITHM_RSA); in RSA()
102 super(KeymasterDefs.KM_ALGORITHM_EC); in EC()
220 case KeymasterDefs.KM_ALGORITHM_EC: in initialize()
235 case KeymasterDefs.KM_ALGORITHM_RSA: in initialize()
382 case KeymasterDefs.KM_ALGORITHM_RSA: in initAlgorithmSpecificParameters()
414 case KeymasterDefs.KM_ALGORITHM_EC: in initAlgorithmSpecificParameters()
497 args.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_CHALLENGE, challenge); in createCertificateChain()
537 args.addUnsignedInt(KeymasterDefs.KM_TAG_KEY_SIZE, mKeySizeBits); in constructKeyGenerationArguments()
538 args.addEnum(KeymasterDefs.KM_TAG_ALGORITHM, mKeymasterAlgorithm); in constructKeyGenerationArguments()
[all …]
DAttestationUtils.java30 import android.security.keymaster.KeymasterDefs;
165 attestArgs.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_CHALLENGE, attestationChallenge); in prepareAttestationArguments()
186 attestArgs.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_ID_SERIAL, in prepareAttestationArguments()
194 attestArgs.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_ID_IMEI, in prepareAttestationArguments()
203 attestArgs.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_ID_MEID, in prepareAttestationArguments()
208 attestArgs.addBoolean(KeymasterDefs.KM_TAG_DEVICE_UNIQUE_ATTESTATION); in prepareAttestationArguments()
215 attestArgs.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_ID_BRAND, in prepareAttestationArguments()
217 attestArgs.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_ID_DEVICE, in prepareAttestationArguments()
219 attestArgs.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_ID_PRODUCT, in prepareAttestationArguments()
221 attestArgs.addBytes(KeymasterDefs.KM_TAG_ATTESTATION_ID_MANUFACTURER, in prepareAttestationArguments()
[all …]
DAndroidKeyStoreAuthenticatedAESCipherSpi.java25 import android.security.keymaster.KeymasterDefs;
62 super(KeymasterDefs.KM_MODE_GCM, keymasterPadding); in GCM()
216 keymasterArgs.addUnsignedInt(KeymasterDefs.KM_TAG_MAC_LENGTH, mTagLengthBits); in addAlgorithmSpecificParametersToBegin()
225 super(KeymasterDefs.KM_PAD_NONE); in NoPadding()
297 keymasterArgs.addEnum(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_AES); in addAlgorithmSpecificParametersToBegin()
298 keymasterArgs.addEnum(KeymasterDefs.KM_TAG_BLOCK_MODE, mKeymasterBlockMode); in addAlgorithmSpecificParametersToBegin()
299 keymasterArgs.addEnum(KeymasterDefs.KM_TAG_PADDING, mKeymasterPadding); in addAlgorithmSpecificParametersToBegin()
301 keymasterArgs.addBytes(KeymasterDefs.KM_TAG_NONCE, mIv); in addAlgorithmSpecificParametersToBegin()
311 byte[] returnedIv = keymasterArgs.getBytes(KeymasterDefs.KM_TAG_NONCE, null); in loadAlgorithmSpecificParametersFromBeginResult()
416 keymasterArgs.addBytes(KeymasterDefs.KM_TAG_ASSOCIATED_DATA, input); in update()
DAndroidKeyStoreProvider.java25 import android.security.keymaster.KeymasterDefs;
261 privateKeyAlias, KeymasterDefs.KM_KEY_FORMAT_X509, null, null, uid); in loadAndroidKeyStorePublicKeyFromKeystore()
269 Integer keymasterAlgorithm = keyCharacteristics.getEnum(KeymasterDefs.KM_TAG_ALGORITHM); in loadAndroidKeyStorePublicKeyFromKeystore()
342 Integer keymasterAlgorithm = keyCharacteristics.getEnum(KeymasterDefs.KM_TAG_ALGORITHM); in loadAndroidKeyStoreSecretKeyFromKeystore()
347 List<Integer> keymasterDigests = keyCharacteristics.getEnums(KeymasterDefs.KM_TAG_DIGEST); in loadAndroidKeyStoreSecretKeyFromKeystore()
376 Integer keymasterAlgorithm = keyCharacteristics.getEnum(KeymasterDefs.KM_TAG_ALGORITHM); in loadAndroidKeyStoreKeyFromKeystore()
381 if (keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_HMAC || in loadAndroidKeyStoreKeyFromKeystore()
382 keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_AES || in loadAndroidKeyStoreKeyFromKeystore()
383 keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_3DES) { in loadAndroidKeyStoreKeyFromKeystore()
386 } else if (keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_RSA || in loadAndroidKeyStoreKeyFromKeystore()
[all …]
DKeyStoreCryptoOperationChunkedStreamer.java22 import android.security.keymaster.KeymasterDefs;
113 throw new KeyStoreException(KeymasterDefs.KM_ERROR_UNKNOWN_ERROR, in update()
128 throw new KeyStoreException(KeymasterDefs.KM_ERROR_INVALID_INPUT_LENGTH, in update()
143 throw new KeyStoreException(KeymasterDefs.KM_ERROR_INVALID_INPUT_LENGTH, in update()
146 throw new KeyStoreException(KeymasterDefs.KM_ERROR_UNKNOWN_ERROR, in update()
DKeyStoreCryptoOperationUtils.java20 import android.security.keymaster.KeymasterDefs;
82 case KeymasterDefs.KM_ERROR_INVALID_NONCE: in getExceptionForCipherInit()
84 case KeymasterDefs.KM_ERROR_CALLER_NONCE_PROHIBITED: in getExceptionForCipherInit()
/frameworks/base/core/java/android/security/keymaster/
DKeymasterArguments.java74 int tagType = KeymasterDefs.getTagType(tag); in addEnum()
75 if ((tagType != KeymasterDefs.KM_ENUM) && (tagType != KeymasterDefs.KM_ENUM_REP)) { in addEnum()
87 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM_REP) { in addEnums()
102 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM) { in getEnum()
118 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM_REP) { in getEnums()
146 int tagType = KeymasterDefs.getTagType(tag); in addUnsignedInt()
147 if ((tagType != KeymasterDefs.KM_UINT) && (tagType != KeymasterDefs.KM_UINT_REP)) { in addUnsignedInt()
164 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_UINT) { in getUnsignedInt()
183 int tagType = KeymasterDefs.getTagType(tag); in addUnsignedLong()
184 if ((tagType != KeymasterDefs.KM_ULONG) && (tagType != KeymasterDefs.KM_ULONG_REP)) { in addUnsignedLong()
[all …]
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 …]
DKeymasterIntArgument.java32 switch (KeymasterDefs.getTagType(tag)) { in KeymasterIntArgument()
33 case KeymasterDefs.KM_UINT: in KeymasterIntArgument()
34 case KeymasterDefs.KM_UINT_REP: in KeymasterIntArgument()
35 case KeymasterDefs.KM_ENUM: in KeymasterIntArgument()
36 case KeymasterDefs.KM_ENUM_REP: in KeymasterIntArgument()
DKeymasterLongArgument.java32 switch (KeymasterDefs.getTagType(tag)) { in KeymasterLongArgument()
33 case KeymasterDefs.KM_ULONG: in KeymasterLongArgument()
34 case KeymasterDefs.KM_ULONG_REP: in KeymasterLongArgument()
DKeymasterBlobArgument.java32 switch (KeymasterDefs.getTagType(tag)) { in KeymasterBlobArgument()
33 case KeymasterDefs.KM_BIGNUM: in KeymasterBlobArgument()
34 case KeymasterDefs.KM_BYTES: in KeymasterBlobArgument()
DKeymasterBooleanArgument.java32 switch (KeymasterDefs.getTagType(tag)) { in KeymasterBooleanArgument()
33 case KeymasterDefs.KM_BOOL: in KeymasterBooleanArgument()
DKeymasterDateArgument.java32 switch (KeymasterDefs.getTagType(tag)) { in KeymasterDateArgument()
33 case KeymasterDefs.KM_DATE: in KeymasterDateArgument()
/frameworks/base/keystore/java/android/security/
DKeyStore.java37 import android.security.keymaster.KeymasterDefs;
704 args.addEnum(KeymasterDefs.KM_TAG_ALGORITHM, in makeLegacyArguments()
706 args.addEnum(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_SIGN); in makeLegacyArguments()
707 args.addEnum(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_VERIFY); in makeLegacyArguments()
708 args.addEnum(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_ENCRYPT); in makeLegacyArguments()
709 args.addEnum(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_DECRYPT); in makeLegacyArguments()
710 args.addEnum(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_NONE); in makeLegacyArguments()
712 args.addEnum(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_RSA_OAEP); in makeLegacyArguments()
713 args.addEnum(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_RSA_PKCS1_1_5_ENCRYPT); in makeLegacyArguments()
714 args.addEnum(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_RSA_PKCS1_1_5_SIGN); in makeLegacyArguments()
[all …]

12