/openbsd-src/usr.bin/ssh/ |
H A D | kexc25519.c | 60 u_char shared_key[CURVE25519_SIZE]; in kexc25519_shared_key_ext() local 64 crypto_scalarmult_curve25519(shared_key, key, pub); in kexc25519_shared_key_ext() 68 if (timingsafe_bcmp(zero, shared_key, CURVE25519_SIZE) == 0) in kexc25519_shared_key_ext() 72 dump_digest("shared secret 25519", shared_key, CURVE25519_SIZE); in kexc25519_shared_key_ext() 75 r = sshbuf_put(out, shared_key, CURVE25519_SIZE); in kexc25519_shared_key_ext() 77 r = sshbuf_put_bignum2_bytes(out, shared_key, CURVE25519_SIZE); in kexc25519_shared_key_ext() 78 explicit_bzero(shared_key, CURVE25519_SIZE); in kexc25519_shared_key_ext()
|
/openbsd-src/lib/libssl/ |
H A D | tls_key_share.c | 407 uint8_t **shared_key, size_t *shared_key_len) in tls_key_share_derive_dhe() argument 412 return ssl_kex_derive_dhe(ks->dhe, ks->dhe_peer, shared_key, in tls_key_share_derive_dhe() 418 uint8_t **shared_key, size_t *shared_key_len) in tls_key_share_derive_ecdhe_ecp() argument 424 shared_key, shared_key_len); in tls_key_share_derive_ecdhe_ecp() 429 uint8_t **shared_key, size_t *shared_key_len) in tls_key_share_derive_x25519() argument 442 *shared_key = sk; in tls_key_share_derive_x25519() 455 tls_key_share_derive(struct tls_key_share *ks, uint8_t **shared_key, in tls_key_share_derive() argument 458 if (*shared_key != NULL) in tls_key_share_derive() 464 return tls_key_share_derive_dhe(ks, shared_key, in tls_key_share_derive() 468 return tls_key_share_derive_x25519(ks, shared_key, in tls_key_share_derive() [all …]
|
H A D | ssl_kex.c | 241 uint8_t **shared_key, size_t *shared_key_len) in ssl_kex_derive_dhe() argument 255 *shared_key = key; in ssl_kex_derive_dhe() 389 uint8_t **shared_key, size_t *shared_key_len) in ssl_kex_derive_ecdhe_ecp() argument 412 *shared_key = key; in ssl_kex_derive_ecdhe_ecp()
|
H A D | tls_internal.h | 95 int tls_key_share_derive(struct tls_key_share *ks, uint8_t **shared_key,
|
H A D | tls13_client.c | 338 uint8_t *shared_key = NULL; in tls13_client_engage_record_protection() local 346 if (!tls_key_share_derive(ctx->hs->key_share, &shared_key, in tls13_client_engage_record_protection() 377 if (!tls13_derive_handshake_secrets(ctx->hs->tls13.secrets, shared_key, in tls13_client_engage_record_protection() 394 freezero(shared_key, shared_key_len); in tls13_client_engage_record_protection()
|
H A D | tls13_server.c | 376 uint8_t *shared_key = NULL; in tls13_server_engage_record_protection() local 382 if (!tls_key_share_derive(ctx->hs->key_share, &shared_key, in tls13_server_engage_record_protection() 412 if (!tls13_derive_handshake_secrets(ctx->hs->tls13.secrets, shared_key, in tls13_server_engage_record_protection() 433 freezero(shared_key, shared_key_len); in tls13_server_engage_record_protection()
|
H A D | ssl_local.h | 1350 uint8_t **shared_key, size_t *shared_key_len); 1357 uint8_t **shared_key, size_t *shared_key_len);
|
/openbsd-src/regress/lib/libssl/exporter/ |
H A D | exportertest.c | 49 const uint8_t shared_key[64]; member 98 .shared_key = { 158 .shared_key = { 220 .shared_key = { 286 .shared_key = { 352 .shared_key = { 590 if (!tls13_derive_handshake_secrets(tls13_secrets, et->shared_key, in exporter_test()
|
/openbsd-src/regress/lib/libcrypto/evp/ |
H A D | evp_ecx_test.c | 534 uint8_t *shared_key = NULL; in ecx_x25519_derive_test() local 572 if ((shared_key = malloc(shared_key_len)) == NULL) in ecx_x25519_derive_test() 574 if (EVP_PKEY_derive(pkey_ctx, shared_key, &shared_key_len) <= 0) { in ecx_x25519_derive_test() 585 if (memcmp(shared_key, shared_key_1, shared_key_len) != 0) { in ecx_x25519_derive_test() 588 hexdump(shared_key, shared_key_len); in ecx_x25519_derive_test() 601 freezero(shared_key, shared_key_len); in ecx_x25519_derive_test()
|