Home
last modified time | relevance | path

Searched refs:pk (Results 1 – 25 of 261) sorted by relevance

1234567891011

/freebsd/crypto/openssl/crypto/evp/
H A Dkeymgmt_lib.c87 int evp_keymgmt_util_export(const EVP_PKEY *pk, int selection, in evp_keymgmt_util_export() argument
90 if (pk == NULL || export_cb == NULL) in evp_keymgmt_util_export()
92 return evp_keymgmt_export(pk->keymgmt, pk->keydata, selection, in evp_keymgmt_util_export()
96 void *evp_keymgmt_util_export_to_provider(EVP_PKEY *pk, EVP_KEYMGMT *keymgmt, in evp_keymgmt_util_export_to_provider() argument
107 if (pk->keydata == NULL) in evp_keymgmt_util_export_to_provider()
117 if (pk->keymgmt == keymgmt in evp_keymgmt_util_export_to_provider()
118 || (pk->keymgmt->name_id == keymgmt->name_id in evp_keymgmt_util_export_to_provider()
119 && pk->keymgmt->prov == keymgmt->prov)) in evp_keymgmt_util_export_to_provider()
120 return pk in evp_keymgmt_util_export_to_provider()
222 evp_keymgmt_util_clear_operation_cache(EVP_PKEY * pk,int locking) evp_keymgmt_util_clear_operation_cache() argument
236 evp_keymgmt_util_find_operation_cache(EVP_PKEY * pk,EVP_KEYMGMT * keymgmt,int selection) evp_keymgmt_util_find_operation_cache() argument
255 evp_keymgmt_util_cache_keydata(EVP_PKEY * pk,EVP_KEYMGMT * keymgmt,void * keydata,int selection) evp_keymgmt_util_cache_keydata() argument
288 evp_keymgmt_util_cache_keyinfo(EVP_PKEY * pk) evp_keymgmt_util_cache_keyinfo() argument
328 evp_keymgmt_util_has(EVP_PKEY * pk,int selection) evp_keymgmt_util_has() argument
[all...]
/freebsd/crypto/openssl/test/
H A Devp_pkey_provided_test.c141 static int test_print_key_using_pem(const char *alg, const EVP_PKEY *pk) in test_print_key_using_pem() argument
150 !TEST_true(PEM_write_bio_PrivateKey(bio_out, pk, EVP_aes_256_cbc(), in test_print_key_using_pem()
154 || !TEST_true(PEM_write_bio_PKCS8PrivateKey(bio_out, pk, in test_print_key_using_pem()
158 || !TEST_true(PEM_write_bio_PKCS8PrivateKey(bio_out, pk, in test_print_key_using_pem()
161 || !TEST_true(PEM_write_bio_PKCS8PrivateKey(bio_out, pk, in test_print_key_using_pem()
164 || !TEST_false(PEM_write_bio_PKCS8PrivateKey(bio_out, pk, in test_print_key_using_pem()
170 bio_out, pk, NID_pbe_WithSHA1And3_Key_TripleDES_CBC, in test_print_key_using_pem()
173 bio_out, pk, NID_pbe_WithSHA1And3_Key_TripleDES_CBC, NULL, 0, in test_print_key_using_pem()
176 bio_out, pk, NID_pbe_WithSHA1And3_Key_TripleDES_CBC, NULL, 0, in test_print_key_using_pem()
179 bio_out, pk, NID_pbe_WithSHA1And3_Key_TripleDES_CB in test_print_key_using_pem()
206 test_print_key_type_using_encoder(const char * alg,int type,const EVP_PKEY * pk) test_print_key_type_using_encoder() argument
314 test_print_key_using_encoder(const char * alg,const EVP_PKEY * pk) test_print_key_using_encoder() argument
327 test_print_key_using_encoder_public(const char * alg,const EVP_PKEY * pk) test_print_key_using_encoder_public() argument
353 EVP_PKEY *pk = NULL, *copy_pk = NULL, *dup_pk = NULL; test_fromdata_rsa() local
450 EVP_PKEY *pk = NULL; test_evp_pkey_get_bn_param_large() local
506 EVP_PKEY *pk = NULL, *copy_pk = NULL, *dup_pk = NULL; test_fromdata_dh_named_group() local
717 EVP_PKEY *pk = NULL, *dup_pk = NULL; test_fromdata_dh_fips186_4() local
911 EVP_PKEY *pk = NULL, *copy_pk = NULL, *dup_pk = NULL; test_fromdata_ecx() local
1170 EVP_PKEY *pk = NULL, *copy_pk = NULL, *dup_pk = NULL; test_fromdata_ec() local
1430 EVP_PKEY *pk = NULL, *copy_pk = NULL, *dup_pk = NULL; test_fromdata_dsa_fips186_4() local
[all...]
/freebsd/contrib/bearssl/tools/
H A Dxmem.c78 xpkeydup(const br_x509_pkey *pk) in xpkeydup() argument
83 pk2->key_type = pk->key_type; in xpkeydup()
84 switch (pk->key_type) { in xpkeydup()
86 pk2->key.rsa.n = xblobdup(pk->key.rsa.n, pk->key.rsa.nlen); in xpkeydup()
87 pk2->key.rsa.nlen = pk->key.rsa.nlen; in xpkeydup()
88 pk2->key.rsa.e = xblobdup(pk->key.rsa.e, pk->key.rsa.elen); in xpkeydup()
89 pk2->key.rsa.elen = pk->key.rsa.elen; in xpkeydup()
92 pk2->key.ec.curve = pk->key.ec.curve; in xpkeydup()
93 pk2->key.ec.q = xblobdup(pk->key.ec.q, pk->key.ec.qlen); in xpkeydup()
94 pk2->key.ec.qlen = pk->key.ec.qlen; in xpkeydup()
[all …]
H A Dverify.c35 rsa_bit_length(const br_rsa_public_key *pk) in rsa_bit_length() argument
40 for (u = 0; u < pk->nlen; u ++) { in rsa_bit_length()
41 if (pk->n[u] != 0) { in rsa_bit_length()
45 if (u == pk->nlen) { in rsa_bit_length()
48 bl = (unsigned)(pk->nlen - u - 1) << 3; in rsa_bit_length()
49 x = pk->n[u]; in rsa_bit_length()
58 print_rsa(const br_rsa_public_key *pk, int print_text, int print_C) in print_rsa() argument
64 for (u = 0; u < pk->nlen; u ++) { in print_rsa()
65 printf("%02X", pk->n[u]); in print_rsa()
69 for (u = 0; u < pk->elen; u ++) { in print_rsa()
[all …]
H A Dcerts.c45 br_x509_pkey *pk; in certificate_to_trust_anchor_inner() local
49 pk = br_x509_decoder_get_pkey(&dc); in certificate_to_trust_anchor_inner()
50 if (pk == NULL) { in certificate_to_trust_anchor_inner()
63 switch (pk->key_type) { in certificate_to_trust_anchor_inner()
66 ta->pkey.key.rsa.n = xblobdup(pk->key.rsa.n, pk->key.rsa.nlen); in certificate_to_trust_anchor_inner()
67 ta->pkey.key.rsa.nlen = pk->key.rsa.nlen; in certificate_to_trust_anchor_inner()
68 ta->pkey.key.rsa.e = xblobdup(pk->key.rsa.e, pk->key.rsa.elen); in certificate_to_trust_anchor_inner()
69 ta->pkey.key.rsa.elen = pk->key.rsa.elen; in certificate_to_trust_anchor_inner()
73 ta->pkey.key.ec.curve = pk->key.ec.curve; in certificate_to_trust_anchor_inner()
74 ta->pkey.key.ec.q = xblobdup(pk->key.ec.q, pk->key.ec.qlen); in certificate_to_trust_anchor_inner()
[all …]
/freebsd/contrib/libfido2/regress/
H A Dassert.c172 es256_pk_t *pk; in alloc_es256_pk() local
174 pk = es256_pk_new(); in alloc_es256_pk()
175 assert(pk != NULL); in alloc_es256_pk()
177 return (pk); in alloc_es256_pk()
181 free_es256_pk(es256_pk_t *pk) in free_es256_pk() argument
183 es256_pk_free(&pk); in free_es256_pk()
184 assert(pk == NULL); in free_es256_pk()
190 rs256_pk_t *pk; in alloc_rs256_pk() local
192 pk = rs256_pk_new(); in alloc_rs256_pk()
193 assert(pk ! in alloc_rs256_pk()
199 free_rs256_pk(rs256_pk_t * pk) free_rs256_pk() argument
208 eddsa_pk_t *pk; alloc_eddsa_pk() local
217 free_eddsa_pk(eddsa_pk_t * pk) free_eddsa_pk() argument
349 es256_pk_t *pk; no_cdh() local
371 es256_pk_t *pk; no_rp() local
393 es256_pk_t *pk; no_authdata() local
414 es256_pk_t *pk; no_sig() local
436 es256_pk_t *pk; junk_cdh() local
465 es256_pk_t *pk; junk_rp() local
507 es256_pk_t *pk; junk_sig() local
536 es256_pk_t *pk; wrong_options() local
[all...]
/freebsd/sys/contrib/libsodium/test/default/
H A Dsign.c12 const unsigned char pk[crypto_sign_PUBLICKEYBYTES]; member
1076 unsigned char pk[crypto_sign_PUBLICKEYBYTES]; in main() local
1095 memcpy(skpk + crypto_sign_SEEDBYTES, test_data[i].pk, in main()
1106 if (crypto_sign_open(m, NULL, sm, smlen, test_data[i].pk) != 0) { in main()
1112 if (crypto_sign_open(m, &mlen, sm, smlen, test_data[i].pk) != -1) { in main()
1117 if (crypto_sign_open(m, &mlen, sm, smlen, test_data[i].pk) != 0) { in main()
1127 if (crypto_sign_open(m, &mlen, sm, smlen, test_data[i].pk) == 0) { in main()
1132 test_data[i].pk) == 0) { in main()
1153 i, test_data[i].pk) != 0) { in main()
1166 if (crypto_sign_open(sm, &mlen, sm, smlen, test_data[i].pk) != 0) { in main()
[all …]
/freebsd/contrib/libfido2/src/
H A Des384.c77 es384_pk_t *pk; in es384_pk_free() local
79 if (pkp == NULL || (pk = *pkp) == NULL) in es384_pk_free()
82 freezero(pk, sizeof(*pk)); in es384_pk_free()
87 es384_pk_from_ptr(es384_pk_t *pk, const void *ptr, size_t len) in es384_pk_from_ptr() argument
92 if (len < sizeof(*pk)) in es384_pk_from_ptr()
95 if (len == sizeof(*pk) + 1 && *p == 0x04) in es384_pk_from_ptr()
96 memcpy(pk, ++p, sizeof(*pk)); /* uncompressed format */ in es384_pk_from_ptr()
98 memcpy(pk, ptr, sizeof(*pk)); /* libfido2 x||y format */ in es384_pk_from_ptr()
100 if ((pkey = es384_pk_to_EVP_PKEY(pk)) == NULL) { in es384_pk_from_ptr()
102 explicit_bzero(pk, sizeof(*pk)); in es384_pk_from_ptr()
[all …]
H A Des256.c71 es256_pk_encode(const es256_pk_t *pk, int ecdh) in es256_pk_encode() argument
114 (argv[3].value = cbor_build_bytestring(pk->x, in es256_pk_encode()
115 sizeof(pk->x))) == NULL || !cbor_map_add(item, argv[3])) in es256_pk_encode()
120 (argv[4].value = cbor_build_bytestring(pk->y, in es256_pk_encode()
121 sizeof(pk->y))) == NULL || !cbor_map_add(item, argv[4])) in es256_pk_encode()
170 es256_pk_t *pk; in es256_pk_free() local
172 if (pkp == NULL || (pk = *pkp) == NULL) in es256_pk_free()
175 freezero(pk, sizeof(*pk)); in es256_pk_free()
180 es256_pk_from_ptr(es256_pk_t *pk, const void *ptr, size_t len) in es256_pk_from_ptr() argument
185 if (len < sizeof(*pk)) in es256_pk_from_ptr()
[all …]
H A Drs256.c126 rs256_pk_t *pk; in rs256_pk_free() local
128 if (pkp == NULL || (pk = *pkp) == NULL) in rs256_pk_free()
131 freezero(pk, sizeof(*pk)); in rs256_pk_free()
136 rs256_pk_from_ptr(rs256_pk_t *pk, const void *ptr, size_t len) in rs256_pk_from_ptr() argument
140 if (len < sizeof(*pk)) in rs256_pk_from_ptr()
143 memcpy(pk, ptr, sizeof(*pk)); in rs256_pk_from_ptr()
145 if ((pkey = rs256_pk_to_EVP_PKEY(pk)) == NULL) { in rs256_pk_from_ptr()
212 rs256_pk_from_RSA(rs256_pk_t *pk, const RSA *rsa) in rs256_pk_from_RSA() argument
231 if ((k = BN_num_bytes(n)) < 0 || (size_t)k > sizeof(pk->n) || in rs256_pk_from_RSA()
232 (k = BN_num_bytes(e)) < 0 || (size_t)k > sizeof(pk->e)) { in rs256_pk_from_RSA()
[all …]
H A Deddsa.c114 eddsa_pk_t *pk; in eddsa_pk_free() local
116 if (pkp == NULL || (pk = *pkp) == NULL) in eddsa_pk_free()
119 freezero(pk, sizeof(*pk)); in eddsa_pk_free()
124 eddsa_pk_from_ptr(eddsa_pk_t *pk, const void *ptr, size_t len) in eddsa_pk_from_ptr() argument
128 if (len < sizeof(*pk)) in eddsa_pk_from_ptr()
131 memcpy(pk, ptr, sizeof(*pk)); in eddsa_pk_from_ptr()
133 if ((pkey = eddsa_pk_to_EVP_PKEY(pk)) == NULL) { in eddsa_pk_from_ptr()
156 eddsa_pk_from_EVP_PKEY(eddsa_pk_t *pk, const EVP_PKEY *pkey) in eddsa_pk_from_EVP_PKEY() argument
163 len != sizeof(pk->x)) in eddsa_pk_from_EVP_PKEY()
165 if (EVP_PKEY_get_raw_public_key(pkey, pk->x, &len) != 1 || in eddsa_pk_from_EVP_PKEY()
[all …]
/freebsd/crypto/openssl/include/crypto/
H A Dasn1.h29 int (*pub_decode) (EVP_PKEY *pk, const X509_PUBKEY *pub);
30 int (*pub_encode) (X509_PUBKEY *pub, const EVP_PKEY *pk);
34 int (*priv_decode) (EVP_PKEY *pk, const PKCS8_PRIV_KEY_INFO *p8inf);
35 int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk);
38 int (*pkey_size) (const EVP_PKEY *pk);
39 int (*pkey_bits) (const EVP_PKEY *pk);
40 int (*pkey_security_bits) (const EVP_PKEY *pk);
44 int (*param_missing) (const EVP_PKEY *pk);
68 int (*pkey_check) (const EVP_PKEY *pk);
69 int (*pkey_public_check) (const EVP_PKEY *pk);
[all …]
/freebsd/crypto/openssl/crypto/dsa/
H A Ddsa_prn.c55 EVP_PKEY *pk; in DSA_print() local
57 pk = EVP_PKEY_new(); in DSA_print()
58 if (pk == NULL) in DSA_print()
60 ret = EVP_PKEY_set1_DSA(pk, (DSA *)x); in DSA_print()
62 ret = EVP_PKEY_print_private(bp, pk, off, NULL); in DSA_print()
63 EVP_PKEY_free(pk); in DSA_print()
69 EVP_PKEY *pk; in DSAparams_print() local
71 pk = EVP_PKEY_new(); in DSAparams_print()
72 if (pk == NULL) in DSAparams_print()
74 ret = EVP_PKEY_set1_DSA(pk, (DSA *)x); in DSAparams_print()
[all …]
/freebsd/contrib/wpa/src/common/
H A Dsae_pk.c436 void sae_deinit_pk(struct sae_pk *pk) in sae_deinit_pk() argument
438 if (pk) { in sae_deinit_pk()
439 wpabuf_free(pk->m); in sae_deinit_pk()
440 crypto_ec_key_deinit(pk->key); in sae_deinit_pk()
442 crypto_ec_key_deinit(pk->sign_key_override); in sae_deinit_pk()
444 wpabuf_free(pk->pubkey); in sae_deinit_pk()
445 os_free(pk); in sae_deinit_pk()
452 struct sae_pk *pk; in sae_parse_pk() local
473 pk = os_zalloc(sizeof(*pk)); in sae_parse_pk()
474 if (!pk) in sae_parse_pk()
[all …]
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_box/curve25519xchacha20poly1305/
H A Dbox_curve25519xchacha20poly1305.c18 crypto_box_curve25519xchacha20poly1305_seed_keypair(unsigned char *pk, in crypto_box_curve25519xchacha20poly1305_seed_keypair() argument
28 return crypto_scalarmult_curve25519_base(pk, sk); in crypto_box_curve25519xchacha20poly1305_seed_keypair()
32 crypto_box_curve25519xchacha20poly1305_keypair(unsigned char *pk, in crypto_box_curve25519xchacha20poly1305_keypair() argument
37 return crypto_scalarmult_curve25519_base(pk, sk); in crypto_box_curve25519xchacha20poly1305_keypair()
42 const unsigned char *pk, in crypto_box_curve25519xchacha20poly1305_beforenm() argument
48 if (crypto_scalarmult_curve25519(s, sk, pk) != 0) { in crypto_box_curve25519xchacha20poly1305_beforenm()
65 unsigned long long mlen, const unsigned char *n, const unsigned char *pk, in crypto_box_curve25519xchacha20poly1305_detached() argument
73 if (crypto_box_curve25519xchacha20poly1305_beforenm(k, pk, sk) != 0) { in crypto_box_curve25519xchacha20poly1305_detached()
100 const unsigned char *n, const unsigned char *pk, const unsigned char *sk) in crypto_box_curve25519xchacha20poly1305_easy() argument
106 c + crypto_box_curve25519xchacha20poly1305_MACBYTES, c, m, mlen, n, pk, in crypto_box_curve25519xchacha20poly1305_easy()
[all …]
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_box/
H A Dcrypto_box.c65 crypto_box_seed_keypair(unsigned char *pk, unsigned char *sk, in crypto_box_seed_keypair() argument
68 return crypto_box_curve25519xsalsa20poly1305_seed_keypair(pk, sk, seed); in crypto_box_seed_keypair()
72 crypto_box_keypair(unsigned char *pk, unsigned char *sk) in crypto_box_keypair() argument
74 return crypto_box_curve25519xsalsa20poly1305_keypair(pk, sk); in crypto_box_keypair()
78 crypto_box_beforenm(unsigned char *k, const unsigned char *pk, in crypto_box_beforenm() argument
81 return crypto_box_curve25519xsalsa20poly1305_beforenm(k, pk, sk); in crypto_box_beforenm()
103 const unsigned char *pk, const unsigned char *sk) in crypto_box() argument
105 return crypto_box_curve25519xsalsa20poly1305(c, m, mlen, n, pk, sk); in crypto_box()
111 const unsigned char *pk, const unsigned char *sk) in crypto_box_open() argument
113 return crypto_box_curve25519xsalsa20poly1305_open(m, c, clen, n, pk, sk); in crypto_box_open()
/freebsd/contrib/bearssl/inc/
H A Dbearssl_rsa.h232 const br_rsa_public_key *pk);
281 const br_rsa_public_key *pk, unsigned char *hash_out);
330 const void *hash, size_t salt_len, const br_rsa_public_key *pk);
379 const br_rsa_public_key *pk,
573 const br_rsa_public_key *pk);
590 const br_rsa_public_key *pk, unsigned char *hash_out);
608 const void *hash, size_t salt_len, const br_rsa_public_key *pk);
674 const br_rsa_public_key *pk);
691 const br_rsa_public_key *pk, unsigned char *hash_out);
709 const void *hash, size_t salt_len, const br_rsa_public_key *pk);
[all …]
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_sign/
H A Dcrypto_sign.c47 crypto_sign_seed_keypair(unsigned char *pk, unsigned char *sk, in crypto_sign_seed_keypair() argument
50 return crypto_sign_ed25519_seed_keypair(pk, sk, seed); in crypto_sign_seed_keypair()
54 crypto_sign_keypair(unsigned char *pk, unsigned char *sk) in crypto_sign_keypair() argument
56 return crypto_sign_ed25519_keypair(pk, sk); in crypto_sign_keypair()
70 const unsigned char *pk) in crypto_sign_open() argument
72 return crypto_sign_ed25519_open(m, mlen_p, sm, smlen, pk); in crypto_sign_open()
85 unsigned long long mlen, const unsigned char *pk) in crypto_sign_verify_detached() argument
87 return crypto_sign_ed25519_verify_detached(sig, m, mlen, pk); in crypto_sign_verify_detached()
112 const unsigned char *pk) in crypto_sign_final_verify() argument
114 return crypto_sign_ed25519ph_final_verify(state, sig, pk); in crypto_sign_final_verify()
/freebsd/contrib/libfido2/examples/
H A Dutil.c167 es256_pk_t *pk = NULL; in write_es256_pubkey() local
171 if ((pk = es256_pk_new()) == NULL) { in write_es256_pubkey()
176 if (es256_pk_from_ptr(pk, ptr, len) != FIDO_OK) { in write_es256_pubkey()
192 if ((pkey = es256_pk_to_EVP_PKEY(pk)) == NULL) { in write_es256_pubkey()
204 es256_pk_free(&pk); in write_es256_pubkey()
224 es384_pk_t *pk = NULL; in write_es384_pubkey() local
228 if ((pk = es384_pk_new()) == NULL) { in write_es384_pubkey()
233 if (es384_pk_from_ptr(pk, ptr, len) != FIDO_OK) { in write_es384_pubkey()
249 if ((pkey = es384_pk_to_EVP_PKEY(pk)) == NULL) { in write_es384_pubkey()
261 es384_pk_free(&pk); in write_es384_pubkey()
[all …]
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/
H A Dbox_curve25519xsalsa20poly1305.c12 crypto_box_curve25519xsalsa20poly1305_seed_keypair(unsigned char *pk, in crypto_box_curve25519xsalsa20poly1305_seed_keypair() argument
22 return crypto_scalarmult_curve25519_base(pk, sk); in crypto_box_curve25519xsalsa20poly1305_seed_keypair()
26 crypto_box_curve25519xsalsa20poly1305_keypair(unsigned char *pk, in crypto_box_curve25519xsalsa20poly1305_keypair() argument
31 return crypto_scalarmult_curve25519_base(pk, sk); in crypto_box_curve25519xsalsa20poly1305_keypair()
36 const unsigned char *pk, in crypto_box_curve25519xsalsa20poly1305_beforenm() argument
42 if (crypto_scalarmult_curve25519(s, sk, pk) != 0) { in crypto_box_curve25519xsalsa20poly1305_beforenm()
72 const unsigned char *pk, in crypto_box_curve25519xsalsa20poly1305() argument
78 if (crypto_box_curve25519xsalsa20poly1305_beforenm(k, pk, sk) != 0) { in crypto_box_curve25519xsalsa20poly1305()
90 const unsigned char *n, const unsigned char *pk, const unsigned char *sk) in crypto_box_curve25519xsalsa20poly1305_open() argument
95 if (crypto_box_curve25519xsalsa20poly1305_beforenm(k, pk, sk) != 0) { in crypto_box_curve25519xsalsa20poly1305_open()
/freebsd/contrib/bearssl/src/x509/
H A Dencode_ec_rawder.c53 const br_ec_private_key *sk, const br_ec_public_key *pk, in br_encode_ec_raw_der_inner() argument
100 if (pk == NULL) { in br_encode_ec_raw_der_inner()
104 len_publicKey_bits = 2 + len_of_len(pk->qlen) + pk->qlen; in br_encode_ec_raw_der_inner()
141 if (pk != NULL) { in br_encode_ec_raw_der_inner()
145 buf += br_asn1_encode_length(buf, pk->qlen + 1); in br_encode_ec_raw_der_inner()
147 memcpy(buf, pk->q, pk->qlen); in br_encode_ec_raw_der_inner()
158 const br_ec_private_key *sk, const br_ec_public_key *pk) in br_encode_ec_raw_der() argument
160 return br_encode_ec_raw_der_inner(dest, sk, pk, 1); in br_encode_ec_raw_der()
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_sign/ed25519/ref10/
H A Dopen.c17 const unsigned char *pk, in _crypto_sign_ed25519_verify_detached() argument
35 if (ge25519_is_canonical(pk) == 0 || in _crypto_sign_ed25519_verify_detached()
36 ge25519_has_small_order(pk) != 0) { in _crypto_sign_ed25519_verify_detached()
40 if (ge25519_frombytes_negate_vartime(&A, pk) != 0) { in _crypto_sign_ed25519_verify_detached()
45 crypto_hash_sha512_update(&hs, pk, 32); in _crypto_sign_ed25519_verify_detached()
61 const unsigned char *pk) in crypto_sign_ed25519_verify_detached() argument
63 return _crypto_sign_ed25519_verify_detached(sig, m, mlen, pk, 0); in crypto_sign_ed25519_verify_detached()
69 const unsigned char *pk) in crypto_sign_ed25519_open() argument
77 if (crypto_sign_ed25519_verify_detached(sm, sm + 64, mlen, pk) != 0) { in crypto_sign_ed25519_open()
/freebsd/sys/contrib/libsodium/src/libsodium/include/sodium/
H A Dcrypto_box.h52 int crypto_box_seed_keypair(unsigned char *pk, unsigned char *sk,
56 int crypto_box_keypair(unsigned char *pk, unsigned char *sk);
61 const unsigned char *pk, const unsigned char *sk)
67 const unsigned char *pk, const unsigned char *sk)
73 const unsigned char *n, const unsigned char *pk,
82 const unsigned char *pk,
93 int crypto_box_beforenm(unsigned char *k, const unsigned char *pk,
128 unsigned long long mlen, const unsigned char *pk);
133 const unsigned char *pk, const unsigned char *sk)
149 const unsigned char *pk, const unsigned char *sk)
[all …]
H A Dcrypto_box_curve25519xchacha20poly1305.h46 int crypto_box_curve25519xchacha20poly1305_seed_keypair(unsigned char *pk,
51 int crypto_box_curve25519xchacha20poly1305_keypair(unsigned char *pk,
59 const unsigned char *pk,
68 const unsigned char *pk,
78 const unsigned char *pk,
88 const unsigned char *pk,
96 const unsigned char *pk,
145 const unsigned char *pk);
151 const unsigned char *pk,
/freebsd/contrib/libfido2/fuzz/
H A Dfuzz_assert.c256 int ext, void *pk) in verify_assert() argument
290 r = fido_assert_verify(assert, 0, type, pk); in verify_assert()
303 es256_pk_t *pk = NULL; in es256_convert() local
307 (pk = es256_pk_new()) == NULL) in es256_convert()
310 r = es256_pk_from_EVP_PKEY(pk, pkey); in es256_convert()
313 es256_pk_free(&pk); in es256_convert()
324 es384_pk_t *pk = NULL; in es384_convert() local
328 (pk = es384_pk_new()) == NULL) in es384_convert()
331 r = es384_pk_from_EVP_PKEY(pk, pkey); in es384_convert()
334 es384_pk_free(&pk); in es384_convert()
345 rs256_pk_t *pk = NULL; rs256_convert() local
366 eddsa_pk_t *pk = NULL; eddsa_convert() local
393 void *pk; test() local
[all...]

1234567891011