Home
last modified time | relevance | path

Searched refs:isStrongBox (Results 1 – 15 of 15) sorted by relevance

/external/wycheproof/keystore-cts/java/com/google/security/wycheproof/testcases/
DAesGcmTest.java89 private SecretKey setKeystoreEntry(String alias, SecretKeySpec key, boolean isStrongBox) in setKeystoreEntry() argument
98 .setIsStrongBoxBacked(isStrongBox) in setKeystoreEntry()
109 GcmTestVector testVector, boolean isStrongBox) in getInitializedCipherInstance() argument
113 cipher.init(operationMode, getKey(isStrongBox ? testVector.alias_sb : testVector.alias), in getInitializedCipherInstance()
237 private Iterable<GcmTestVector> getTestVectors(boolean isStrongBox) throws Exception { in getTestVectors() argument
245 test, isStrongBox); in getTestVectors()
265 private void testVectors(boolean isStrongBox) throws Exception { in testVectors() argument
266 for (GcmTestVector test : getTestVectors(isStrongBox)) { in testVectors()
268 test, isStrongBox); in testVectors()
285 private void testEncryptWithEmptyArrays(boolean isStrongBox) throws Exception { in testEncryptWithEmptyArrays() argument
[all …]
DCipherInputStreamTest.java75 boolean isStrongBox) throws Exception { in randomKey() argument
82 .setIsStrongBoxBacked(isStrongBox) in randomKey()
108 int ivSize, int tagSize, int ptSize, int aadSize, boolean isStrongBox) throws Exception { in TestVector() argument
110 this.key = randomKey(algorithm, alias, keySize, isStrongBox); in TestVector()
128 boolean isStrongBox) in getTestVectors() argument
139 ivSize, tagSize, ptSize, aadSize, isStrongBox)); in getTestVectors()
253 private void testAesGcm(boolean isStrongBox) throws Exception { in testAesGcm() argument
261 tagSizes, ptSizes, aadSizes, isStrongBox); in testAesGcm()
275 private void testCorruptAesGcm(boolean isStrongBox) throws Exception { in testCorruptAesGcm() argument
283 ivSizes, tagSizes, ptSizes, aadSizes, isStrongBox); in testCorruptAesGcm()
[all …]
DRsaOaepTest.java61 PrivateKey privKey, String digest, String mgfDigest, boolean isStrongBox) in saveKeyPairToKeystoreAndReturnPrivateKey() argument
69 .setIsStrongBoxBacked(isStrongBox); in saveKeyPairToKeystoreAndReturnPrivateKey()
169 protected static PrivateKey getPrivateKey(JsonObject object, boolean isStrongBox) in getPrivateKey() argument
182 if (!KeyStoreUtil.isSupportedDigest(digest, isStrongBox) in getPrivateKey()
183 || !KeyStoreUtil.isSupportedMgfDigest(mgfDigest, isStrongBox) in getPrivateKey()
184 || !KeyStoreUtil.isSupportedRsaKeySize(keysize, isStrongBox)) { in getPrivateKey()
188 isStrongBox); in getPrivateKey()
198 JsonObject test, boolean isStrongBox) throws Exception { in getOaepParameters() argument
208 KeyStoreUtil.getFeatureVersionKeystore(isStrongBox) >= KeyStoreUtil.KM_VERSION_KEYMINT_3); in getOaepParameters()
267 public void testOaep(String filename, boolean allowSkippingKeys, boolean isStrongBox) in testOaep() argument
[all …]
DCipherOutputStreamTest.java75 boolean isStrongBox) throws Exception{ in randomKey() argument
82 .setIsStrongBoxBacked(isStrongBox) in randomKey()
108 int ivSize, int tagSize, int ptSize, int aadSize, boolean isStrongBox) throws Exception { in TestVector() argument
110 this.key = randomKey(algorithm, alias, keySize, isStrongBox); in TestVector()
128 boolean isStrongBox) in getTestVectors() argument
139 ivSize, tagSize, ptSize, aadSize, isStrongBox)); in getTestVectors()
226 private void testAesGcm(boolean isStrongBox) throws Exception { in testAesGcm() argument
234 ivSizes, tagSizes, ptSizes, aadSizes, isStrongBox); in testAesGcm()
255 private void testEmptyPlaintext(boolean isStrongBox) throws Exception { in testEmptyPlaintext() argument
263 ivSizes, tagSizes, ptSizes, aadSizes, isStrongBox); in testEmptyPlaintext()
DEcdhTest.java107 boolean isStrongBox) in getKeystorePrivateKey() argument
112 .setIsStrongBoxBacked(isStrongBox) in getKeystorePrivateKey()
117 private KeyPair generateECKeyPair(String alias, ECGenParameterSpec ecSpec, boolean isStrongBox) in generateECKeyPair() argument
123 .setIsStrongBoxBacked(isStrongBox) in generateECKeyPair()
553 private void testBasic(boolean isStrongBox) throws Exception { in testBasic() argument
555 isStrongBox); in testBasic()
557 isStrongBox); in testBasic()
602 public void testModifiedPublic(String algorithm, boolean isStrongBox) throws Exception { in testModifiedPublic() argument
605 isStrongBox); in testModifiedPublic()
643 public void testModifiedPublicSpec(String algorithm, boolean isStrongBox) throws Exception { in testModifiedPublicSpec() argument
[all …]
DMacTest.java49 private static Key getKeyStoreSecretKey(byte[] keyMaterial, String algorithm, boolean isStrongBox) in getKeyStoreSecretKey() argument
54 .setIsStrongBoxBacked(isStrongBox).build()); in getKeyStoreSecretKey()
199 public void testMac(String algorithm, int keySize, boolean isStrongBox) throws Exception { in testMac() argument
208 testUpdate(algorithm, getKeyStoreSecretKey(key, algorithm, isStrongBox)); in testMac()
334 boolean isStrongBox) throws Exception { in testLongMac() argument
336 Key key = getKeyStoreSecretKey(TestUtil.hexToBytes(keyhex), algorithm, isStrongBox); in testLongMac()
385 private void testLongMacSha256(boolean isStrongBox) throws Exception { in testLongMacSha256() argument
392 isStrongBox); in testLongMacSha256()
399 isStrongBox); in testLongMacSha256()
DEcdsaTest.java62 boolean isStrongBox) throws Exception { in getKeystorePrivateKey() argument
68 .setIsStrongBoxBacked(isStrongBox) in getKeystorePrivateKey()
197 boolean testParameters(String algorithm, String curve, boolean isStrongBox) throws Exception { in testParameters() argument
198 if (isStrongBox) { in testParameters()
230 signer.initSign(getKeystorePrivateKey(pub, priv, isStrongBox)); in testParameters()
261 boolean isStrongBox) throws Exception { in testBias() argument
262 if (isStrongBox) { in testBias()
272 keyPair.getPrivate(), isStrongBox); in testBias()
405 public void testNullRandom(String algorithm, String curve, boolean isStrongBox) in testNullRandom() argument
407 if (isStrongBox) { in testNullRandom()
[all …]
DRsaSignatureTest.java61 boolean isStrongBox) throws Exception { in getKeystorePrivateKey() argument
67 .setIsStrongBoxBacked(isStrongBox) in getKeystorePrivateKey()
1121 private void testBasic(boolean isStrongBox) throws Exception { in testBasic() argument
1137 signer.initSign(getKeystorePrivateKey(pub, priv, isStrongBox)); in testBasic()
1277 private void testFaultySigner(boolean isStrongBox) throws Exception { in testFaultySigner() argument
1318 signer.initSign(getKeystorePrivateKey(pubKey, validPrivKey, isStrongBox)); in testFaultySigner()
1340 .setIsStrongBoxBacked(isStrongBox) in testFaultySigner()
DJsonCipherTest.java80 byte[] key, byte[] iv, boolean isStrongBox) throws Exception { in initCipher() argument
93 .setIsStrongBoxBacked(isStrongBox) in initCipher()
132 public void testCipher(String filename, String algorithm, boolean isStrongBox) throws Exception { in testCipher() argument
173 initCipher(cipher, algorithm, Cipher.ENCRYPT_MODE, key, iv, isStrongBox); in testCipher()
204 initCipher(cipher, algorithm, Cipher.DECRYPT_MODE, key, iv, isStrongBox); in testCipher()
DJsonAeadTest.java92 String algorithm, int opmode, byte[] key, byte[] iv, int tagSize, boolean isStrongBox) in getInitializedCipher() argument
102 .setIsStrongBoxBacked(isStrongBox) in getInitializedCipher()
158 public void testAead(String filename, String algorithm, boolean isStrongBox) throws Exception { in testAead() argument
211 isStrongBox); in testAead()
243 isStrongBox); in testAead()
DJsonMacTest.java76 boolean isStrongBox) throws Exception { in computeMac() argument
95 .setIsStrongBoxBacked(isStrongBox) in computeMac()
117 public void testMac(String filename, boolean isStrongBox) throws Exception { in testMac() argument
139 if (isStrongBox && (key.length < 8 || key.length > 32)) { in testMac()
148 computedTag = computeMac(algorithm, key, msg, tagSize, isStrongBox); in testMac()
DRsaEncryptionTest.java80 protected static PrivateKey getPrivateKey(JsonObject object, boolean isStrongBox) in getPrivateKey() argument
94 .setIsStrongBoxBacked(isStrongBox) in getPrivateKey()
151 public void testDecryption(String filename, boolean isStrongBox) throws Exception { in testDecryption() argument
166 PrivateKey key = getPrivateKey(group, isStrongBox); in testDecryption()
DJsonSignatureTest.java58 boolean isStrongBox) throws Exception { in getKeystorePrivateKey() argument
62 .setIsStrongBoxBacked(isStrongBox) in getKeystorePrivateKey()
266 boolean isStrongBox) throws Exception { in getPrivateKey() argument
276 return getKeystorePrivateKey(pubKey, intermediateKey, digest, isStrongBox); in getPrivateKey()
442 boolean allowSkippingKeys, boolean isStrongBox) throws Exception { in testSigning() argument
451 key = getPrivateKey(group, signatureAlgorithm, isStrongBox); in testSigning()
483 if (!isStrongBox) { in testSigning()
DJsonEcdhTest.java93 public void testEcdhComp(String filename, boolean isStrongBox) throws Exception { in testEcdhComp() argument
128 .setIsStrongBoxBacked(isStrongBox) in testEcdhComp()
/external/wycheproof/keystore-cts/java/android/keystore/cts/util/
DKeyStoreUtil.java97 public static int getFeatureVersionKeystore(boolean isStrongBox) { in getFeatureVersionKeystore() argument
98 if (isStrongBox) { in getFeatureVersionKeystore()
114 public static boolean isSupportedDigest(String digest, boolean isStrongBox) { in isSupportedDigest() argument
115 if (isStrongBox) { in isSupportedDigest()
121 public static boolean isSupportedMgfDigest(String digest, boolean isStrongBox) { in isSupportedMgfDigest() argument
122 if (isStrongBox) { in isSupportedMgfDigest()
129 public static boolean isSupportedRsaKeySize(int keySize, boolean isStrongBox) { in isSupportedRsaKeySize() argument
130 if (isStrongBox) { in isSupportedRsaKeySize()
184 public static void assumeKeyMintV1OrNewer(boolean isStrongBox) { in assumeKeyMintV1OrNewer() argument
186 KeyStoreUtil.getFeatureVersionKeystore(isStrongBox) >= KM_VERSION_KEYMINT_1); in assumeKeyMintV1OrNewer()