Home
last modified time | relevance | path

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

12

/external/boringssl/src/ssl/test/runner/ed25519/
Ded25519.go44 publicKey := make([]byte, PublicKeySize)
45 copy(publicKey, priv[32:])
46 return PublicKey(publicKey)
64 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) {
92 publicKey = make([]byte, PublicKeySize)
103 copy(publicKey, publicKeyBytes[:])
105 return publicKey, privateKey
[all …]
/external/conscrypt/platform/src/main/java/org/conscrypt/ct/
DCTLogInfo.java38 private final PublicKey publicKey; field in CTLogInfo
42 public CTLogInfo(PublicKey publicKey, String description, String url) { in CTLogInfo() argument
45 .digest(publicKey.getEncoded()); in CTLogInfo()
51 this.publicKey = publicKey; in CTLogInfo()
64 return publicKey; in getPublicKey()
86 this.publicKey.equals(that.publicKey) && in equals()
94 hash = hash * 31 + publicKey.hashCode(); in hashCode()
129 signature.initVerify(publicKey); in verifySingleSCT()
/external/conscrypt/platform/src/main/java/org/conscrypt/
DTrustedCertificateIndex.java113 PublicKey publicKey; in findByIssuerAndSignature() local
117 publicKey = caCert.getPublicKey(); in findByIssuerAndSignature()
119 publicKey = anchor.getCAPublicKey(); in findByIssuerAndSignature()
121 cert.verify(publicKey); in findByIssuerAndSignature()
187 PublicKey publicKey; in findAllByIssuerAndSignature() local
190 publicKey = caCert.getPublicKey(); in findAllByIssuerAndSignature()
192 publicKey = anchor.getCAPublicKey(); in findAllByIssuerAndSignature()
194 if (publicKey == null) { in findAllByIssuerAndSignature()
197 cert.verify(publicKey); in findAllByIssuerAndSignature()
/external/oauth/core/src/main/java/net/oauth/signature/
DRSA_SHA1.java90 private PublicKey publicKey = null; field in RSA_SHA1
117 publicKey = (PublicKey)publicKeyObject; in initialize()
119 publicKey = getPublicKeyFromPem((String)publicKeyObject); in initialize()
121 publicKey = getPublicKeyFromDer((byte[])publicKeyObject); in initialize()
132 publicKey = ((X509Certificate) certObject).getPublicKey(); in initialize()
134 publicKey = getPublicKeyFromPemCert((String)certObject); in initialize()
136 publicKey = getPublicKeyFromDerCert((byte[])certObject); in initialize()
229 if (publicKey == null) { in verify()
235 verifier.initVerify(publicKey); in verify()
/external/tpm2/
DCpriRSA.c47 pAssert(key != NULL && key->privateKey != NULL && key->publicKey != NULL); in RsaPrivateExponent()
62 pAssert(key->publicKey->size <= MAX_RSA_KEY_BYTES); in RsaPrivateExponent()
63 if( BN_bin2bn(key->publicKey->buffer, key->publicKey->size, bnN) == NULL in RsaPrivateExponent()
104 fill = key->publicKey->size - BN_num_bytes(bnD); in RsaPrivateExponent()
109 key->privateKey->size = key->publicKey->size; in RsaPrivateExponent()
135 TPM2B *publicKey, // IN/OUT: an input if only one prime is in _cpri__TestKeyRSA() argument
152 pAssert(publicKey != NULL && prime1 != NULL); in _cpri__TestKeyRSA()
155 && publicKey->size <= MAX_RSA_KEY_BYTES); in _cpri__TestKeyRSA()
157 if(publicKey->size/2 != prime1->size) in _cpri__TestKeyRSA()
191 if(BN_num_bits(bnN) != (publicKey->size * 8)) in _cpri__TestKeyRSA()
[all …]
/external/bouncycastle/bcpkix/src/main/java/org/bouncycastle/operator/jcajce/
DJcaContentVerifierProviderBuilder.java114 public ContentVerifierProvider build(final PublicKey publicKey) in build() argument
132 SignatureOutputStream stream = createSignatureStream(algorithm, publicKey); in build()
134 Signature rawSig = createRawSig(algorithm, publicKey); in build()
148 public ContentVerifierProvider build(SubjectPublicKeyInfo publicKey)
151 return this.build(helper.convertPublicKey(publicKey));
154 …ate SignatureOutputStream createSignatureStream(AlgorithmIdentifier algorithm, PublicKey publicKey)
161 sig.initVerify(publicKey);
171 private Signature createRawSig(AlgorithmIdentifier algorithm, PublicKey publicKey)
180 rawSig.initVerify(publicKey);
/external/boringssl/src/ssl/test/runner/
Dkey_agreement.go242 offer(rand io.Reader) (publicKey []byte, err error)
246 accept(rand io.Reader, peerKey []byte) (publicKey []byte, preMasterSecret []byte, err error)
259 func (e *ellipticECDHCurve) offer(rand io.Reader) (publicKey []byte, err error) {
268 func (e *ellipticECDHCurve) accept(rand io.Reader, peerKey []byte) (publicKey []byte, preMasterSecr…
269 publicKey, err = e.offer(rand)
298 func (e *x25519ECDHCurve) offer(rand io.Reader) (publicKey []byte, err error) {
308 func (e *x25519ECDHCurve) accept(rand io.Reader, peerKey []byte) (publicKey []byte, preMasterSecret…
309 publicKey, err = e.offer(rand)
434 publicKey := getCertificatePublicKey(cert)
437 _, edsaOk := publicKey.(*ecdsa.PublicKey)
[all …]
/external/bouncycastle/bcpkix/src/main/java/org/bouncycastle/cms/jcajce/
DJcaSimpleSignerInfoVerifierBuilder.java56 ContentVerifierProvider createContentVerifierProvider(PublicKey publicKey) in createContentVerifierProvider() argument
59 return new JcaContentVerifierProviderBuilder().build(publicKey); in createContentVerifierProvider()
91 ContentVerifierProvider createContentVerifierProvider(PublicKey publicKey) in createContentVerifierProvider() argument
94 … return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(publicKey); in createContentVerifierProvider()
126 ContentVerifierProvider createContentVerifierProvider(PublicKey publicKey) in createContentVerifierProvider() argument
129 return new JcaContentVerifierProviderBuilder().setProvider(provider).build(publicKey); in createContentVerifierProvider()
DJcaSignerInfoVerifierBuilder.java86 ContentVerifierProvider createContentVerifierProvider(PublicKey publicKey) in createContentVerifierProvider() argument
89 return new JcaContentVerifierProviderBuilder().build(publicKey); in createContentVerifierProvider()
121 ContentVerifierProvider createContentVerifierProvider(PublicKey publicKey) in createContentVerifierProvider() argument
124 … return new JcaContentVerifierProviderBuilder().setProvider(providerName).build(publicKey); in createContentVerifierProvider()
156 ContentVerifierProvider createContentVerifierProvider(PublicKey publicKey) in createContentVerifierProvider() argument
159 return new JcaContentVerifierProviderBuilder().setProvider(provider).build(publicKey); in createContentVerifierProvider()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/sec/
DECPrivateKey.java94 DERBitString publicKey, in ECPrivateKey() argument
97 this(key.bitLength(), key, publicKey, parameters); in ECPrivateKey()
111 DERBitString publicKey, in ECPrivateKey() argument
126 if (publicKey != null) in ECPrivateKey()
128 v.add(new DERTaggedObject(true, 1, publicKey)); in ECPrivateKey()
DECPrivateKeyStructure.java57 DERBitString publicKey, in ECPrivateKeyStructure() argument
72 if (publicKey != null) in ECPrivateKeyStructure()
74 v.add(new DERTaggedObject(true, 1, publicKey)); in ECPrivateKeyStructure()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/
DBCECPrivateKey.java48 private transient DERBitString publicKey; field in BCECPrivateKey
112 this.publicKey = key.publicKey; in BCECPrivateKey()
146 publicKey = getPublicKeyDetails(pubKey); in BCECPrivateKey()
183 publicKey = getPublicKeyDetails(pubKey); in BCECPrivateKey()
187 publicKey = null; // not all curves are encodable in BCECPrivateKey()
233 this.publicKey = ec.getPublicKey(); in populateFromPrivKeyInfo()
275 if (publicKey != null) in getEncoded()
277 …cture = new org.bouncycastle.asn1.sec.ECPrivateKey(orderBitLength, this.getS(), publicKey, params); in getEncoded()
/external/conscrypt/common/src/main/java/org/conscrypt/
DOpenSSLSignatureRawRSA.java110 protected void engineInitVerify(PublicKey publicKey) throws InvalidKeyException { in engineInitVerify() argument
111 if (publicKey instanceof OpenSSLRSAPublicKey) { in engineInitVerify()
112 OpenSSLRSAPublicKey rsaPublicKey = (OpenSSLRSAPublicKey) publicKey; in engineInitVerify()
114 } else if (publicKey instanceof RSAPublicKey) { in engineInitVerify()
115 RSAPublicKey rsaPublicKey = (RSAPublicKey) publicKey; in engineInitVerify()
DOpenSSLKey.java115 PrivateKey privateKey, PublicKey publicKey) throws InvalidKeyException { in fromPrivateKeyForTLSStackOnly() argument
126 return wrapJCAPrivateKeyForTLSStackOnly(privateKey, publicKey); in fromPrivateKeyForTLSStackOnly()
198 PublicKey publicKey) throws InvalidKeyException { in wrapJCAPrivateKeyForTLSStackOnly() argument
201 return OpenSSLRSAPrivateKey.wrapJCAPrivateKeyForTLSStackOnly(privateKey, publicKey); in wrapJCAPrivateKeyForTLSStackOnly()
203 return OpenSSLECPrivateKey.wrapJCAPrivateKeyForTLSStackOnly(privateKey, publicKey); in wrapJCAPrivateKeyForTLSStackOnly()
DOpenSSLRSAPrivateKey.java116 PublicKey publicKey) throws InvalidKeyException { in wrapJCAPrivateKeyForTLSStackOnly() argument
120 } else if (publicKey instanceof RSAKey) { in wrapJCAPrivateKeyForTLSStackOnly()
121 modulus = ((RSAKey) publicKey).getModulus(); in wrapJCAPrivateKeyForTLSStackOnly()
125 + ", public: " + publicKey); in wrapJCAPrivateKeyForTLSStackOnly()
DOpenSSLECPrivateKey.java85 PublicKey publicKey) throws InvalidKeyException { in wrapJCAPrivateKeyForTLSStackOnly() argument
89 } else if (publicKey instanceof ECKey) { in wrapJCAPrivateKeyForTLSStackOnly()
90 params = ((ECKey) publicKey).getParams(); in wrapJCAPrivateKeyForTLSStackOnly()
94 + ", public: " + publicKey); in wrapJCAPrivateKeyForTLSStackOnly()
DOpenSSLSignatureRawECDSA.java74 protected void engineInitVerify(PublicKey publicKey) throws InvalidKeyException { in engineInitVerify() argument
75 key = verifyKey(OpenSSLKey.fromPublicKey(publicKey)); in engineInitVerify()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/x509/
DSubjectPublicKeyInfo.java52 ASN1Encodable publicKey) in SubjectPublicKeyInfo() argument
55 this.keyData = new DERBitString(publicKey); in SubjectPublicKeyInfo()
61 byte[] publicKey) in SubjectPublicKeyInfo() argument
63 this.keyData = new DERBitString(publicKey); in SubjectPublicKeyInfo()
/external/conscrypt/openjdk/src/test/java/org/conscrypt/
DOpenSSLKeyTest.java53 OpenSSLRSAPublicKey publicKey = (OpenSSLRSAPublicKey)key.getPublicKey(); in test_fromPublicKeyPemInputStream() local
54 assertEquals(RSA_MODULUS, publicKey.getModulus()); in test_fromPublicKeyPemInputStream()
55 assertEquals(RSA_PUBLIC_EXPONENT, publicKey.getPublicExponent()); in test_fromPublicKeyPemInputStream()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/
DJCEECPrivateKey.java51 private DERBitString publicKey; field in JCEECPrivateKey
108 this.publicKey = key.publicKey; in JCEECPrivateKey()
139 publicKey = getPublicKeyDetails(pubKey); in JCEECPrivateKey()
178 publicKey = getPublicKeyDetails(pubKey); in JCEECPrivateKey()
269 this.publicKey = ec.getPublicKey(); in populateFromPrivKeyInfo()
328 if (publicKey != null) in getEncoded()
330 keyStructure = new ECPrivateKeyStructure(this.getS(), publicKey, params); in getEncoded()
/external/google-tv-pairing-protocol/java/src/com/google/polo/ssl/
DCsrUtil.java107 public static X509Certificate[] issueX509V3Certificate(String name, PublicKey publicKey, in issueX509V3Certificate() argument
117 …return issueX509V3Certificate(name, publicKey, rootCert, rootPair, notBefore, notAfter, serialNumb… in issueX509V3Certificate()
121 static X509Certificate[] issueX509V3Certificate(String name, PublicKey publicKey, in issueX509V3Certificate() argument
134 certGen.setPublicKey(publicKey); in issueX509V3Certificate()
142 SubjectKeyIdentifier.getInstance(publicKey.getEncoded())); in issueX509V3Certificate()
DSslUtil.java212 PublicKey publicKey, X509Name name, BigInteger serialNumber) { in createAuthorityKeyIdentifier() argument
217 (ASN1Sequence)new ASN1InputStream(publicKey.getEncoded()).readObject()); in createAuthorityKeyIdentifier()
230 static SubjectKeyIdentifier createSubjectKeyIdentifier(PublicKey publicKey) { in createSubjectKeyIdentifier() argument
231 SubjectPublicKeyInfo info = SubjectPublicKeyInfo.getInstance(publicKey.getEncoded()); in createSubjectKeyIdentifier()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/
DDigestSignatureSpi.java70 PublicKey publicKey) in engineInitVerify() argument
73 if (!(publicKey instanceof RSAPublicKey)) in engineInitVerify()
75 …throw new InvalidKeyException("Supplied key (" + getType(publicKey) + ") is not a RSAPublicKey ins… in engineInitVerify()
78 CipherParameters param = RSAUtil.generatePublicKeyParameter((RSAPublicKey)publicKey); in engineInitVerify()
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/tls/
DRealTrustRootIndex.java48 PublicKey publicKey = caCert.getPublicKey(); in findByIssuerAndSignature() local
50 cert.verify(publicKey); in findByIssuerAndSignature()
/external/conscrypt/testing/src/main/java/org/conscrypt/java/security/
DTestKeyStore.java570 final PublicKey publicKey; in createKeys() local
575 publicKey = null; in createKeys()
613 publicKey = kp.getPublic(); in createKeys()
617 publicKey = privateEntry.getCertificate().getPublicKey(); in createKeys()
624 x509c = createCertificate(publicKey, signingKey, subject, issuer, keyUsage, ca, in createKeys()
657 PublicKey publicKey, PrivateKey privateKey, String subject) { in createCa() argument
660 return createCertificate(publicKey, privateKey, principal, principal, 0, true, in createCa()
669 private static X509Certificate createCertificate(PublicKey publicKey, PrivateKey privateKey, in createCertificate() argument
711 SubjectPublicKeyInfo.getInstance(publicKey.getEncoded())); in createCertificate()

12