Searched refs:dh_priv (Results 1 - 2 of 2) sorted by relevance

/external/dropbear/
H A Dkex.h36 void gen_kexdh_vals(mp_int *dh_pub, mp_int *dh_priv);
37 void kexdh_comb_key(mp_int *dh_pub_us, mp_int *dh_priv, mp_int *dh_pub_them,
H A Dcommon-kex.c473 /* dh_pub and dh_priv MUST be already initialised */
474 void gen_kexdh_vals(mp_int *dh_pub, mp_int *dh_priv) { argument
492 /* dh_priv is just a temp var here */
493 if (mp_sub_d(&dh_p, 1, dh_priv) != MP_OKAY) {
496 if (mp_div_2(dh_priv, &dh_q) != MP_OKAY) {
500 /* Generate a private portion 0 < dh_priv < dh_q */
501 gen_random_mpint(&dh_q, dh_priv);
504 if (mp_exptmod(&dh_g, dh_priv, &dh_p, dh_pub) != MP_OKAY) {
513 * vice-versa. dh_priv is the x/y value corresponding to dh_pub_us */
514 void kexdh_comb_key(mp_int *dh_pub_us, mp_int *dh_priv, mp_in argument
[all...]

Completed in 900 milliseconds