Home
last modified time | relevance | path

Searched refs:privKey (Results 1 – 25 of 26) sorted by relevance

12

/external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/
DKeyAgreementTest.java72 private static PrivateKey privKey = null; field in KeyAgreementTest
88 privKey = tkp.getPrivate(); in createKeys()
322 kAgs[i].init(privKey); in testGenerateSecret03()
325 kAgs[i].init(privKey); in testGenerateSecret03()
329 kAgs[i].init(privKey); in testGenerateSecret03()
348 kAgs[i].init(privKey); in testDoPhase()
350 kAgs[i].doPhase(privKey, false); in testDoPhase()
356 kAgs[i].doPhase(privKey, true); in testDoPhase()
436 kAgs[i].init(privKey, dsa); in testInit02()
442 kAgs[i].init(privKey, dsa, new SecureRandom()); in testInit02()
[all …]
/external/dropbear/libtomcrypt/testprof/
Dkatja_test.c8 katja_key key, privKey, pubKey; in katja_test() local
146 DO(katja_import(tmp, len2, &privKey)); in katja_test()
161 katja_free(&privKey); in katja_test()
168 DO(katja_verify_hash(out, len, in, 20, hash_idx, 0, &stat, &privKey)); in katja_test()
171 DO(katja_verify_hash(out, len, in, 20, hash_idx, 0, &stat2, &privKey)); in katja_test()
177 katja_free(&privKey); in katja_test()
193 katja_free(&privKey); in katja_test()
199 DO(katja_sign_hash(in, 20, out, &len, &yarrow_prng, prng_idx, hash_idx, 8, &privKey)); in katja_test()
209 katja_free(&privKey); in katja_test()
216 katja_free(&privKey); in katja_test()
Drsa_test.c128 rsa_key key, privKey, pubKey; in rsa_test() local
285 DO(rsa_import(tmp, len2, &privKey)); in rsa_test()
300 rsa_free(&privKey); in rsa_test()
307 DO(rsa_verify_hash(out, len, in, 20, hash_idx, 0, &stat, &privKey)); in rsa_test()
310 DO(rsa_verify_hash(out, len, in, 20, hash_idx, 0, &stat2, &privKey)); in rsa_test()
316 rsa_free(&privKey); in rsa_test()
332 rsa_free(&privKey); in rsa_test()
338 DO(rsa_sign_hash(in, 20, out, &len, &yarrow_prng, prng_idx, hash_idx, 8, &privKey)); in rsa_test()
348 rsa_free(&privKey); in rsa_test()
354 …a_sign_hash_ex(in, 20, out, &len, LTC_PKCS_1_V1_5, &yarrow_prng, prng_idx, hash_idx, 8, &privKey)); in rsa_test()
[all …]
Decc_test.c113 ecc_key usera, userb, pubKey, privKey; in ecc_tests() local
196 DO(ecc_import(buf[0], x, &privKey)); in ecc_tests()
205 DO(ecc_decrypt_key (buf[1], y, buf[0], &x, &privKey)); in ecc_tests()
221 DO(ecc_sign_hash (buf[0], 16, buf[1], &x, &yarrow_prng, find_prng ("yarrow"), &privKey)); in ecc_tests()
224 DO(ecc_verify_hash (buf[1], x, buf[0], 16, &stat2, &privKey)); in ecc_tests()
231 ecc_free (&privKey); in ecc_tests()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/
DKeyAgreementSpi.java172 DHPrivateKey privKey = (DHPrivateKey)key; in engineInit() local
187 this.p = privKey.getParams().getP(); in engineInit()
188 this.g = privKey.getParams().getG(); in engineInit()
191 this.x = this.result = privKey.getX(); in engineInit()
204 DHPrivateKey privKey = (DHPrivateKey)key; in engineInit() local
206 this.p = privKey.getParams().getP(); in engineInit()
207 this.g = privKey.getParams().getG(); in engineInit()
208 this.x = this.result = privKey.getX(); in engineInit()
/external/chromium_org/net/third_party/mozilla_security_manager/
DnsPKCS12Blob.cpp243 SECKEYPrivateKey* privKey = PK11_FindPrivateKeyFromCert(slot, cert, in nsPKCS12Blob_ImportHelper() local
245 if (privKey) { in nsPKCS12Blob_ImportHelper()
247 srv = PK11_WriteRawAttribute(PK11_TypePrivKey, privKey, CKA_EXTRACTABLE, in nsPKCS12Blob_ImportHelper()
249 SECKEY_DestroyPrivateKey(privKey); in nsPKCS12Blob_ImportHelper()
305 isExtractable(SECKEYPrivateKey *privKey, PRBool *extractable) in isExtractable() argument
310 rv=PK11_ReadRawAttribute(PK11_TypePrivKey, privKey, CKA_EXTRACTABLE, &value); in isExtractable()
432 SECKEYPrivateKey *privKey=PK11_FindKeyByDERCert(nssCert->slot, in nsPKCS12Blob_Export() local
435 if (privKey) { in nsPKCS12Blob_Export()
437 SECStatus rv = isExtractable(privKey, &privKeyIsExtractable); in nsPKCS12Blob_Export()
438 SECKEY_DestroyPrivateKey(privKey); in nsPKCS12Blob_Export()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/
DPrivateKeyInfo.java25 private ASN1OctetString privKey; field in PrivateKeyInfo
65 … this.privKey = new DEROctetString(privateKey.toASN1Primitive().getEncoded(ASN1Encoding.DER)); in PrivateKeyInfo()
86 privKey = ASN1OctetString.getInstance(e.nextElement()); in PrivateKeyInfo()
109 return ASN1Primitive.fromByteArray(privKey.getOctets()); in parsePrivateKey()
155 v.add(privKey); in toASN1Primitive()
/external/chromium_org/net/third_party/nss/ssl/
Dssl3ecc.c288 SECKEYPrivateKey *privKey = NULL; /* Ephemeral ECDH key */ in ssl3_SendECDHClientKeyExchange() local
302 privKey = SECKEY_CreateECPrivateKey(&svrPubKey->u.ec.DEREncodedParams, in ssl3_SendECDHClientKeyExchange()
304 if (!privKey || !pubKey) { in ssl3_SendECDHClientKeyExchange()
322 pms = PK11_PubDeriveWithKDF(privKey, svrPubKey, PR_FALSE, NULL, NULL, in ssl3_SendECDHClientKeyExchange()
333 SECKEY_DestroyPrivateKey(privKey); in ssl3_SendECDHClientKeyExchange()
334 privKey = NULL; in ssl3_SendECDHClientKeyExchange()
364 if(privKey) SECKEY_DestroyPrivateKey(privKey); in ssl3_SendECDHClientKeyExchange()
527 SECKEYPrivateKey * privKey = NULL; in ssl3_CreateECDHEphemeralKeyPair() local
541 privKey = SECKEY_CreateECPrivateKey(&ecParams, &pubKey, NULL); in ssl3_CreateECDHEphemeralKeyPair()
544 if (!privKey || !pubKey || !(keyPair = ssl3_NewKeyPair(privKey, pubKey))) { in ssl3_CreateECDHEphemeralKeyPair()
[all …]
Dsslimpl.h355 #define SERVERKEY serverKeyPair->privKey
1021 SECKEYPrivateKey * privKey; member
1870 extern ssl3KeyPair * ssl3_NewKeyPair( SECKEYPrivateKey * privKey,
Dssl.h1048 SECKEYPrivateKey *privKey,
Dssl3con.c6034 SECKEYPrivateKey *privKey = NULL; /* Ephemeral DH key */ in sendDHClientKeyExchange() local
6053 privKey = SECKEY_CreateDHPrivateKey(&dhParam, &pubKey, NULL); in sendDHClientKeyExchange()
6054 if (!privKey || !pubKey) { in sendDHClientKeyExchange()
6068 pms = PK11_PubDerive(privKey, svrPubKey, PR_FALSE, NULL, NULL, in sendDHClientKeyExchange()
6076 SECKEY_DestroyPrivateKey(privKey); in sendDHClientKeyExchange()
6077 privKey = NULL; in sendDHClientKeyExchange()
6108 if(privKey) SECKEY_DestroyPrivateKey(privKey); in sendDHClientKeyExchange()
9705 serverKey = serverKeyPair->privKey; in ssl3_HandleClientKeyExchange()
12323 ssl3_NewKeyPair( SECKEYPrivateKey * privKey, SECKEYPublicKey * pubKey) in ssl3_NewKeyPair() argument
12327 if (!privKey || !pubKey) { in ssl3_NewKeyPair()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/
DKeyUtil.java47 public static byte[] getEncodedPrivateKeyInfo(AlgorithmIdentifier algId, ASN1Encodable privKey) in getEncodedPrivateKeyInfo() argument
51 PrivateKeyInfo info = new PrivateKeyInfo(algId, privKey.toASN1Primitive()); in getEncodedPrivateKeyInfo()
DBaseCipherSpi.java173 PrivateKey privKey = BouncyCastleProvider.getPrivateKey(in); in engineUnwrap() local
175 if (privKey != null) in engineUnwrap()
177 return privKey; in engineUnwrap()
DECUtil.java186 … java.security.interfaces.ECPrivateKey privKey = (java.security.interfaces.ECPrivateKey)key; in generatePrivateKeyParameter() local
187 ECParameterSpec s = EC5Util.convertSpec(privKey.getParams(), false); in generatePrivateKeyParameter()
189 privKey.getS(), in generatePrivateKeyParameter()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/keystore/pkcs12/
DPKCS12KeyStoreSpi.java786 …PrivateKey privKey = unwrapKey(eIn.getEncryptionAlgorithm(), eIn.getEncryptedData(), password, wro… in engineLoad() local
791 PKCS12BagAttributeCarrier bagAttr = (PKCS12BagAttributeCarrier)privKey; in engineLoad()
828 keys.put(alias, privKey); in engineLoad()
843 keys.put(name, privKey); in engineLoad()
853 keys.put("unmarked", privKey); in engineLoad()
885 …PrivateKey privKey = unwrapKey(eIn.getEncryptionAlgorithm(), eIn.getEncryptedData(), password, wro… in engineLoad() local
890 PKCS12BagAttributeCarrier bagAttr = (PKCS12BagAttributeCarrier)privKey; in engineLoad()
925 keys.put(alias, privKey); in engineLoad()
937 keys.put(name, privKey); in engineLoad()
947 PrivateKey privKey = BouncyCastleProvider.getPrivateKey(kInfo); in engineLoad() local
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/
DKeyAgreementSpi.java283 …ECPrivateKeyParameters privKey = (ECPrivateKeyParameters)ECUtil.generatePrivateKeyParameter((Priva… in initFromKey() local
284 this.parameters = privKey.getParameters(); in initFromKey()
286 agreement.init(privKey); in initFromKey()
DBCECPrivateKey.java277 ASN1Encodable privKey = info.parsePrivateKey(); in populateFromPrivKeyInfo() local
278 if (privKey instanceof DERInteger) in populateFromPrivKeyInfo()
280 DERInteger derD = DERInteger.getInstance(privKey); in populateFromPrivKeyInfo()
286 …ouncycastle.asn1.sec.ECPrivateKey ec = org.bouncycastle.asn1.sec.ECPrivateKey.getInstance(privKey); in populateFromPrivKeyInfo()
/external/chromium/net/base/
Dcert_database_nss.cc255 SECKEYPrivateKey *privKey = PK11_FindKeyByAnyCert(cert->os_cert_handle(), in DeleteCertAndKey() local
257 if (privKey) { in DeleteCertAndKey()
258 SECKEY_DestroyPrivateKey(privKey); in DeleteCertAndKey()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/util/
DBaseWrapCipher.java351 PrivateKey privKey = BouncyCastleProvider.getPrivateKey(in); in engineUnwrap() local
353 if (privKey != null) in engineUnwrap()
355 return privKey; in engineUnwrap()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/
DJCEECPrivateKey.java256 ASN1Encodable privKey = info.parsePrivateKey(); in populateFromPrivKeyInfo() local
257 if (privKey instanceof DERInteger) in populateFromPrivKeyInfo()
259 DERInteger derD = DERInteger.getInstance(privKey); in populateFromPrivKeyInfo()
265 ECPrivateKeyStructure ec = new ECPrivateKeyStructure((ASN1Sequence)privKey); in populateFromPrivKeyInfo()
DJCEStreamCipher.java450 PrivateKey privKey = BouncyCastleProvider.getPrivateKey(in); in engineUnwrap() local
452 if (privKey != null) in engineUnwrap()
454 return privKey; in engineUnwrap()
/external/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/
DKeyStore_Impl1Test.java467 PrivateKey privKey = tkp.getPrivate(); in testEntry02() local
468 KeyStore.PrivateKeyEntry pKey = new KeyStore.PrivateKeyEntry(privKey, in testEntry02()
511 key1 = privKey; in testEntry02()
908 PrivateKey privKey = tkp.getPrivate(); in testEntry07() local
909 KeyStore.PrivateKeyEntry pKey = new KeyStore.PrivateKeyEntry(privKey, certs); in testEntry07()
923 kss[i].setKeyEntry(aliasKE, privKey, pwd, certs); in testEntry07()
936 Class c = privKey.getClass(); in testEntry07()
942 Class c = privKey.getClass(); in testEntry07()
DKSBuilder_ImplTest.java144 PrivateKey privKey = tkp.getPrivate(); in testNewInstanceKeyStoreProtectionParameter() local
146 KeyStore.PrivateKeyEntry pKey = new KeyStore.PrivateKeyEntry(privKey, in testNewInstanceKeyStoreProtectionParameter()
/external/chromium_org/net/cert/
Dnss_cert_database.cc297 SECKEYPrivateKey *privKey = PK11_FindKeyByAnyCert(cert->os_cert_handle(), in DeleteCertAndKey() local
299 if (privKey) { in DeleteCertAndKey()
300 SECKEY_DestroyPrivateKey(privKey); in DeleteCertAndKey()
/external/chromium_org/net/third_party/nss/patches/
Dclientauth.patch371 extern ssl3KeyPair * ssl3_NewKeyPair( SECKEYPrivateKey * privKey,

12