Home
last modified time | relevance | path

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

12

/external/boringssl/src/ssl/test/runner/ed25519/
Ded25519.go64 func GenerateKey(rand io.Reader) (publicKey PublicKey, privateKey PrivateKey, err error) {
75 publicKey, privateKey = NewKeyPairFromSeed(seed[:])
76 return publicKey, privateKey, nil
81 func NewKeyPairFromSeed(seed []byte) (publicKey PublicKey, privateKey PrivateKey) {
91 privateKey = make([]byte, PrivateKeySize)
101 copy(privateKey, seed[:])
102 copy(privateKey[32:], publicKeyBytes[:])
105 return publicKey, privateKey
110 func Sign(privateKey PrivateKey, message []byte) []byte {
111 if l := len(privateKey); l != PrivateKeySize {
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/params/
DAsymmetricKeyParameter.java8 boolean privateKey; field in AsymmetricKeyParameter
11 boolean privateKey) in AsymmetricKeyParameter() argument
13 this.privateKey = privateKey; in AsymmetricKeyParameter()
18 return privateKey; in isPrivate()
/external/conscrypt/common/src/main/java/org/conscrypt/
DOpenSSLECPrivateKey.java83 static OpenSSLKey wrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, in wrapJCAPrivateKeyForTLSStackOnly() argument
86 if (privateKey instanceof ECKey) { in wrapJCAPrivateKeyForTLSStackOnly()
87 params = ((ECKey) privateKey).getParams(); in wrapJCAPrivateKeyForTLSStackOnly()
92 throw new InvalidKeyException("EC parameters not available. Private: " + privateKey in wrapJCAPrivateKeyForTLSStackOnly()
95 return wrapJCAPrivateKeyForTLSStackOnly(privateKey, params); in wrapJCAPrivateKeyForTLSStackOnly()
103 static OpenSSLKey wrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, in wrapJCAPrivateKeyForTLSStackOnly() argument
106 if (privateKey instanceof ECKey) { in wrapJCAPrivateKeyForTLSStackOnly()
107 params = ((ECKey) privateKey).getParams(); in wrapJCAPrivateKeyForTLSStackOnly()
111 throw new InvalidKeyException("EC parameters not available: " + privateKey); in wrapJCAPrivateKeyForTLSStackOnly()
122 NativeCrypto.getECPrivateKeyWrapper(privateKey, group.getNativeRef()), true); in wrapJCAPrivateKeyForTLSStackOnly()
DOpenSSLSignatureRawRSA.java89 protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException { in engineInitSign() argument
90 if (privateKey instanceof OpenSSLRSAPrivateKey) { in engineInitSign()
91 OpenSSLRSAPrivateKey rsaPrivateKey = (OpenSSLRSAPrivateKey) privateKey; in engineInitSign()
93 } else if (privateKey instanceof RSAPrivateCrtKey) { in engineInitSign()
94 RSAPrivateCrtKey rsaPrivateKey = (RSAPrivateCrtKey) privateKey; in engineInitSign()
96 } else if (privateKey instanceof RSAPrivateKey) { in engineInitSign()
97 RSAPrivateKey rsaPrivateKey = (RSAPrivateKey) privateKey; in engineInitSign()
DOpenSSLKey.java110 PrivateKey privateKey, PublicKey publicKey) throws InvalidKeyException { in fromPrivateKeyForTLSStackOnly() argument
111 OpenSSLKey result = getOpenSSLKey(privateKey); in fromPrivateKeyForTLSStackOnly()
116 result = fromKeyMaterial(privateKey); in fromPrivateKeyForTLSStackOnly()
121 return wrapJCAPrivateKeyForTLSStackOnly(privateKey, publicKey); in fromPrivateKeyForTLSStackOnly()
188 private static OpenSSLKey wrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, in wrapJCAPrivateKeyForTLSStackOnly() argument
190 String keyAlgorithm = privateKey.getAlgorithm(); in wrapJCAPrivateKeyForTLSStackOnly()
192 return OpenSSLRSAPrivateKey.wrapJCAPrivateKeyForTLSStackOnly(privateKey, publicKey); in wrapJCAPrivateKeyForTLSStackOnly()
194 return OpenSSLECPrivateKey.wrapJCAPrivateKeyForTLSStackOnly(privateKey, publicKey); in wrapJCAPrivateKeyForTLSStackOnly()
DOpenSSLRSAPrivateKey.java115 static OpenSSLKey wrapJCAPrivateKeyForTLSStackOnly(PrivateKey privateKey, in wrapJCAPrivateKeyForTLSStackOnly() argument
118 if (privateKey instanceof RSAKey) { in wrapJCAPrivateKeyForTLSStackOnly()
119 modulus = ((RSAKey) privateKey).getModulus(); in wrapJCAPrivateKeyForTLSStackOnly()
124 throw new InvalidKeyException("RSA modulus not available. Private: " + privateKey in wrapJCAPrivateKeyForTLSStackOnly()
128 NativeCrypto.getRSAPrivateKeyWrapper(privateKey, modulus.toByteArray()), true); in wrapJCAPrivateKeyForTLSStackOnly()
DConscrypt.java326 public static void setChannelIdPrivateKey(SSLSocket socket, PrivateKey privateKey) { in setChannelIdPrivateKey() argument
327 toConscrypt(socket).setChannelIdPrivateKey(privateKey); in setChannelIdPrivateKey()
457 public static void setChannelIdPrivateKey(SSLEngine engine, PrivateKey privateKey) { in setChannelIdPrivateKey() argument
458 toConscrypt(engine).setChannelIdPrivateKey(privateKey); in setChannelIdPrivateKey()
DOpenSSLSignatureRawECDSA.java69 protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException { in engineInitSign() argument
70 key = verifyKey(OpenSSLKey.fromPrivateKey(privateKey)); in engineInitSign()
DConscryptFileDescriptorSocket.java801 public void setChannelIdPrivateKey(PrivateKey privateKey) { in setChannelIdPrivateKey() argument
814 if (privateKey == null) { in setChannelIdPrivateKey()
821 if (privateKey instanceof ECKey) { in setChannelIdPrivateKey()
822 ecParams = ((ECKey) privateKey).getParams(); in setChannelIdPrivateKey()
830 OpenSSLKey.fromECPrivateKeyForTLSStackOnly(privateKey, ecParams); in setChannelIdPrivateKey()
/external/oauth/core/src/main/java/net/oauth/signature/
DRSA_SHA1.java89 private PrivateKey privateKey = null; field in RSA_SHA1
101 privateKey = (PrivateKey)privateKeyObject; in initialize()
103 privateKey = getPrivateKeyFromPem((String)privateKeyObject); in initialize()
105 privateKey = getPrivateKeyFromDer((byte[])privateKeyObject); in initialize()
216 if (privateKey == null) { in sign()
222 signer.initSign(privateKey); in sign()
/external/conscrypt/testing/src/main/java/libcore/java/security/
DTestKeyStore.java509 privateKey(keyStore, keyPassword, "RSA", "RSA")); in build()
513 privateKey(keyStore, keyPassword, "DSA", "DSA")); in build()
569 final PrivateKey privateKey; in createKeys() local
574 privateKey = null; in createKeys()
612 privateKey = kp.getPrivate(); in createKeys()
616 privateKey = privateEntry.getPrivateKey(); in createKeys()
623 PrivateKey signingKey = (caKey == null) ? privateKey : caKey; in createKeys()
643 keyStore.setKeyEntry(privateAlias, privateKey, keyPassword, x509cc); in createKeys()
657 PublicKey publicKey, PrivateKey privateKey, String subject) { in createCa() argument
660 return createCertificate(publicKey, privateKey, principal, principal, 0, true, in createCa()
[all …]
/external/conscrypt/openjdk/src/test/java/org/conscrypt/
DOpenSSLKeyTest.java61 OpenSSLRSAPrivateKey privateKey = (OpenSSLRSAPrivateKey)key.getPrivateKey(); in test_fromPrivateKeyPemInputStream() local
62 assertEquals(RSA_MODULUS, privateKey.getModulus()); in test_fromPrivateKeyPemInputStream()
63 assertEquals(RSA_PRIVATE_EXPONENT, privateKey.getPrivateExponent()); in test_fromPrivateKeyPemInputStream()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/
DPrivateKeyInfo.java53 ASN1Encodable privateKey) in PrivateKeyInfo() argument
56 this(algId, privateKey, null); in PrivateKeyInfo()
61 ASN1Encodable privateKey, in PrivateKeyInfo() argument
65 … this.privKey = new DEROctetString(privateKey.toASN1Primitive().getEncoded(ASN1Encoding.DER)); in PrivateKeyInfo()
/external/v8/src/inspector/
Dinjected-script-native.cc20 v8::Local<v8::Private> privateKey = v8::Private::ForApi( in setOnInjectedScriptHost() local
24 injectedScriptHost->SetPrivate(m_isolate->GetCurrentContext(), privateKey, in setOnInjectedScriptHost()
32 v8::Local<v8::Private> privateKey = v8::Private::ForApi( in fromInjectedScriptHost() local
37 injectedScriptObject->GetPrivate(context, privateKey).ToLocalChecked(); in fromInjectedScriptHost()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/
DDSASigner.java74 PrivateKey privateKey, in engineInitSign() argument
79 engineInitSign(privateKey); in engineInitSign()
83 PrivateKey privateKey) in engineInitSign() argument
88 param = DSAUtil.generatePrivateKeyParameter(privateKey); in engineInitSign()
/external/bouncycastle/bcpkix/src/main/java/org/bouncycastle/operator/jcajce/
DJcaContentSignerBuilder.java56 public ContentSigner build(PrivateKey privateKey) in build() argument
66 sig.initSign(privateKey, random); in build()
70 sig.initSign(privateKey); in build()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/
DDigestSignatureSpi.java90 PrivateKey privateKey) in engineInitSign() argument
93 if (!(privateKey instanceof RSAPrivateKey)) in engineInitSign()
95 …throw new InvalidKeyException("Supplied key (" + getType(privateKey) + ") is not a RSAPrivateKey i… in engineInitSign()
98 CipherParameters param = RSAUtil.generatePrivateKeyParameter((RSAPrivateKey)privateKey); in engineInitSign()
/external/tpm2/
DCryptoEngine.h169 TPM2B_ECC_PARAMETER *privateKey; // Pointer to the private key member
182 TPM2B *privateKey; // The private exponent (not a prime) member
DCpriRSA.c47 pAssert(key != NULL && key->privateKey != NULL && key->publicKey != NULL); in RsaPrivateExponent()
64 || BN_bin2bn(key->privateKey->buffer, key->privateKey->size, bnP) == NULL) in RsaPrivateExponent()
105 BN_bn2bin(bnD, &key->privateKey->buffer[fill]); in RsaPrivateExponent()
106 memset(key->privateKey->buffer, 0, fill); in RsaPrivateExponent()
109 key->privateKey->size = key->publicKey->size; in RsaPrivateExponent()
317 key->privateKey->size, key->privateKey->buffer, in RSADP()
/external/boringssl/src/ssl/test/runner/
Dkey_agreement.go203 privateKey []byte member
208 e.privateKey, x, y, err = elliptic.GenerateKey(e.curve, rand)
232 x, _ = e.curve.ScalarMult(x, y, e.privateKey)
242 privateKey [32]byte member
246 _, err = io.ReadFull(rand, e.privateKey[:])
251 curve25519.ScalarBaseMult(&out, &e.privateKey)
273 curve25519.ScalarMult(&out, &e.privateKey, &peerKeyCopy)
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/
DSignatureSpi.java55 PrivateKey privateKey) in engineInitSign() argument
58 CipherParameters param = ECUtil.generatePrivateKeyParameter(privateKey); in engineInitSign()
/external/conscrypt/openjdk-integ-tests/src/test/java/libcore/javax/net/ssl/
DKeyManagerFactoryTest.java239 PrivateKey privateKey = km.getPrivateKey(alias); in test_X509KeyManager_alias() local
241 String keyAlgName = privateKey.getAlgorithm(); in test_X509KeyManager_alias()
252 assertEquals(keyType, privateKeyEntry.getPrivateKey(), privateKey); in test_X509KeyManager_alias()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/
DECUtil.java264 … PrivateKey privateKey = BouncyCastleProvider.getPrivateKey(PrivateKeyInfo.getInstance(bytes)); in generatePrivateKeyParameter() local
266 if (privateKey instanceof java.security.interfaces.ECPrivateKey) in generatePrivateKeyParameter()
268 return ECUtil.generatePrivateKeyParameter(privateKey); in generatePrivateKeyParameter()
/external/libcups/cups/
Dhttp-private.h119 …ificate(CFArrayRef subject, CFDictionaryRef parameters, SecKeyRef publicKey, SecKeyRef privateKey);
120 …f SecIdentityCreate(CFAllocatorRef allocator, SecCertificateRef certificate, SecKeyRef privateKey);
/external/conscrypt/android/src/main/java/org/conscrypt/
DPreKitKatPlatformOpenSSLSocketImplAdapter.java416 public void setChannelIdPrivateKey(PrivateKey privateKey) { in setChannelIdPrivateKey() argument
417 delegate.setChannelIdPrivateKey(privateKey); in setChannelIdPrivateKey()

12