Home
last modified time | relevance | path

Searched refs:pubkey (Results 1 – 25 of 161) sorted by relevance

1234567

/external/epid-sdk/epid/common/src/
Dgrouppubkey.c27 GroupPubKey_* pubkey = NULL; in CreateGroupPubKey() local
32 pubkey = SAFE_ALLOC(sizeof(GroupPubKey_)); in CreateGroupPubKey()
33 if (!pubkey) { in CreateGroupPubKey()
37 result = NewEcPoint(G1, &pubkey->h1); in CreateGroupPubKey()
42 ReadEcPoint(G1, &pub_key_str->h1, sizeof(pub_key_str->h1), pubkey->h1); in CreateGroupPubKey()
46 result = NewEcPoint(G1, &pubkey->h2); in CreateGroupPubKey()
51 ReadEcPoint(G1, &pub_key_str->h2, sizeof(pub_key_str->h2), pubkey->h2); in CreateGroupPubKey()
55 result = NewEcPoint(G2, &pubkey->w); in CreateGroupPubKey()
60 ReadEcPoint(G2, &pub_key_str->w, sizeof(pub_key_str->w), pubkey->w); in CreateGroupPubKey()
64 pubkey->gid = pub_key_str->gid; in CreateGroupPubKey()
[all …]
Dfile_parser.c254 (EcdsaPublicKey*)&cert->pubkey, signature); in EpidParseRlFile()
277 GroupPubKey* pubkey) { in EpidParseGroupPubKeyFile() argument
281 if (!buf || !cert || !pubkey) { in EpidParseGroupPubKeyFile()
307 (EcdsaPublicKey*)&cert->pubkey, &buf_pubkey->signature); in EpidParseGroupPubKeyFile()
311 pubkey->gid = buf_pubkey->gid; in EpidParseGroupPubKeyFile()
312 pubkey->h1 = buf_pubkey->h1; in EpidParseGroupPubKeyFile()
313 pubkey->h2 = buf_pubkey->h2; in EpidParseGroupPubKeyFile()
314 pubkey->w = buf_pubkey->w; in EpidParseGroupPubKeyFile()
/external/epid-sdk/epid/common/1.1/src/
Dgrouppubkey.c35 Epid11GroupPubKey_* pubkey = NULL; in CreateEpid11GroupPubKey() local
40 pubkey = SAFE_ALLOC(sizeof(Epid11GroupPubKey_)); in CreateEpid11GroupPubKey()
41 if (!pubkey) { in CreateEpid11GroupPubKey()
45 result = NewEcPoint(G1, &pubkey->h1); in CreateEpid11GroupPubKey()
48 ReadEcPoint(G1, &pub_key_str->h1, sizeof(pub_key_str->h1), pubkey->h1); in CreateEpid11GroupPubKey()
50 result = NewEcPoint(G1, &pubkey->h2); in CreateEpid11GroupPubKey()
53 ReadEcPoint(G1, &pub_key_str->h2, sizeof(pub_key_str->h2), pubkey->h2); in CreateEpid11GroupPubKey()
55 result = NewEcPoint(G2, &pubkey->w); in CreateEpid11GroupPubKey()
58 ReadEcPoint(G2, &pub_key_str->w, sizeof(pub_key_str->w), pubkey->w); in CreateEpid11GroupPubKey()
60 pubkey->gid = pub_key_str->gid; in CreateEpid11GroupPubKey()
[all …]
Dfile_parser.c106 (EcdsaPublicKey*)&cert->pubkey, signature); in Epid11ParseRlFile()
129 Epid11GroupPubKey* pubkey) { in Epid11ParseGroupPubKeyFile() argument
133 if (!buf || !cert || !pubkey) { in Epid11ParseGroupPubKeyFile()
159 (EcdsaPublicKey*)&cert->pubkey, &buf_pubkey->signature); in Epid11ParseGroupPubKeyFile()
163 pubkey->gid = buf_pubkey->gid; in Epid11ParseGroupPubKeyFile()
164 pubkey->h1 = buf_pubkey->h1; in Epid11ParseGroupPubKeyFile()
165 pubkey->h2 = buf_pubkey->h2; in Epid11ParseGroupPubKeyFile()
166 pubkey->w = buf_pubkey->w; in Epid11ParseGroupPubKeyFile()
/external/vboot_reference/futility/
Dcmd_vbutil_key.c73 VbPublicKey *pubkey; in Pack() local
81 pubkey = PublicKeyReadKeyb(infile, algorithm, version); in Pack()
82 if (pubkey) { in Pack()
83 if (0 != PublicKeyWrite(outfile, pubkey)) { in Pack()
87 free(pubkey); in Pack()
108 VbPublicKey *pubkey; in Unpack() local
116 pubkey = PublicKeyRead(infile); in Unpack()
117 if (pubkey) { in Unpack()
119 printf("Algorithm: %" PRIu64 " %s\n", pubkey->algorithm, in Unpack()
120 (pubkey->algorithm < kNumAlgorithms ? in Unpack()
[all …]
Dcmd_create.c80 VbPublicKey *pubkey = 0; in vb1_make_keypair() local
136 pubkey = PublicKeyAlloc(keyb_size, vb1_algorithm, opt_version); in vb1_make_keypair()
137 if (!pubkey) in vb1_make_keypair()
139 memcpy(GetPublicKeyData(pubkey), keyb_data, keyb_size); in vb1_make_keypair()
143 if (0 != PublicKeyWrite(outfile, pubkey)) { in vb1_make_keypair()
153 free(pubkey); in vb1_make_keypair()
162 struct vb2_public_key *pubkey = 0; in vb2_make_keypair() local
216 if (vb2_public_key_alloc(&pubkey, sig_alg)) { in vb2_make_keypair()
231 pubkey_buf = vb2_public_key_packed_data(pubkey); in vb2_make_keypair()
235 if (vb2_unpack_key_data(pubkey, pubkey_buf, keyb_size)) { in vb2_make_keypair()
[all …]
Dcmd_show.c47 static void show_key(VbPublicKey *pubkey, const char *sp) in show_key() argument
49 printf("%sAlgorithm: %" PRIu64 " %s\n", sp, pubkey->algorithm, in show_key()
50 (pubkey->algorithm < kNumAlgorithms ? in show_key()
51 algo_strings[pubkey->algorithm] : "(invalid)")); in show_key()
52 printf("%sKey Version: %" PRIu64 "\n", sp, pubkey->key_version); in show_key()
54 PrintPubKeySha1Sum(pubkey); in show_key()
94 VbPublicKey *pubkey = (VbPublicKey *)state->my_area->buf; in futil_cb_show_pubkey() local
96 if (!PublicKeyLooksOkay(pubkey, state->my_area->len)) { in futil_cb_show_pubkey()
102 show_key(pubkey, " "); in futil_cb_show_pubkey()
131 VbPublicKey *pubkey; in futil_cb_show_gbb() local
[all …]
/external/epid-sdk/epid/common/unittests/
Dfile_parser-test.cc378 GroupPubKey pubkey; in TEST_F() local
381 &this->kCert, &pubkey)); in TEST_F()
385 &pubkey)); in TEST_F()
393 GroupPubKey pubkey; in TEST_F() local
399 &unsupported_curve1, &pubkey)); in TEST_F()
405 &unsupported_curve2, &pubkey)); in TEST_F()
411 &unsupported_curve3, &pubkey)); in TEST_F()
417 &unsupported_curve4, &pubkey)); in TEST_F()
423 &unsupported_curve5, &pubkey)); in TEST_F()
429 &unsupported_curve6, &pubkey)); in TEST_F()
[all …]
/external/epid-sdk/epid/common/1.1/unittests/
Dfile_parser-test.cc521 Epid11GroupPubKey pubkey{}; in TEST_F() local
524 &this->kCert, &pubkey)); in TEST_F()
528 nullptr, &pubkey)); in TEST_F()
536 Epid11GroupPubKey pubkey{}; in TEST_F() local
542 &unsupported_curve1, &pubkey)); in TEST_F()
548 &unsupported_curve2, &pubkey)); in TEST_F()
554 &unsupported_curve3, &pubkey)); in TEST_F()
560 &unsupported_curve4, &pubkey)); in TEST_F()
566 &unsupported_curve5, &pubkey)); in TEST_F()
572 &unsupported_curve6, &pubkey)); in TEST_F()
[all …]
/external/scapy/scapy/layers/tls/
Dkeyexchange_tls13.py45 self.pubkey = None
67 pubkey = privkey.public_key()
68 self.key_exchange = pubkey.public_numbers().y
74 pubkey = privkey.public_key()
75 self.key_exchange = pubkey.public_bytes()
80 pubkey = privkey.public_key()
81 self.key_exchange = pubkey.public_numbers().encode_point()
106 self.pubkey = public_numbers.public_key(default_backend())
111 self.pubkey = import_point(self.key_exchange)
116 self.pubkey = public_numbers.public_key(default_backend())
[all …]
Dcert.py209 pubkey = spki.subjectPublicKey
210 if isinstance(pubkey, RSAPublicKey):
212 obj.import_from_asn1pkt(pubkey)
213 elif isinstance(pubkey, ECDSAPublicKey):
224 pubkey = RSAPublicKey(obj.der)
226 obj.import_from_asn1pkt(pubkey)
265 self.pubkey = private_key.public_key()
271 self.pubkey = pubNum.public_key(default_backend())
273 pubNum = self.pubkey.public_numbers()
287 self.pem = self.pubkey.public_bytes(
[all …]
/external/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/
DChainStrengthAnalyzer.java78 Object pubkey = cert.getPublicKey(); in checkKeyLength() local
79 if (pubkey instanceof RSAPublicKey) { in checkKeyLength()
80 int modulusLength = ((RSAPublicKey) pubkey).getModulus().bitLength(); in checkKeyLength()
85 } else if (pubkey instanceof ECPublicKey) { in checkKeyLength()
87 ((ECPublicKey) pubkey).getParams().getCurve().getField().getFieldSize(); in checkKeyLength()
92 } else if (pubkey instanceof DSAPublicKey) { in checkKeyLength()
93 int pLength = ((DSAPublicKey) pubkey).getParams().getP().bitLength(); in checkKeyLength()
94 int qLength = ((DSAPublicKey) pubkey).getParams().getQ().bitLength(); in checkKeyLength()
102 … throw new CertificateException("Rejecting unknown key class " + pubkey.getClass().getName()); in checkKeyLength()
/external/conscrypt/common/src/main/java/org/conscrypt/
DChainStrengthAnalyzer.java76 Object pubkey = cert.getPublicKey(); in checkKeyLength() local
77 if (pubkey instanceof RSAPublicKey) { in checkKeyLength()
78 int modulusLength = ((RSAPublicKey) pubkey).getModulus().bitLength(); in checkKeyLength()
83 } else if (pubkey instanceof ECPublicKey) { in checkKeyLength()
85 ((ECPublicKey) pubkey).getParams().getCurve().getField().getFieldSize(); in checkKeyLength()
90 } else if (pubkey instanceof DSAPublicKey) { in checkKeyLength()
91 int pLength = ((DSAPublicKey) pubkey).getParams().getP().bitLength(); in checkKeyLength()
92 int qLength = ((DSAPublicKey) pubkey).getParams().getQ().bitLength(); in checkKeyLength()
100 … throw new CertificateException("Rejecting unknown key class " + pubkey.getClass().getName()); in checkKeyLength()
/external/epid-sdk/epid/member/tiny/unittests/internal/
Dvalidate-test.cc136 NativeGroupPubKey const pubkey = { in TEST_F() local
156 MembershipCredentialIsInGroup(&input, &f, &pubkey, &pairing_state)); in TEST_F()
174 NativeGroupPubKey const pubkey = { in TEST_F() local
194 MembershipCredentialIsInGroup(&input, &f, &pubkey, &pairing_state)); in TEST_F()
254 NativeGroupPubKey const pubkey = { in TEST_F() local
273 EXPECT_TRUE(PrivKeyIsInGroup(&input, &pubkey, &pairing_state)); in TEST_F()
293 NativeGroupPubKey const pubkey = { in TEST_F() local
312 EXPECT_FALSE(PrivKeyIsInGroup(&input, &pubkey, &pairing_state)); in TEST_F()
/external/wpa_supplicant_8/src/crypto/
Dcrypto_internal-modexp.c17 u8 *pubkey) in crypto_dh_init() argument
30 pubkey, &pubkey_len) < 0) in crypto_dh_init()
34 os_memmove(pubkey + pad, pubkey, pubkey_len); in crypto_dh_init()
35 os_memset(pubkey, 0, pad); in crypto_dh_init()
45 const u8 *pubkey, size_t pubkey_len, in crypto_dh_derive_secret() argument
53 os_memcmp(pubkey, prime, prime_len) >= 0)) in crypto_dh_derive_secret()
57 if (!pub || bignum_set_unsigned_bin(pub, pubkey, pubkey_len) < 0 || in crypto_dh_derive_secret()
81 res = crypto_mod_exp(pubkey, pubkey_len, privkey, privkey_len, in crypto_dh_derive_secret()
/external/wpa_supplicant_8/src/wps/
Dwps_attr_build.c23 struct wpabuf *pubkey = NULL; in wps_build_public_key() local
39 pubkey = wpabuf_dup(wps->wps->dh_pubkey); in wps_build_public_key()
62 pubkey = wpabuf_dup(wps->wps->ap_nfc_dh_pubkey); in wps_build_public_key()
63 if (wps->dh_privkey && pubkey) in wps_build_public_key()
64 wps->dh_ctx = dh5_init_fixed(wps->dh_privkey, pubkey); in wps_build_public_key()
69 wps->dh_ctx = dh5_init(&wps->dh_privkey, &pubkey); in wps_build_public_key()
70 pubkey = wpabuf_zeropad(pubkey, 192); in wps_build_public_key()
72 if (wps->dh_ctx == NULL || wps->dh_privkey == NULL || pubkey == NULL) { in wps_build_public_key()
75 wpabuf_free(pubkey); in wps_build_public_key()
79 wpa_hexdump_buf(MSG_DEBUG, "WPS: DH own Public Key", pubkey); in wps_build_public_key()
[all …]
/external/epid-sdk/epid/member/tiny/src/
Dvalidate.c56 NativeGroupPubKey const* pubkey, in MembershipCredentialIsInGroup() argument
69 if (0 != memcmp(&input->gid, &pubkey->gid, sizeof(pubkey->gid))) { in MembershipCredentialIsInGroup()
74 EFq2FromAffine(w, &pubkey->w); in MembershipCredentialIsInGroup()
79 EFqFromAffine(&t2, &pubkey->h1); in MembershipCredentialIsInGroup()
97 NativeGroupPubKey const* pubkey, in PrivKeyIsInGroup() argument
99 return MembershipCredentialIsInGroup(&input->cred, &input->f, pubkey, in PrivKeyIsInGroup()
/external/epid-sdk/epid/common/math/src/
Decdsa_verify.c47 EcdsaPublicKey const* pubkey,
59 EcdsaPublicKey const* pubkey, in EcdsaVerifyBuffer() argument
68 if (!pubkey || !sig || (!buf && (0 != buf_len))) return kEpidBadArgErr; in EcdsaVerifyBuffer()
106 epid_status = ReadCurvePoint(ec_state, pubkey, ecp_pubkey); in EcdsaVerifyBuffer()
232 EcdsaPublicKey const* pubkey, in ReadCurvePoint() argument
238 if (!ec || !pubkey || !p) return kEpidBadArgErr; in ReadCurvePoint()
243 result = NewBigNum(sizeof(pubkey->x), &bn_pubkey_x); in ReadCurvePoint()
246 result = ReadBigNum(&pubkey->x, sizeof(pubkey->x), bn_pubkey_x); in ReadCurvePoint()
249 result = NewBigNum(sizeof(pubkey->y), &bn_pubkey_y); in ReadCurvePoint()
252 result = ReadBigNum(&pubkey->y, sizeof(pubkey->y), bn_pubkey_y); in ReadCurvePoint()
/external/python/oauth2client/oauth2client/
D_pycrypto_crypt.py27 def __init__(self, pubkey): argument
34 self._pubkey = pubkey
72 pubkey = RSA.importKey(tbsSeq[6])
74 pubkey = RSA.importKey(key_pem)
75 return PyCryptoVerifier(pubkey)
D_openssl_crypt.py24 def __init__(self, pubkey): argument
30 self._pubkey = pubkey
70 pubkey = crypto.load_certificate(crypto.FILETYPE_PEM, key_pem)
72 pubkey = crypto.load_privatekey(crypto.FILETYPE_PEM, key_pem)
73 return OpenSSLVerifier(pubkey)
D_pure_python_crypt.py72 def __init__(self, pubkey): argument
73 self._pubkey = pubkey
122 pubkey = rsa.PublicKey.load_pkcs1(key_bytes, 'DER')
124 pubkey = rsa.PublicKey.load_pkcs1(key_pem, 'PEM')
125 return cls(pubkey)
/external/epid-sdk/tools/revokesig/src/
Dmain.c82 void FillRequest(GroupPubKey const* pubkey, EpidSignature const* sig,
258 void FillRequest(GroupPubKey const* pubkey, EpidSignature const* sig, in FillRequest() argument
267 if (!pubkey || !sig || !req_buf || !req_top || (!msg_str && 0 != msg_size)) { in FillRequest()
274 req_top->gid = pubkey->gid; in FillRequest()
302 GroupPubKey pubkey = {0}; in MakeRequest() local
355 &pubkey)) { in MakeRequest()
367 PrintBuffer(&pubkey.gid, sizeof(pubkey.gid)); in MakeRequest()
404 FillRequest(&pubkey, sig, sig_size, msg_str, msg_size, req_buf, req_size, in MakeRequest()
/external/boringssl/src/crypto/x509/
Dx509_r2x.c71 EVP_PKEY *pubkey = NULL; in X509_REQ_to_X509() local
105 pubkey = X509_REQ_get_pubkey(r); in X509_REQ_to_X509()
106 res = X509_set_pubkey(ret, pubkey); in X509_REQ_to_X509()
107 EVP_PKEY_free(pubkey); in X509_REQ_to_X509()
/external/vboot_reference/utility/
DdumpRSAPublicKey.c140 RSA* pubkey = NULL; in main() local
175 if (!(pubkey = EVP_PKEY_get1_RSA(key))) { in main()
181 if (!(pubkey = PEM_read_RSA_PUBKEY(fp, NULL, NULL, NULL))) { in main()
187 if (check(pubkey)) { in main()
188 output(pubkey); in main()
193 RSA_free(pubkey); in main()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/netscape/
DNetscapeCertRequest.java53 PublicKey pubkey ; field in NetscapeCertRequest
118 pubkey = KeyFactory.getInstance(keyAlg.getAlgorithm().getId(), "BC") in NetscapeCertRequest()
137 pubkey = pub_key; in NetscapeCertRequest()
186 return pubkey; in getPublicKey()
191 pubkey = value; in setPublicKey()
208 sig.initVerify(pubkey); in verify()
264 baos.write(pubkey.getEncoded()); in getKeySpec()

1234567