Home
last modified time | relevance | path

Searched refs:privateKey (Results 1 – 16 of 16) sorted by relevance

/cts/tests/tests/keystore/src/android/keystore/cts/
DRSACipherTest.java50 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus() local
63 cipher.init(Cipher.DECRYPT_MODE, privateKey); in testNoPaddingEncryptionAndDecryptionSucceedsWithInputShorterThanModulus()
83 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus() local
92 cipher.init(Cipher.DECRYPT_MODE, privateKey); in testNoPaddingEncryptionSucceedsWithPlaintextOneSmallerThanModulus()
200 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); in testNoPaddingDecryptionFailsWithCiphertextOneByteLongerThanModulus() local
201 BigInteger modulus = ((RSAKey) privateKey).getModulus(); in testNoPaddingDecryptionFailsWithCiphertextOneByteLongerThanModulus()
209 cipher.init(Cipher.DECRYPT_MODE, privateKey); in testNoPaddingDecryptionFailsWithCiphertextOneByteLongerThanModulus()
232 PrivateKey privateKey = key.getKeystoreBackedKeyPair().getPrivate(); in testNoPaddingWithZeroMessage() local
242 cipher.init(Cipher.DECRYPT_MODE, privateKey); in testNoPaddingWithZeroMessage()
DRSASignatureTest.java61 PrivateKey privateKey = keyPair.getKeystoreBackedKeyPair().getPrivate(); in testMaxMessageSizeWhenNoDigestUsed() local
73 signature.initSign(privateKey); in testMaxMessageSizeWhenNoDigestUsed()
83 signature.initSign(privateKey); in testMaxMessageSizeWhenNoDigestUsed()
DTestUtils.java162 static void assertKeyPairSelfConsistent(PublicKey publicKey, PrivateKey privateKey) { in assertKeyPairSelfConsistent() argument
164 assertNotNull(privateKey); in assertKeyPairSelfConsistent()
165 assertEquals(publicKey.getAlgorithm(), privateKey.getAlgorithm()); in assertKeyPairSelfConsistent()
172 + privateKey.getClass().getName(), in assertKeyPairSelfConsistent()
173 privateKey instanceof ECKey); in assertKeyPairSelfConsistent()
176 ((ECKey) publicKey).getParams(), ((ECKey) privateKey).getParams()); in assertKeyPairSelfConsistent()
182 + privateKey.getClass().getName(), in assertKeyPairSelfConsistent()
183 privateKey instanceof RSAKey); in assertKeyPairSelfConsistent()
185 ((RSAKey) publicKey).getModulus(), ((RSAKey) privateKey).getModulus()); in assertKeyPairSelfConsistent()
481 PrivateKey privateKey, in importIntoAndroidKeyStore() argument
[all …]
DSignatureTest.java596 PrivateKey privateKey = key.getOriginalKeyPair().getPrivate(); in testSignatureGeneratedByHighestPriorityProviderVerifiesByAndroidKeyStore() local
602 signature.initSign(privateKey); in testSignatureGeneratedByHighestPriorityProviderVerifiesByAndroidKeyStore()
1111 PrivateKey privateKey = TestUtils.importIntoAndroidKeyStore( in assertInitSignSucceeds() local
1116 signature.initSign(privateKey); in assertInitSignSucceeds()
1144 PrivateKey privateKey = TestUtils.importIntoAndroidKeyStore( in assertInitSignThrowsInvalidKeyException() local
1150 signature.initSign(privateKey); in assertInitSignThrowsInvalidKeyException()
1256 PrivateKey privateKey, in generateSignatureFedUsingFixedSizeChunks() argument
1260 signature.initSign(privateKey); in generateSignatureFedUsingFixedSizeChunks()
DKeyStoreTest.java311 … public static void setPrivateKeyNoPassword(KeyStore ks, String alias, PrivateKeyEntry privateKey) in setPrivateKeyNoPassword() argument
313 ks.setKeyEntry(alias, privateKey.getPrivateKey(), null, privateKey.getCertificateChain()); in setPrivateKeyNoPassword()
323 PrivateKeyEntry privateKey) in setPrivateKey() argument
326 privateKey.getPrivateKey(), in setPrivateKey()
328 privateKey.getCertificateChain()); in setPrivateKey()
339 PrivateKeyEntry privateKey) in setPrivateKeyBytes() argument
342 privateKey.getPrivateKey().getEncoded(), in setPrivateKeyBytes()
343 privateKey.getCertificateChain()); in setPrivateKeyBytes()
400 PrivateKeyEntry privateKey = (PrivateKeyEntry) actual; in assertPrivateKey() local
401 assertEquals(getPrivateKey().getPrivateKey(), privateKey.getPrivateKey()); in assertPrivateKey()
[all …]
DKeyPairGeneratorTest.java1707 PrivateKey privateKey, in assertUsableForTLSPeerAuthentication() argument
1723 TestKeyManager.wrap(new MyKeyManager(privateKey, x509CertificateChain)) in assertUsableForTLSPeerAuthentication()
1728 if ("EC".equalsIgnoreCase(privateKey.getAlgorithm())) { in assertUsableForTLSPeerAuthentication()
1733 } else if ("RSA".equalsIgnoreCase(privateKey.getAlgorithm())) { in assertUsableForTLSPeerAuthentication()
1760 fail("Unsupported key algorithm: " + privateKey.getAlgorithm()); in assertUsableForTLSPeerAuthentication()
DAndroidKeyStoreTest.java1914 PrivateKey privateKey = (PrivateKey) ks.getKey(alias, null); in testKeyStore_Encrypting_RSA_NONE_NOPADDING() local
1915 assertNotNull(privateKey); in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
1918 String cipher = privateKey.getAlgorithm() + "/NONE/NOPADDING"; in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
1921 encrypt.init(Cipher.ENCRYPT_MODE, privateKey); in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DFakeKeys.java37 public static final byte[] privateKey = { field in FakeKeys.FAKE_RSA_1
292 public static final byte[] privateKey = { field in FakeKeys.FAKE_DSA_1
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/
DPreSelectedKeyAccessTest.java44 PrivateKey privateKey = KeyChain.getPrivateKey(getContext(), PRE_SELECTED_ALIAS); in testAccessingPreSelectedAliasExpectingSuccess() local
45 assertThat(privateKey).isNotNull(); in testAccessingPreSelectedAliasExpectingSuccess()
50 sign.initSign(privateKey); in testAccessingPreSelectedAliasExpectingSuccess()
DCertSelectionDelegateTest.java104 final PrivateKey privKey = getPrivateKey(FAKE_RSA_1.privateKey, "RSA"); in testCanSelectKeychainKeypairs()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DKeyChainTestActivity.java205 PrivateKey privateKey = KeyChain.getPrivateKey(KeyChainTestActivity.this, alias); in alias() local
206 if (privateKey == null) { in alias()
213 sign.initSign(privateKey); in alias()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/biometrics/
DUtils.java97 PrivateKey privateKey = ((KeyStore.PrivateKeyEntry) entry).getPrivateKey(); in initSignature() local
103 signature.initSign(privateKey); in initSignature()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DCredentialManagementAppTest.java74 getPrivateKey(FakeKeys.FAKE_RSA_1.privateKey, "RSA");
388 private byte[] signDataWithKey(String algoIdentifier, PrivateKey privateKey) throws Exception { in signDataWithKey() argument
391 sign.initSign(privateKey); in signDataWithKey()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/
DCredentialManagementAppActivity.java274 final PrivateKey privateKey = KeyChain.getPrivateKey( in getPrivateKeyAndSignData() local
280 sign.initSign(privateKey); in getPrivateKeyAndSignData()
DKeyChainTest.java486 PrivateKey privateKey = KeyChain.getPrivateKey(KeyChainTest.this, alias); in getPrivateKey() local
487 Log.d(TAG, "privateKey = " + privateKey); in getPrivateKey()
488 return privateKey; in getPrivateKey()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DKeyManagementTest.java123 mFakePrivKey = getPrivateKey(FAKE_RSA_1.privateKey, "RSA"); in setUp()
300 byte[] signDataWithKey(String algoIdentifier, PrivateKey privateKey) throws Exception { in signDataWithKey() argument
303 sign.initSign(privateKey); in signDataWithKey()