HomeSort by: relevance | last modified time | path
    Searched refs:kex (Results 1 - 25 of 40) sorted by relevancy

1 2

  /src/crypto/external/bsd/openssh/dist/
kexdh.c 40 #include "kex.h"
48 kex_dh_keygen(struct kex *kex)
50 switch (kex->kex_type) {
52 kex->dh = dh_new_group1();
56 kex->dh = dh_new_group14();
59 kex->dh = dh_new_group16();
62 kex->dh = dh_new_group18();
67 if (kex->dh == NULL)
69 return (dh_gen_key(kex->dh, kex->we_need * 8))
    [all...]
kexgexc.c 45 #include "kex.h"
62 struct kex *kex = ssh->kex; local
66 nbits = dh_estimate(kex->dh_need * 8);
68 kex->min = DH_GRP_MIN;
69 kex->max = DH_GRP_MAX;
70 kex->nbits = nbits;
72 kex->nbits = MINIMUM(kex->nbits, 4096)
97 struct kex *kex = ssh->kex; local
147 struct kex *kex = ssh->kex; local
    [all...]
kexgen.c 37 #include "kex.h"
102 struct kex *kex = ssh->kex; local
105 switch (kex->kex_type) {
112 r = kex_dh_keypair(kex);
115 r = kex_ecdh_keypair(kex);
119 r = kex_c25519_keypair(kex);
122 r = kex_kem_sntrup761x25519_keypair(kex);
125 r = kex_kem_mlkem768x25519_keypair(kex);
145 struct kex *kex = ssh->kex; local
278 struct kex *kex = ssh->kex; local
    [all...]
kexgexs.c 43 #include "kex.h"
72 struct kex *kex = ssh->kex; local
85 kex->nbits = nbits;
86 kex->min = min;
87 kex->max = max;
93 if (kex->max < kex->min || kex->nbits < kex->min |
128 struct kex *kex = ssh->kex; local
    [all...]
kex.c 1 /* $NetBSD: kex.c,v 1.39 2025/10/11 15:45:06 christos Exp $ */
2 /* $OpenBSD: kex.c,v 1.189 2025/09/15 04:40:34 djm Exp $ */
29 __RCSID("$NetBSD: kex.c,v 1.39 2025/10/11 15:45:06 christos Exp $");
54 #include "kex.h"
74 "KEX algorithms",
99 const char **defprop = ssh->kex->server ? defpropserver : defpropclient;
109 if ((cp = kex_names_cat(kexalgos, ssh->kex->server ?
110 "ext-info-s,kex-strict-s-v00@openssh.com" :
111 "ext-info-c,kex-strict-c-v00@openssh.com")) == NULL)
198 /* extract kex init proposal strings *
481 struct kex *kex = ssh->kex; local
528 struct kex *kex = ssh->kex; local
575 struct kex *kex = ssh->kex; local
612 struct kex *kex = ssh->kex; local
674 struct kex *kex; local
929 struct kex *kex = ssh->kex; local
1090 struct kex *kex = ssh->kex; local
1155 struct kex *kex = ssh->kex; local
1193 struct kex *kex = ssh->kex; local
1214 struct kex *kex = ssh->kex; local
    [all...]
kexecdh.c 41 #include "kex.h"
47 kex_ecdh_dec_key_group(struct kex *, const struct sshbuf *, EC_KEY *key,
51 kex_ecdh_keypair(struct kex *kex)
59 if ((client_key = EC_KEY_new_by_curve_name(kex->ec_nid)) == NULL) {
81 kex->ec_client_key = client_key;
82 kex->ec_group = group;
83 client_key = NULL; /* owned by the kex */
84 kex->client_pub = buf;
93 kex_ecdh_enc(struct kex *kex, const struct sshbuf *client_blob
    [all...]
ssh_api.c 54 * stubs for privsep calls in the server side implementation of kex.
124 ssh->kex->server = is_server;
127 ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
128 ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server;
129 ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_server;
130 ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_server
446 struct kex *kex = ssh->kex; local
    [all...]
kex.h 1 /* $NetBSD: kex.h,v 1.28 2025/10/11 15:45:06 christos Exp $ */
2 /* $OpenBSD: kex.h,v 1.127 2025/08/11 10:55:38 djm Exp $ */
103 /* kex->flags */
112 /* kex->pq */
140 struct kex { struct
173 int (*kex[KEX_MAX])(struct ssh *); member in struct:kex
174 /* kex specific state */
202 struct kex *kex_new(void);
206 void kex_free(struct kex *);
229 int kex_dh_keypair(struct kex *);
    [all...]
kexmlkem768x25519.c 40 #include "kex.h"
49 kex_kem_mlkem768x25519_keypair(struct kex *kex)
65 memcpy(kex->mlkem768_client_key, keypair.sk.value,
66 sizeof(kex->mlkem768_client_key));
72 kexc25519_keygen(kex->c25519_client_key, cp);
78 kex->client_pub = buf;
88 kex_kem_mlkem768x25519_enc(struct kex *kex,
152 if ((r = ssh_digest_buffer(kex->hash_alg, buf, hash, sizeof(hash))) != 0
    [all...]
kexsntrup761x25519.c 38 #include "kex.h"
48 kex_kem_sntrup761x25519_keypair(struct kex *kex)
60 crypto_kem_sntrup761_keypair(cp, kex->sntrup761_client_key);
66 kexc25519_keygen(kex->c25519_client_key, cp);
70 kex->client_pub = buf;
78 kex_kem_sntrup761x25519_enc(struct kex *kex,
134 if ((r = ssh_digest_buffer(kex->hash_alg, buf, hash, sizeof(hash))) != 0)
147 ssh_digest_bytes(kex->hash_alg))) != 0
    [all...]
kexc25519.c 37 #include "kex.h"
92 kex_c25519_keypair(struct kex *kex)
102 kexc25519_keygen(kex->c25519_client_key, cp);
106 kex->client_pub = buf;
114 kex_c25519_enc(struct kex *kex, const struct sshbuf *client_blob,
166 kex_c25519_dec(struct kex *kex, const struct sshbuf *server_blob,
188 if ((r = kexc25519_shared_key_ext(kex->c25519_client_key, server_pub
    [all...]
sshd-auth.c 78 #include "kex.h"
625 pmonitor->m_pkex = &ssh->kex;
779 struct kex *kex; local
799 kex = ssh->kex;
802 kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_server;
803 kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_server
    [all...]
ssh-keyscan.c 43 #include "kex.h"
266 c->c_ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client;
267 c->c_ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client;
268 c->c_ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client;
269 c->c_ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client;
270 c->c_ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client
    [all...]
packet.c 74 #include "kex.h"
232 (ssh->kex = kex_new()) == NULL ||
258 kex_free(ssh->kex);
283 (ssh->kex != NULL && ssh->kex->done == 0);
346 kex_free(ssh->kex);
347 ssh->kex = NULL;
736 kex_free(ssh->kex);
737 ssh->kex = NULL;
952 if (ssh->kex && ssh->kex->newkeys[mode])
2529 struct kex *kex; local
    [all...]
monitor.c 65 #include "kex.h"
635 (r = sshbuf_put_stringb(m, ssh->kex->server_version)) != 0 ||
636 (r = sshbuf_put_stringb(m, ssh->kex->client_version)) != 0 ||
726 * Supported KEX types use SHA1 (20 bytes), SHA256 (32 bytes),
732 * XXX perform similar check for KEX signature requests too?
734 * than the full kex structure...
780 is_proof ? "hostkey proof" : "KEX", siglen);
1469 * can't check ssh->kex->initial_hostkey directly at this point
1870 struct kex *kex; local
    [all...]
monitor.h 82 struct kex **m_pkex;
sshconnect2.c 61 #include "kex.h"
278 ssh->kex->kex[KEX_DH_GRP1_SHA1] = kex_gen_client;
279 ssh->kex->kex[KEX_DH_GRP14_SHA1] = kex_gen_client;
280 ssh->kex->kex[KEX_DH_GRP14_SHA256] = kex_gen_client;
281 ssh->kex->kex[KEX_DH_GRP16_SHA512] = kex_gen_client;
282 ssh->kex->kex[KEX_DH_GRP18_SHA512] = kex_gen_client
    [all...]
packet.h 37 struct kex;
54 struct kex *kex; member in struct:ssh
serverloop.c 75 #include "kex.h"
704 ssh->kex->hostkey_alg)) == KEY_RSA)
705 kex_rsa_sigalg = ssh->kex->hostkey_alg;
718 if ((ndx = ssh->kex->host_key_index(key, 1, ssh)) == -1) {
723 * XXX refactor: make kex->sign just use an index rather
736 * during KEX to the default (SHA1).
742 else if (ssh->kex->flags & KEX_RSA_SHA2_512_SUPPORTED)
744 else if (ssh->kex->flags & KEX_RSA_SHA2_256_SUPPORTED)
753 ssh->kex->session_id)) != 0 ||
755 (r = ssh->kex->sign(ssh, key_prv, key_pub, &sig, &slen
    [all...]
auth2-pubkey.c 50 #include "kex.h"
117 /* hostbound auth includes the hostkey offered at initial KEX */
122 if (ssh->kex->initial_hostkey == NULL)
124 if (!sshkey_equal(hostkey, ssh->kex->initial_hostkey))
199 if ((r = sshbuf_putb(b, ssh->kex->session_id)) != 0)
203 ssh->kex->session_id)) != 0)
223 (r = sshkey_puts(ssh->kex->initial_hostkey, b)) != 0)
  /src/crypto/external/apache2/openssl/dist/crypto/evp/
exchange.c 339 ctx->op.kex.exchange = exchange;
342 ctx->op.kex.algctx = exchange->newctx(ossl_provider_ctx(exchange->prov));
343 if (ctx->op.kex.algctx == NULL) {
348 ret = exchange->init(ctx->op.kex.algctx, provkey, params);
396 if (!EVP_PKEY_CTX_IS_DERIVE_OP(ctx) || ctx->op.kex.algctx == NULL)
399 if (ctx->op.kex.exchange->set_peer == NULL) {
424 EVP_KEYEXCH_get0_provider(ctx->op.kex.exchange),
440 ret = ctx->op.kex.exchange->set_peer(ctx->op.kex.algctx, provkey);
528 if (ctx->op.kex.algctx == NULL
    [all...]
pmeth_lib.c 144 && ctx->op.kex.algctx != NULL)
367 if (ctx->op.kex.algctx != NULL && ctx->op.kex.exchange != NULL)
368 ctx->op.kex.exchange->freectx(ctx->op.kex.algctx);
369 EVP_KEYEXCH_free(ctx->op.kex.exchange);
370 ctx->op.kex.algctx = NULL;
371 ctx->op.kex.exchange = NULL;
489 if (pctx->op.kex.exchange != NULL) {
490 rctx->op.kex.exchange = pctx->op.kex.exchange
    [all...]
  /src/crypto/external/bsd/openssl/dist/crypto/evp/
exchange.c 335 ctx->op.kex.exchange = exchange;
336 ctx->op.kex.algctx = exchange->newctx(ossl_provider_ctx(exchange->prov));
337 if (ctx->op.kex.algctx == NULL) {
342 ret = exchange->init(ctx->op.kex.algctx, provkey, params);
390 if (!EVP_PKEY_CTX_IS_DERIVE_OP(ctx) || ctx->op.kex.algctx == NULL)
393 if (ctx->op.kex.exchange->set_peer == NULL) {
419 EVP_KEYEXCH_get0_provider(ctx->op.kex.exchange),
433 return ctx->op.kex.exchange->set_peer(ctx->op.kex.algctx, provkey);
519 if (ctx->op.kex.algctx == NULL
    [all...]
pmeth_lib.c 166 && ctx->op.kex.algctx != NULL)
387 if (ctx->op.kex.algctx != NULL && ctx->op.kex.exchange != NULL)
388 ctx->op.kex.exchange->freectx(ctx->op.kex.algctx);
389 EVP_KEYEXCH_free(ctx->op.kex.exchange);
390 ctx->op.kex.algctx = NULL;
391 ctx->op.kex.exchange = NULL;
505 if (pctx->op.kex.exchange != NULL) {
506 rctx->op.kex.exchange = pctx->op.kex.exchange
    [all...]
  /src/crypto/external/bsd/openssh/lib/
Makefile 45 kex.c \
47 kex-names.c \
127 COPTS.kex.c+= -Wno-error=deprecated-declarations

Completed in 38 milliseconds

1 2