Home
last modified time | relevance | path

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

12

/frameworks/base/keystore/java/android/security/keystore/
DKeymasterUtils.java23 import android.security.keymaster.KeymasterDefs;
36 case KeymasterDefs.KM_DIGEST_NONE: in getDigestOutputSizeBits()
38 case KeymasterDefs.KM_DIGEST_MD5: in getDigestOutputSizeBits()
40 case KeymasterDefs.KM_DIGEST_SHA1: in getDigestOutputSizeBits()
42 case KeymasterDefs.KM_DIGEST_SHA_2_224: in getDigestOutputSizeBits()
44 case KeymasterDefs.KM_DIGEST_SHA_2_256: in getDigestOutputSizeBits()
46 case KeymasterDefs.KM_DIGEST_SHA_2_384: in getDigestOutputSizeBits()
48 case KeymasterDefs.KM_DIGEST_SHA_2_512: in getDigestOutputSizeBits()
58 case KeymasterDefs.KM_MODE_ECB: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto()
60 case KeymasterDefs.KM_MODE_CBC: in isKeymasterBlockModeIndCpaCompatibleWithSymmetricCrypto()
[all …]
DKeyProperties.java23 import android.security.keymaster.KeymasterDefs;
80 return KeymasterDefs.KM_PURPOSE_ENCRYPT; in toKeymaster()
82 return KeymasterDefs.KM_PURPOSE_DECRYPT; in toKeymaster()
84 return KeymasterDefs.KM_PURPOSE_SIGN; in toKeymaster()
86 return KeymasterDefs.KM_PURPOSE_VERIFY; in toKeymaster()
94 case KeymasterDefs.KM_PURPOSE_ENCRYPT: in fromKeymaster()
96 case KeymasterDefs.KM_PURPOSE_DECRYPT: in fromKeymaster()
98 case KeymasterDefs.KM_PURPOSE_SIGN: in fromKeymaster()
100 case KeymasterDefs.KM_PURPOSE_VERIFY: in fromKeymaster()
174 return KeymasterDefs.KM_ALGORITHM_EC; in toKeymasterAsymmetricKeyAlgorithm()
[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 …]
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 …]
DAndroidKeyStoreSecretKeyFactorySpi.java22 import android.security.keymaster.KeymasterDefs;
93 if (keyCharacteristics.hwEnforced.containsTag(KeymasterDefs.KM_TAG_ORIGIN)) { in getKeyInfo()
96 keyCharacteristics.hwEnforced.getEnum(KeymasterDefs.KM_TAG_ORIGIN, -1)); in getKeyInfo()
97 } else if (keyCharacteristics.swEnforced.containsTag(KeymasterDefs.KM_TAG_ORIGIN)) { in getKeyInfo()
100 keyCharacteristics.swEnforced.getEnum(KeymasterDefs.KM_TAG_ORIGIN, -1)); in getKeyInfo()
105 keyCharacteristics.getUnsignedInt(KeymasterDefs.KM_TAG_KEY_SIZE, -1); in getKeyInfo()
113 keyCharacteristics.getEnums(KeymasterDefs.KM_TAG_PURPOSE)); in getKeyInfo()
118 for (int keymasterPadding : keyCharacteristics.getEnums(KeymasterDefs.KM_TAG_PADDING)) { in getKeyInfo()
141 keyCharacteristics.getEnums(KeymasterDefs.KM_TAG_DIGEST)); in getKeyInfo()
143 keyCharacteristics.getEnums(KeymasterDefs.KM_TAG_BLOCK_MODE)); in getKeyInfo()
[all …]
DAndroidKeyStoreKeyGeneratorSpi.java23 import android.security.keymaster.KeymasterDefs;
47 super(KeymasterDefs.KM_ALGORITHM_AES, 128); in AES()
64 super(KeymasterDefs.KM_ALGORITHM_HMAC, in HmacBase()
72 super(KeymasterDefs.KM_DIGEST_SHA1); in HmacSHA1()
78 super(KeymasterDefs.KM_DIGEST_SHA_2_224); in HmacSHA224()
84 super(KeymasterDefs.KM_DIGEST_SHA_2_256); in HmacSHA256()
90 super(KeymasterDefs.KM_DIGEST_SHA_2_384); in HmacSHA384()
96 super(KeymasterDefs.KM_DIGEST_SHA_2_512); in HmacSHA512()
131 if ((mKeymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_HMAC) && (mKeymasterDigest == -1)) { in AndroidKeyStoreKeyGeneratorSpi()
201 if (mKeymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_HMAC) { in engineInit()
[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()
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.java25 import android.security.keymaster.KeymasterDefs;
90 super(KeymasterDefs.KM_ALGORITHM_RSA); in RSA()
96 super(KeymasterDefs.KM_ALGORITHM_EC); in EC()
211 case KeymasterDefs.KM_ALGORITHM_EC: in initialize()
226 case KeymasterDefs.KM_ALGORITHM_RSA: in initialize()
373 case KeymasterDefs.KM_ALGORITHM_RSA: in initAlgorithmSpecificParameters()
405 case KeymasterDefs.KM_ALGORITHM_EC: in initAlgorithmSpecificParameters()
448 args.addUnsignedInt(KeymasterDefs.KM_TAG_KEY_SIZE, mKeySizeBits); in generateKeyPair()
449 args.addEnum(KeymasterDefs.KM_TAG_ALGORITHM, mKeymasterAlgorithm); in generateKeyPair()
450 args.addEnums(KeymasterDefs.KM_TAG_PURPOSE, mKeymasterPurposes); in generateKeyPair()
[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()
DAndroidKeyStoreSpi.java26 import android.security.keymaster.KeymasterDefs;
464 importArgs.addEnum(KeymasterDefs.KM_TAG_ALGORITHM, in setPrivateKeyEntry()
468 importArgs.addEnums(KeymasterDefs.KM_TAG_PURPOSE, in setPrivateKeyEntry()
471 importArgs.addEnums(KeymasterDefs.KM_TAG_DIGEST, in setPrivateKeyEntry()
475 importArgs.addEnums(KeymasterDefs.KM_TAG_BLOCK_MODE, in setPrivateKeyEntry()
495 importArgs.addEnums(KeymasterDefs.KM_TAG_PADDING, keymasterEncryptionPaddings); in setPrivateKeyEntry()
496 importArgs.addEnums(KeymasterDefs.KM_TAG_PADDING, in setPrivateKeyEntry()
501 importArgs.addDateIfNotNull(KeymasterDefs.KM_TAG_ACTIVE_DATETIME, in setPrivateKeyEntry()
503 importArgs.addDateIfNotNull(KeymasterDefs.KM_TAG_ORIGINATION_EXPIRE_DATETIME, in setPrivateKeyEntry()
505 importArgs.addDateIfNotNull(KeymasterDefs.KM_TAG_USAGE_EXPIRE_DATETIME, in setPrivateKeyEntry()
[all …]
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()
DKeyStoreCryptoOperationChunkedStreamer.java22 import android.security.keymaster.KeymasterDefs;
146 throw new KeyStoreException(KeymasterDefs.KM_ERROR_UNKNOWN_ERROR, in update()
159 throw new KeyStoreException(KeymasterDefs.KM_ERROR_UNKNOWN_ERROR, in update()
266 throw new KeyStoreException(KeymasterDefs.KM_ERROR_UNKNOWN_ERROR, in flush()
294 throw new KeyStoreException(KeymasterDefs.KM_ERROR_INVALID_INPUT_LENGTH, in flush()
DAndroidKeyStoreProvider.java23 import android.security.keymaster.KeymasterDefs;
221 privateKeyAlias, KeymasterDefs.KM_KEY_FORMAT_X509, null, null); in loadAndroidKeyStorePublicKeyFromKeystore()
229 Integer keymasterAlgorithm = keyCharacteristics.getEnum(KeymasterDefs.KM_TAG_ALGORITHM); in loadAndroidKeyStorePublicKeyFromKeystore()
280 Integer keymasterAlgorithm = keyCharacteristics.getEnum(KeymasterDefs.KM_TAG_ALGORITHM); in loadAndroidKeyStoreSecretKeyFromKeystore()
285 List<Integer> keymasterDigests = keyCharacteristics.getEnums(KeymasterDefs.KM_TAG_DIGEST); in loadAndroidKeyStoreSecretKeyFromKeystore()
DAndroidKeyStoreSignatureSpiBase.java25 import android.security.keymaster.KeymasterDefs;
204 mSigning ? KeymasterDefs.KM_PURPOSE_SIGN : KeymasterDefs.KM_PURPOSE_VERIFY, in ensureKeystoreOperationInitialized()
367 case KeymasterDefs.KM_ERROR_VERIFICATION_FAILED: in engineVerify()
/frameworks/base/core/java/android/security/keymaster/
DKeymasterArguments.java70 int tagType = KeymasterDefs.getTagType(tag); in addEnum()
71 if ((tagType != KeymasterDefs.KM_ENUM) && (tagType != KeymasterDefs.KM_ENUM_REP)) { in addEnum()
83 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM_REP) { in addEnums()
98 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM) { in getEnum()
114 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_ENUM_REP) { in getEnums()
141 int tagType = KeymasterDefs.getTagType(tag); in addUnsignedInt()
142 if ((tagType != KeymasterDefs.KM_UINT) && (tagType != KeymasterDefs.KM_UINT_REP)) { in addUnsignedInt()
159 if (KeymasterDefs.getTagType(tag) != KeymasterDefs.KM_UINT) { in getUnsignedInt()
177 int tagType = KeymasterDefs.getTagType(tag); in addUnsignedLong()
178 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.java29 switch (KeymasterDefs.getTagType(tag)) { in KeymasterIntArgument()
30 case KeymasterDefs.KM_UINT: in KeymasterIntArgument()
31 case KeymasterDefs.KM_UINT_REP: in KeymasterIntArgument()
32 case KeymasterDefs.KM_ENUM: in KeymasterIntArgument()
33 case KeymasterDefs.KM_ENUM_REP: in KeymasterIntArgument()
DKeymasterLongArgument.java29 switch (KeymasterDefs.getTagType(tag)) { in KeymasterLongArgument()
30 case KeymasterDefs.KM_ULONG: in KeymasterLongArgument()
31 case KeymasterDefs.KM_ULONG_REP: in KeymasterLongArgument()
DKeymasterBlobArgument.java29 switch (KeymasterDefs.getTagType(tag)) { in KeymasterBlobArgument()
30 case KeymasterDefs.KM_BIGNUM: in KeymasterBlobArgument()
31 case KeymasterDefs.KM_BYTES: in KeymasterBlobArgument()
DKeymasterBooleanArgument.java31 switch (KeymasterDefs.getTagType(tag)) { in KeymasterBooleanArgument()
32 case KeymasterDefs.KM_BOOL: in KeymasterBooleanArgument()
DKeymasterDateArgument.java30 switch (KeymasterDefs.getTagType(tag)) { in KeymasterDateArgument()
31 case KeymasterDefs.KM_DATE: in KeymasterDateArgument()
/frameworks/base/keystore/tests/src/android/security/
DKeyStoreTest.java27 import android.security.keymaster.KeymasterDefs;
705 args.addEnum(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_ENCRYPT); in generateRsaKey()
706 args.addEnum(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_DECRYPT); in generateRsaKey()
707 args.addEnum(KeymasterDefs.KM_TAG_ALGORITHM, KeymasterDefs.KM_ALGORITHM_RSA); in generateRsaKey()
708 args.addEnum(KeymasterDefs.KM_TAG_PADDING, KeymasterDefs.KM_PAD_NONE); in generateRsaKey()
709 args.addBoolean(KeymasterDefs.KM_TAG_NO_AUTH_REQUIRED); in generateRsaKey()
710 args.addUnsignedInt(KeymasterDefs.KM_TAG_KEY_SIZE, 2048); in generateRsaKey()
711 args.addUnsignedLong(KeymasterDefs.KM_TAG_RSA_PUBLIC_EXPONENT, RSAKeyGenParameterSpec.F4); in generateRsaKey()
728 args.addEnum(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_ENCRYPT); in testGenerateRsaWithEntropy()
729 args.addEnum(KeymasterDefs.KM_TAG_PURPOSE, KeymasterDefs.KM_PURPOSE_DECRYPT); in testGenerateRsaWithEntropy()
[all …]
/frameworks/base/keystore/java/android/security/
DKeyStore.java35 import android.security.keymaster.KeymasterDefs;
626 case KeymasterDefs.KM_ERROR_INVALID_AUTHORIZATION_TIMEOUT: in getKeyStoreException()
633 KeymasterDefs.getErrorMessage(errorCode)); in getKeyStoreException()
647 case KeymasterDefs.KM_ERROR_KEY_EXPIRED: in getInvalidKeyException()
649 case KeymasterDefs.KM_ERROR_KEY_NOT_YET_VALID: in getInvalidKeyException()
651 case KeymasterDefs.KM_ERROR_KEY_USER_NOT_AUTHENTICATED: in getInvalidKeyException()
668 keyCharacteristics.getUnsignedLongs(KeymasterDefs.KM_TAG_USER_SECURE_ID); in getInvalidKeyException()

12