Searched refs:pk (Results 26 - 50 of 86) sorted by relevance

1234

/freebsd-11-stable/contrib/wpa/src/eap_common/
H A Deap_gpsk_common.h55 u8 *pk, size_t *pk_len);
H A Deap_gpsk_common.c114 u8 *pk, size_t pk_len)
180 if (pk) {
182 os_memcpy(pk, pos, pk_len);
192 u8 *pk, size_t *pk_len)
220 pk, *pk_len);
275 * @pk: Buffer for PK (at least EAP_GPSK_MAX_PK_LEN bytes)
285 u8 *pk, size_t *pk_len)
321 pk, pk_len);
108 eap_gpsk_derive_keys_helper(u32 csuite_specifier, u8 *kdf_out, size_t kdf_out_len, const u8 *psk, size_t psk_len, const u8 *seed, size_t seed_len, u8 *msk, u8 *emsk, u8 *sk, size_t sk_len, u8 *pk, size_t pk_len) argument
189 eap_gpsk_derive_keys_aes(const u8 *psk, size_t psk_len, const u8 *seed, size_t seed_len, u8 *msk, u8 *emsk, u8 *sk, size_t *sk_len, u8 *pk, size_t *pk_len) argument
279 eap_gpsk_derive_keys(const u8 *psk, size_t psk_len, int vendor, int specifier, const u8 *rand_peer, const u8 *rand_server, const u8 *id_peer, size_t id_peer_len, const u8 *id_server, size_t id_server_len, u8 *msk, u8 *emsk, u8 *sk, size_t *sk_len, u8 *pk, size_t *pk_len) argument
/freebsd-11-stable/contrib/telnet/libtelnet/
H A Dpk.c54 #include "pk.h"
164 MINT *pk = mp_itom(0); local
185 mp_pow(root, sk, modulus, pk);
188 xkey = mp_mtox(pk);
192 mp_mfree(pk);
/freebsd-11-stable/usr.sbin/pkg/
H A Dpkg.c593 struct pubkey *pk; local
610 pk = calloc(1, sizeof(struct pubkey));
611 pk->siglen = sbuf_len(sig);
612 pk->sig = calloc(1, pk->siglen);
613 memcpy(pk->sig, sbuf_data(sig), pk->siglen);
616 return (pk);
694 struct pubkey *pk; local
698 pk
[all...]
/freebsd-11-stable/crypto/openssl/crypto/asn1/
H A Dameth_lib.c413 int (*pub_decode) (EVP_PKEY *pk,
416 const EVP_PKEY *pk),
422 int (*pkey_size) (const EVP_PKEY *pk),
423 int (*pkey_bits) (const EVP_PKEY *pk))
434 int (*priv_decode) (EVP_PKEY *pk,
438 const EVP_PKEY *pk),
455 int (*param_missing) (const EVP_PKEY *pk),
412 EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth, int (*pub_decode) (EVP_PKEY *pk, X509_PUBKEY *pub), int (*pub_encode) (X509_PUBKEY *pub, const EVP_PKEY *pk), int (*pub_cmp) (const EVP_PKEY *a, const EVP_PKEY *b), int (*pub_print) (BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx), int (*pkey_size) (const EVP_PKEY *pk), int (*pkey_bits) (const EVP_PKEY *pk)) argument
433 EVP_PKEY_asn1_set_private(EVP_PKEY_ASN1_METHOD *ameth, int (*priv_decode) (EVP_PKEY *pk, PKCS8_PRIV_KEY_INFO *p8inf), int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk), int (*priv_print) (BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx)) argument
449 EVP_PKEY_asn1_set_param(EVP_PKEY_ASN1_METHOD *ameth, int (*param_decode) (EVP_PKEY *pkey, const unsigned char **pder, int derlen), int (*param_encode) (const EVP_PKEY *pkey, unsigned char **pder), int (*param_missing) (const EVP_PKEY *pk), int (*param_copy) (EVP_PKEY *to, const EVP_PKEY *from), int (*param_cmp) (const EVP_PKEY *a, const EVP_PKEY *b), int (*param_print) (BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx)) argument
/freebsd-11-stable/crypto/openssl/crypto/cms/
H A Dcms_smime.c573 EVP_PKEY *pk, X509 *cert)
586 CMS_RecipientInfo_kari_set0_pkey(ri, pk);
596 int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert) argument
605 ri_type = cms_pkey_get_ri_type(pk);
618 r = cms_kari_set1_pkey(cms, ri, pk, cert);
629 CMS_RecipientInfo_set0_pkey(ri, pk);
725 int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert, argument
744 if (!pk && !cert && !dcont && !out)
746 if (pk && !CMS_decrypt_set1_pkey(cms, pk, cer
572 cms_kari_set1_pkey(CMS_ContentInfo *cms, CMS_RecipientInfo *ri, EVP_PKEY *pk, X509 *cert) argument
[all...]
H A Dcms_sd.c267 X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
274 if (!X509_check_private_key(signer, pk)) {
287 CRYPTO_add(&pk->references, 1, CRYPTO_LOCK_EVP_PKEY);
290 si->pkey = pk;
310 if (EVP_PKEY_get_default_digest_nid(pk, &def_nid) <= 0)
392 } else if (EVP_DigestSignInit(&si->mctx, &si->pctx, md, NULL, pk) <=
557 void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk, argument
561 if (pk)
562 *pk = si->pkey;
266 CMS_add1_signer(CMS_ContentInfo *cms, X509 *signer, EVP_PKEY *pk, const EVP_MD *md, unsigned int flags) argument
H A Dcms.h188 int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
204 EVP_PKEY **pk, X509 **recip,
264 X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
277 void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
367 int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
H A Dcms_lcl.h459 int cms_pkey_get_ri_type(EVP_PKEY *pk);
462 EVP_PKEY *pk, unsigned int flags);
/freebsd-11-stable/contrib/ldns/ldns/
H A Drdata.h419 * \param[out] pk the Public Key data
424 uint16_t *pk_size, uint8_t** pk);
433 * \param[in] pk the Public Key data
437 uint8_t hit_size, uint8_t *hit, uint16_t pk_size, uint8_t *pk);
/freebsd-11-stable/crypto/openssh/
H A Dsshkey.c1968 u_char *pk = NULL; local
2100 if ((ret = sshbuf_get_string(b, &pk, &len)) != 0)
2110 key->ed25519_pk = pk;
2111 pk = NULL;
2142 free(pk);
2251 struct sshkey *pk; local
2255 if ((pk = calloc(1, sizeof(*pk))) == NULL)
2257 pk->type = k->type;
2258 pk
3778 EVP_PKEY *pk = NULL; local
[all...]
/freebsd-11-stable/crypto/heimdal/lib/hx509/
H A Dks_p12.c103 PKCS8EncryptedPrivateKeyInfo pk; local
107 memset(&pk, 0, sizeof(pk));
109 ret = decode_PKCS8EncryptedPrivateKeyInfo(data, length, &pk, NULL);
115 &pk.encryptionAlgorithm,
116 &pk.encryptedData,
118 free_PKCS8EncryptedPrivateKeyInfo(&pk);
H A Dcrypto.c1045 DSAPublicKey pk; local
1061 &pk, &size);
1065 dsa->pub_key = heim_int2BN(&pk);
1067 free_DSAPublicKey(&pk);
1483 alg_for_privatekey(const hx509_private_key pk, int type) argument
1488 if (pk->ops == NULL)
1491 keytype = pk->ops->key_oid;
1498 if (pk->ops->available &&
1499 pk->ops->available(pk, sig_alg
2950 RSAPublicKey pk; local
[all...]
/freebsd-11-stable/crypto/openssh/regress/unittests/sshkey/
H A Dtest_sshkey.c58 struct sshbuf *ca_buf, *pk, *principals, *critopts, *exts; local
70 pk = sshbuf_new();
71 ASSERT_PTR_NE(pk, NULL);
72 ASSERT_INT_EQ(sshkey_putb_plain(k, pk), 0);
73 ASSERT_INT_EQ(sshbuf_skip_string(pk), 0);
91 ASSERT_INT_EQ(sshbuf_putb(b, pk), 0); /* public key serialisation */
111 sshbuf_free(pk);
/freebsd-11-stable/crypto/openssl/ssl/
H A Ds3_both.c479 EVP_PKEY *pk; local
483 pk = X509_get_pubkey(x);
485 pk = pkey;
486 if (pk == NULL)
489 i = pk->type;
509 i = X509_certificate_type(x, pk);
518 EVP_PKEY_free(pk);
/freebsd-11-stable/contrib/unbound/util/data/
H A Dmsgreply.c379 struct ub_packed_rrset_key* pk)
382 pk->rk.flags = pset->flags;
383 pk->rk.dname_len = pset->dname_len;
385 pk->rk.dname = (uint8_t*)regional_alloc(
387 else pk->rk.dname =
389 if(!pk->rk.dname)
392 dname_pkt_copy(pkt, pk->rk.dname, pset->dname);
394 pk->rk.type = htons(pset->type);
395 pk->rk.rrset_class = pset->rrset_class;
399 pk
377 parse_copy_decompress_rrset(sldns_buffer* pkt, struct msg_parse* msg, struct rrset_parse *pset, struct regional* region, struct ub_packed_rrset_key* pk) argument
[all...]
/freebsd-11-stable/sbin/routed/
H A Dtable.c786 struct khash *k, **pk; local
788 for (pk = &KHASH(dst,mask); (k = *pk) != NULL; pk = &k->k_next) {
793 *ppk = pk;
801 struct khash *k, **pk; local
803 k = kern_find(dst, mask, &pk);
814 *pk = k;
1487 struct khash *k, **pk; local
1498 for (pk
[all...]
/freebsd-11-stable/contrib/wpa/src/tls/
H A Dpkcs1.c196 int pkcs1_v15_sig_ver(struct crypto_public_key *pk, argument
212 res = crypto_public_key_decrypt_pkcs1(pk, s, s_len, decrypted,
H A Dtlsv1_common.h253 int tls_parse_cert(const u8 *buf, size_t len, struct crypto_public_key **pk);
271 int tls_verify_signature(u16 tls_version, struct crypto_public_key *pk,
/freebsd-11-stable/crypto/openssl/crypto/dh/
H A Ddh_ameth.c151 static int dh_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) argument
187 if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(pkey->ameth->pkey_id),
661 EVP_PKEY *pkpeer = NULL, *pk = NULL; local
673 pk = EVP_PKEY_CTX_get0_pkey(pctx);
674 if (!pk)
676 if (pk->type != EVP_PKEY_DHX)
679 dhpeer = DHparams_dup(pk->pkey.dh);
700 EVP_PKEY_assign(pkpeer, pk->ameth->pkey_id, dhpeer);
/freebsd-11-stable/contrib/unbound/dnscrypt/
H A Ddnscrypt.c79 * \param[in] pk: The public key of the client. uint8_t pointer of size
88 uint8_t* pk,
92 memcpy(key + 1, pk, crypto_box_PUBLICKEYBYTES);
154 * \param[in] pk: The public key of the client. uint8_t pointer of size
161 const uint8_t pk[crypto_box_PUBLICKEYBYTES])
166 return hashlittle(pk, crypto_box_PUBLICKEYBYTES, h);
170 * Inserts a nonce, magic_query, pk tuple into the nonces_cache slabhash.
174 * \param[in] pk: The public key of the client. uint8_t pointer of size
182 const uint8_t pk[crypto_box_PUBLICKEYBYTES],
194 memcpy(k->client_publickey, pk, crypto_box_PUBLICKEYBYTE
86 dnsc_shared_secrets_cache_key(uint8_t* key, uint8_t esversion, uint8_t* pk, uint8_t* sk) argument
159 dnsc_nonce_cache_key_hash(const uint8_t nonce[crypto_box_HALF_NONCEBYTES], const uint8_t magic_query[DNSCRYPT_MAGIC_HEADER_LEN], const uint8_t pk[crypto_box_PUBLICKEYBYTES]) argument
179 dnsc_nonce_cache_insert(struct slabhash *cache, const uint8_t nonce[crypto_box_HALF_NONCEBYTES], const uint8_t magic_query[DNSCRYPT_MAGIC_HEADER_LEN], const uint8_t pk[crypto_box_PUBLICKEYBYTES], uint32_t hash) argument
215 dnsc_nonces_lookup(struct slabhash* cache, const uint8_t nonce[crypto_box_HALF_NONCEBYTES], const uint8_t magic_query[DNSCRYPT_MAGIC_HEADER_LEN], const uint8_t pk[crypto_box_PUBLICKEYBYTES], uint32_t hash) argument
[all...]
/freebsd-11-stable/contrib/ldns/
H A Drdata.c524 uint16_t *pk_size, uint8_t** pk)
529 if (! rdf || ! alg || ! hit || ! hit_size || ! pk || ! pk_size) {
541 *pk = data + 4 + *hit_size;
552 uint16_t pk_size, uint8_t *pk)
570 memcpy(data + 4 + hit_size, pk, pk_size);
522 ldns_rdf_hip_get_alg_hit_pk(ldns_rdf *rdf, uint8_t* alg, uint8_t *hit_size, uint8_t** hit, uint16_t *pk_size, uint8_t** pk) argument
550 ldns_rdf_hip_new_frm_alg_hit_pk(ldns_rdf** rdf, uint8_t alg, uint8_t hit_size, uint8_t *hit, uint16_t pk_size, uint8_t *pk) argument
/freebsd-11-stable/contrib/unbound/validator/
H A Dval_kentry.c373 unsigned char* pk; local
379 pk = (unsigned char*)data->rr_data[idx]+2+4;
381 return sldns_rr_dnskey_key_size_raw(pk, pklen, algo);
/freebsd-11-stable/crypto/openssl/crypto/ec/
H A Dec_ameth.c108 static int eckey_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey) argument
130 if (X509_PUBKEY_set0_param(pk, OBJ_nid2obj(EVP_PKEY_EC),
665 EVP_PKEY *pk; local
666 pk = EVP_PKEY_CTX_get0_pkey(pctx);
667 if (!pk)
669 grp = EC_KEY_get0_group(pk->pkey.ec);
/freebsd-11-stable/crypto/openssl/apps/
H A Dx509.c936 EVP_PKEY *pk; local
943 pk = load_key(bio_err,
946 if (pk == NULL)
952 rq = X509_to_X509_REQ(x, pk, digest);
953 EVP_PKEY_free(pk);

Completed in 165 milliseconds

1234