Home
last modified time | relevance | path

Searched refs:publicKey (Results 1 – 7 of 7) sorted by relevance

/cts/tests/tests/keystore/src/android/keystore/cts/
DRSACipherTest.java49 PublicKey publicKey = key.getKeystoreBackedKeyPair().getPublic(); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus() local
51 BigInteger modulus = ((RSAKey) publicKey).getModulus(); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus()
60 cipher.init(Cipher.ENCRYPT_MODE, publicKey); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus()
82 PublicKey publicKey = key.getKeystoreBackedKeyPair().getPublic(); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus() local
84 BigInteger modulus = ((RSAKey) publicKey).getModulus(); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
90 cipher.init(Cipher.ENCRYPT_MODE, publicKey); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
110 PublicKey publicKey = key.getKeystoreBackedKeyPair().getPublic(); in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus() local
111 BigInteger modulus = ((RSAKey) publicKey).getModulus(); in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus()
116 cipher.init(Cipher.ENCRYPT_MODE, publicKey); in testNoPaddingEncryptionFailsWithPlaintextEqualToModulus()
138 PublicKey publicKey = key.getKeystoreBackedKeyPair().getPublic(); in testNoPaddingEncryptionFailsWithPlaintextOneLargerThanModulus() local
[all …]
DRSASignatureTest.java60 PublicKey publicKey = keyPair.getKeystoreBackedKeyPair().getPublic(); in testMaxMessageSizeWhenNoDigestUsed() local
62 int modulusSizeBits = ((RSAKey) publicKey).getModulus().bitLength(); in testMaxMessageSizeWhenNoDigestUsed()
77 signature.initVerify(publicKey); in testMaxMessageSizeWhenNoDigestUsed()
91 signature.initVerify(publicKey); in testMaxMessageSizeWhenNoDigestUsed()
DKeyFactoryTest.java215 PublicKey publicKey = keyPair.getPublic(); in testGetKeySpecWithKeystorePublicKeyAcceptsX509EncodedKeySpec() local
219 keyFactory.getKeySpec(publicKey, X509EncodedKeySpec.class); in testGetKeySpecWithKeystorePublicKeyAcceptsX509EncodedKeySpec()
220 MoreAsserts.assertEquals(publicKey.getEncoded(), x509EncodedSpec.getEncoded()); in testGetKeySpecWithKeystorePublicKeyAcceptsX509EncodedKeySpec()
235 PublicKey publicKey = keyPair.getPublic(); in testGetKeySpecWithKeystorePublicKeyAcceptsTransparentKeySpec() local
239 ECPublicKey ecPublicKey = (ECPublicKey) publicKey; in testGetKeySpecWithKeystorePublicKeyAcceptsTransparentKeySpec()
241 keyFactory.getKeySpec(publicKey, ECPublicKeySpec.class); in testGetKeySpecWithKeystorePublicKeyAcceptsTransparentKeySpec()
246 RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey; in testGetKeySpecWithKeystorePublicKeyAcceptsTransparentKeySpec()
248 keyFactory.getKeySpec(publicKey, RSAPublicKeySpec.class); in testGetKeySpecWithKeystorePublicKeyAcceptsTransparentKeySpec()
DSignatureTest.java501 PublicKey publicKey = key.getOriginalKeyPair().getPublic(); in testSignatureGeneratedByAndroidKeyStoreVerifiesByHighestPriorityProvider() local
504 signature.initVerify(publicKey); in testSignatureGeneratedByAndroidKeyStoreVerifiesByHighestPriorityProvider()
511 sigAlgorithm, verificationProvider, publicKey, message, sigBytes); in testSignatureGeneratedByAndroidKeyStoreVerifiesByHighestPriorityProvider()
1081 PublicKey publicKey = TestUtils.importIntoAndroidKeyStore( in assertInitVerifySucceeds() local
1086 signature.initVerify(publicKey); in assertInitVerifySucceeds()
1185 PublicKey publicKey, in assertSignatureVerifiesOneShot() argument
1188 assertSignatureVerifiesOneShot(algorithm, null, publicKey, message, signature); in assertSignatureVerifiesOneShot()
1194 PublicKey publicKey, in assertSignatureVerifiesOneShot() argument
1199 sig.initVerify(publicKey); in assertSignatureVerifiesOneShot()
1212 PublicKey publicKey, in assertSignatureDoesNotVerifyOneShot() argument
[all …]
DAndroidKeyStoreTest.java1930 PublicKey publicKey = ks.getCertificate(alias).getPublicKey(); in testKeyStore_Encrypting_RSA_NONE_NOPADDING() local
1931 assertNotNull(publicKey); in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
1937 int modulusSizeBytes = (((RSAKey) publicKey).getModulus().bitLength() + 7) / 8; in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
1959 PublicKey publicKey = mKeyStore.getCertificate(TEST_ALIAS_2).getPublicKey(); in testKeyStore_PrivateKeyEntry_RSA_PublicKeyWorksWithCrypto() local
1960 assertNotNull(publicKey); in testKeyStore_PrivateKeyEntry_RSA_PublicKeyWorksWithCrypto()
1962 Signature.getInstance("SHA256withRSA").initVerify(publicKey); in testKeyStore_PrivateKeyEntry_RSA_PublicKeyWorksWithCrypto()
1963 Signature.getInstance("NONEwithRSA").initVerify(publicKey); in testKeyStore_PrivateKeyEntry_RSA_PublicKeyWorksWithCrypto()
1964 Signature.getInstance("SHA256withRSA/PSS").initVerify(publicKey); in testKeyStore_PrivateKeyEntry_RSA_PublicKeyWorksWithCrypto()
1966 Cipher.getInstance("RSA/ECB/PKCS1Padding").init(Cipher.ENCRYPT_MODE, publicKey); in testKeyStore_PrivateKeyEntry_RSA_PublicKeyWorksWithCrypto()
1967 Cipher.getInstance("RSA/ECB/NoPadding").init(Cipher.ENCRYPT_MODE, publicKey); in testKeyStore_PrivateKeyEntry_RSA_PublicKeyWorksWithCrypto()
[all …]
DTestUtils.java88 static void assertKeyPairSelfConsistent(PublicKey publicKey, PrivateKey privateKey) { in assertKeyPairSelfConsistent() argument
89 assertNotNull(publicKey); in assertKeyPairSelfConsistent()
91 assertEquals(publicKey.getAlgorithm(), privateKey.getAlgorithm()); in assertKeyPairSelfConsistent()
92 String keyAlgorithm = publicKey.getAlgorithm(); in assertKeyPairSelfConsistent()
95 + publicKey.getClass().getName(), in assertKeyPairSelfConsistent()
96 publicKey instanceof ECKey); in assertKeyPairSelfConsistent()
102 ((ECKey) publicKey).getParams(), ((ECKey) privateKey).getParams()); in assertKeyPairSelfConsistent()
105 + publicKey.getClass().getName(), in assertKeyPairSelfConsistent()
106 publicKey instanceof RSAKey); in assertKeyPairSelfConsistent()
111 ((RSAKey) publicKey).getModulus(), ((RSAKey) privateKey).getModulus()); in assertKeyPairSelfConsistent()
/cts/tools/dex-tools/dex/
Dclasses0.out.dex31853 private java.security.PublicKey publicKey
32177 private final java.security.PublicKey publicKey
76254 private java.security.PublicKey publicKey
79689 private java.security.PublicKey publicKey
89707 private org.bouncycastle.asn1.DERBitString publicKey