Home
last modified time | relevance | path

Searched refs:public_key (Results 1 – 22 of 22) sorted by relevance

/openbsd/src/regress/lib/libcrypto/curve25519/
Ded25519test.c372 dump_info(const uint8_t *message, size_t message_len, const uint8_t *public_key, in dump_info() argument
380 hexdump(public_key, ED25519_PUBLIC_KEY_LENGTH); in dump_info()
425 uint8_t public_key[ED25519_PUBLIC_KEY_LENGTH]; in test_ED25519_signature_malleability() local
431 ED25519_keypair(public_key, private_key); in test_ED25519_signature_malleability()
435 public_key, private_key)) { in test_ED25519_signature_malleability()
437 dump_info(message, sizeof(message), public_key, private_key, in test_ED25519_signature_malleability()
442 if (!ED25519_verify(message, sizeof(message), signature, public_key)) { in test_ED25519_signature_malleability()
444 dump_info(message, sizeof(message), public_key, private_key, in test_ED25519_signature_malleability()
451 if (ED25519_verify(message, sizeof(message), signature, public_key)) { in test_ED25519_signature_malleability()
453 dump_info(message, sizeof(message), public_key, private_key, in test_ED25519_signature_malleability()
/openbsd/src/regress/usr.bin/ssh/misc/sk-dummy/
Dsk-dummy.c86 response->public_key = NULL; in pack_key_ecdsa()
113 if ((response->public_key = malloc(response->public_key_len)) == NULL) { in pack_key_ecdsa()
118 response->public_key, response->public_key_len, NULL) == 0) { in pack_key_ecdsa()
141 if (response->public_key != NULL) { in pack_key_ecdsa()
142 memset(response->public_key, 0, in pack_key_ecdsa()
144 free(response->public_key); in pack_key_ecdsa()
145 response->public_key = NULL; in pack_key_ecdsa()
166 response->public_key = NULL; in pack_key_ed25519()
176 if ((response->public_key = malloc(response->public_key_len)) == NULL) { in pack_key_ed25519()
180 memcpy(response->public_key, pk, sizeof(pk)); in pack_key_ed25519()
[all …]
/openbsd/src/lib/libcrypto/curve25519/
Dcurve25519.h88 const uint8_t public_key[ED25519_PUBLIC_KEY_LENGTH],
98 const uint8_t public_key[ED25519_PUBLIC_KEY_LENGTH]);
Dcurve25519.c4642 const uint8_t public_key[ED25519_PUBLIC_KEY_LENGTH], in ED25519_sign()
4665 SHA512_Update(&hash_ctx, public_key, 32); in ED25519_sign()
4690 const uint8_t public_key[ED25519_PUBLIC_KEY_LENGTH]) { in ED25519_verify()
4694 x25519_ge_frombytes_vartime(&A, public_key) != 0) { in ED25519_verify()
4702 memcpy(pkcopy, public_key, 32); in ED25519_verify()
4725 SHA512_Update(&hash_ctx, public_key, 32); in ED25519_verify()
/openbsd/src/usr.bin/ssh/
Dkexecdh.c50 const EC_POINT *public_key; in kex_ecdh_keypair() local
63 public_key = EC_KEY_get0_public_key(client_key); in kex_ecdh_keypair()
69 if ((r = sshbuf_put_ec(buf, public_key, group)) != 0 || in kex_ecdh_keypair()
Dsk-usbhid.c486 response->public_key = NULL; in pack_public_key_ecdsa()
522 if ((response->public_key = malloc(response->public_key_len)) == NULL) { in pack_public_key_ecdsa()
527 response->public_key, response->public_key_len, NULL) == 0) { in pack_public_key_ecdsa()
534 if (ret != 0 && response->public_key != NULL) { in pack_public_key_ecdsa()
535 memset(response->public_key, 0, response->public_key_len); in pack_public_key_ecdsa()
536 free(response->public_key); in pack_public_key_ecdsa()
537 response->public_key = NULL; in pack_public_key_ecdsa()
555 response->public_key = NULL; in pack_public_key_ed25519()
567 if ((response->public_key = malloc(response->public_key_len)) == NULL) { in pack_public_key_ed25519()
571 memcpy(response->public_key, ptr, len); in pack_public_key_ed25519()
[all …]
Dssh-sk.c168 freezero(r->public_key, r->public_key_len); in sshsk_free_enroll_response()
213 resp->public_key, resp->public_key_len)) != 0) { in sshsk_ecdsa_assemble()
278 memcpy(key->ed25519_pk, resp->public_key, ED25519_PK_SZ); in sshsk_ed25519_assemble()
298 if (resp->public_key == NULL || resp->key_handle == NULL) { in sshsk_key_from_response()
748 freezero(rks[i]->key.public_key, rks[i]->key.public_key_len); in sshsk_free_sk_resident_keys()
Dsk-api.h43 uint8_t *public_key; member
Dlibcrux_mlkem768_sha3.h9384 Eurydice_slice public_key, in libcrux_ml_kem_serialize_deserialize_ring_elements_reduced_33() argument
9391 i < Eurydice_slice_len(public_key, uint8_t) / in libcrux_ml_kem_serialize_deserialize_ring_elements_reduced_33()
9396 public_key, i0 * LIBCRUX_ML_KEM_CONSTANTS_BYTES_PER_RING_ELEMENT, in libcrux_ml_kem_serialize_deserialize_ring_elements_reduced_33()
10805 static inline void libcrux_ml_kem_ind_cpa_encrypt_60(Eurydice_slice public_key, in libcrux_ml_kem_ind_cpa_encrypt_60() argument
10811 Eurydice_slice_subslice_to(public_key, (size_t)1152U, uint8_t, size_t), in libcrux_ml_kem_ind_cpa_encrypt_60()
10814 Eurydice_slice_subslice_from(public_key, (size_t)1152U, uint8_t, size_t); in libcrux_ml_kem_ind_cpa_encrypt_60()
11085 libcrux_ml_kem_types_MlKemPublicKey_15 *public_key, in libcrux_ml_kem_ind_cca_encapsulate_cd() argument
11099 libcrux_ml_kem_types_as_slice_cb_50(public_key), in libcrux_ml_kem_ind_cca_encapsulate_cd()
11114 (size_t)1184U, libcrux_ml_kem_types_as_slice_cb_50(public_key), uint8_t); in libcrux_ml_kem_ind_cca_encapsulate_cd()
11159 libcrux_ml_kem_types_MlKemPublicKey_15 *public_key, in libcrux_ml_kem_ind_cca_instantiations_portable_encapsulate_c6() argument
[all …]
Dpkcs11.h965 ck_object_handle_t *public_key,
DPROTOCOL.certkeys121 string public_key
/openbsd/src/lib/libcrypto/x509/
Dx509_req.c82 EVP_PKEY *public_key; in X509_to_X509_REQ() local
94 if ((public_key = X509_get0_pubkey(x509)) == NULL) in X509_to_X509_REQ()
96 if (!X509_REQ_set_pubkey(req, public_key)) in X509_to_X509_REQ()
Dx509_skey.c148 pk = ctx->subject_req->req_info->pubkey->public_key; in s2i_skey_id()
150 pk = ctx->subject_cert->cert_info->key->public_key; in s2i_skey_id()
Dx509_cmp.c377 return x->cert_info->key->public_key; in X509_get0_pubkey_bitstr()
Dx509_local.h92 ASN1_BIT_STRING *public_key; member
/openbsd/src/lib/libcrypto/asn1/
Dx_pubkey.c99 .offset = offsetof(X509_PUBKEY, public_key),
195 if (key->public_key == NULL) in X509_PUBKEY_get0()
755 ASN1_STRING_set0(pub->public_key, penc, penclen); in X509_PUBKEY_set0_param()
757 return asn1_abs_set_unused_bits(pub->public_key, 0); in X509_PUBKEY_set0_param()
768 *pk = pub->public_key->data; in X509_PUBKEY_get0_param()
769 *ppklen = pub->public_key->length; in X509_PUBKEY_get0_param()
Dt_x509.c307 if (!EVP_Digest(x->cert_info->key->public_key->data, in X509_ocspid_print()
308 x->cert_info->key->public_key->length, in X509_ocspid_print()
/openbsd/src/lib/libcrypto/ec/
Dec_ameth.c503 const EC_POINT *public_key; in do_EC_KEY_print() local
516 public_key = EC_KEY_get0_public_key(x); in do_EC_KEY_print()
517 if (public_key != NULL) { in do_EC_KEY_print()
518 if ((pub_key = EC_POINT_point2bn(group, public_key, in do_EC_KEY_print()
Dec_asn1.c1280 const EC_POINT *public_key = NULL; in i2d_ECPrivateKey() local
1296 if ((public_key = EC_KEY_get0_public_key(ec_key)) == NULL) { in i2d_ECPrivateKey()
1319 if (public_key != NULL) { in i2d_ECPrivateKey()
1323 if (!ec_point_to_asn1_bit_string(group, public_key, form, in i2d_ECPrivateKey()
/openbsd/src/lib/libcrypto/evp/
Dp_lib.c511 const unsigned char *public_key, size_t len) in EVP_PKEY_new_raw_public_key() argument
525 if (!pkey->ameth->set_pub_key(pkey, public_key, len)) { in EVP_PKEY_new_raw_public_key()
Devp_local.h145 int (*set_pub_key)(EVP_PKEY *pk, const unsigned char *public_key,
Devp.h409 const unsigned char *public_key, size_t len);