Lines Matching refs:kex
312 struct lws_kex *kex = pss->kex; in kex_ecdh() local
352 lws_get_random(pss->vhd->context, kex->eph_pri_key, LWS_SIZE_EC25519); in kex_ecdh()
353 kex->eph_pri_key[0] &= 248; in kex_ecdh()
354 kex->eph_pri_key[31] &= 127; in kex_ecdh()
355 kex->eph_pri_key[31] |= 64; in kex_ecdh()
366 crypto_scalarmult_curve25519(kex->Q_S, kex->eph_pri_key, basepoint); in kex_ecdh()
369 for (r = 0; r < (int)sizeof(kex->Q_S); r++) in kex_ecdh()
370 a |= kex->Q_S[r]; in kex_ecdh()
383 crypto_scalarmult_curve25519(pss->K, kex->eph_pri_key, kex->Q_C); in kex_ecdh()
421 if (_genhash_update_len(&ctx, kex->I_C, kex->I_C_payload_len)) in kex_ecdh()
423 if (_genhash_update_len(&ctx, kex->I_S, kex->I_S_payload_len)) in kex_ecdh()
442 if (_genhash_update_len(&ctx, kex->Q_C, LWS_SIZE_EC25519)) in kex_ecdh()
444 if (_genhash_update_len(&ctx, kex->Q_S, LWS_SIZE_EC25519)) in kex_ecdh()
493 lws_sized_blob(&p, kex->Q_S, LWS_SIZE_EC25519); in kex_ecdh()
535 kex_ecdh_dv(kex->keys_next_cts.key[c], LWS_SIZE_CHACHA256_KEY, in kex_ecdh()
537 kex_ecdh_dv(kex->keys_next_stc.key[c], LWS_SIZE_CHACHA256_KEY, in kex_ecdh()