Home
last modified time | relevance | path

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

/cts/common/device-side/util/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/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.java107 static void assertKeyPairSelfConsistent(PublicKey publicKey, PrivateKey privateKey) { in assertKeyPairSelfConsistent() argument
109 assertNotNull(privateKey); in assertKeyPairSelfConsistent()
110 assertEquals(publicKey.getAlgorithm(), privateKey.getAlgorithm()); in assertKeyPairSelfConsistent()
117 + privateKey.getClass().getName(), in assertKeyPairSelfConsistent()
118 privateKey instanceof ECKey); in assertKeyPairSelfConsistent()
121 ((ECKey) publicKey).getParams(), ((ECKey) privateKey).getParams()); in assertKeyPairSelfConsistent()
127 + privateKey.getClass().getName(), in assertKeyPairSelfConsistent()
128 privateKey instanceof RSAKey); in assertKeyPairSelfConsistent()
130 ((RSAKey) publicKey).getModulus(), ((RSAKey) privateKey).getModulus()); in assertKeyPairSelfConsistent()
423 PrivateKey privateKey, in importIntoAndroidKeyStore() argument
[all …]
DSignatureTest.java535 PrivateKey privateKey = key.getOriginalKeyPair().getPrivate(); in testSignatureGeneratedByHighestPriorityProviderVerifiesByAndroidKeyStore() local
541 signature.initSign(privateKey); in testSignatureGeneratedByHighestPriorityProviderVerifiesByAndroidKeyStore()
582 PrivateKey privateKey = keyPair.getPrivate(); in testEntropyConsumption() local
587 signature.initSign(privateKey, rng); in testEntropyConsumption()
603 (TestUtils.getKeySizeBits(privateKey) + 7) / 8; in testEntropyConsumption()
1104 PrivateKey privateKey = TestUtils.importIntoAndroidKeyStore( in assertInitSignSucceeds() local
1109 signature.initSign(privateKey); in assertInitSignSucceeds()
1137 PrivateKey privateKey = TestUtils.importIntoAndroidKeyStore( in assertInitSignThrowsInvalidKeyException() local
1143 signature.initSign(privateKey); in assertInitSignThrowsInvalidKeyException()
1249 PrivateKey privateKey, in generateSignatureFedUsingFixedSizeChunks() argument
[all …]
DKeyStoreTest.java310 … public static void setPrivateKeyNoPassword(KeyStore ks, String alias, PrivateKeyEntry privateKey) in setPrivateKeyNoPassword() argument
312 ks.setKeyEntry(alias, privateKey.getPrivateKey(), null, privateKey.getCertificateChain()); in setPrivateKeyNoPassword()
322 PrivateKeyEntry privateKey) in setPrivateKey() argument
325 privateKey.getPrivateKey(), in setPrivateKey()
327 privateKey.getCertificateChain()); in setPrivateKey()
338 PrivateKeyEntry privateKey) in setPrivateKeyBytes() argument
341 privateKey.getPrivateKey().getEncoded(), in setPrivateKeyBytes()
342 privateKey.getCertificateChain()); in setPrivateKeyBytes()
399 PrivateKeyEntry privateKey = (PrivateKeyEntry) actual; in assertPrivateKey() local
400 assertEquals(getPrivateKey().getPrivateKey(), privateKey.getPrivateKey()); in assertPrivateKey()
[all …]
DKeyPairGeneratorTest.java1356 PrivateKey privateKey, in assertUsableForTLSPeerAuthentication() argument
1372 TestKeyManager.wrap(new MyKeyManager(privateKey, x509CertificateChain)) in assertUsableForTLSPeerAuthentication()
1377 if ("EC".equalsIgnoreCase(privateKey.getAlgorithm())) { in assertUsableForTLSPeerAuthentication()
1382 } else if ("RSA".equalsIgnoreCase(privateKey.getAlgorithm())) { in assertUsableForTLSPeerAuthentication()
1409 fail("Unsupported key algorithm: " + privateKey.getAlgorithm()); in assertUsableForTLSPeerAuthentication()
DAndroidKeyStoreTest.java1953 PrivateKey privateKey = (PrivateKey) ks.getKey(alias, null); in testKeyStore_Encrypting_RSA_NONE_NOPADDING() local
1954 assertNotNull(privateKey); in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
1957 String cipher = privateKey.getAlgorithm() + "/NONE/NOPADDING"; in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
1960 encrypt.init(Cipher.ENCRYPT_MODE, privateKey); in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DKeyManagementTest.java114 final PrivateKey privKey = getPrivateKey(FAKE_RSA_1.privateKey , "RSA"); in testCanInstallAndRemoveValidRsaKeypair()
138 final PrivateKey privKey = getPrivateKey(FAKE_RSA_1.privateKey , "RSA"); in testCanInstallWithAutomaticAccess()
203 final PrivateKey privKey = getPrivateKey(FAKE_RSA_1.privateKey , "RSA"); in testGrantsDoNotPersistBetweenInstallations()
230 final PrivateKey privKey = getPrivateKey(FAKE_RSA_1.privateKey, "RSA"); in testNullKeyParamsFailPredictably()
246 final PrivateKey privKey = getPrivateKey(FAKE_RSA_1.privateKey, "RSA"); in testNullAdminComponentIsDenied()
257 final PrivateKey privKey = getPrivateKey(FAKE_RSA_1.privateKey , "RSA"); in testNotUserSelectableAliasCanBeChosenViaPolicy()
274 byte[] signDataWithKey(String algoIdentifier, PrivateKey privateKey) throws Exception { in signDataWithKey() argument
277 sign.initSign(privateKey); in signDataWithKey()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DKeyChainTestActivity.java210 PrivateKey privateKey = KeyChain.getPrivateKey(KeyChainTestActivity.this, alias); in alias() local
213 sign.initSign(privateKey); in alias()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/
DKeyChainTest.java434 PrivateKey privateKey = KeyChain.getPrivateKey(KeyChainTest.this, alias); in getPrivateKey() local
435 Log.d(TAG, "privateKey = " + privateKey); in getPrivateKey()
436 return privateKey; in getPrivateKey()