1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Diffie-Hellman group exchange in SSH2. Currently #ifdeffed out

(change the sense of #ifdef DO_DIFFIE_HELLMAN_GEX in ssh.c) because
it's _far_ too slow. Will be re-enabled once the bignum routines
work a bit faster (or rather a _lot_ faster).

[originally from svn r962]
This commit is contained in:
Simon Tatham
2001-03-01 17:55:40 +00:00
parent 862d6a496d
commit cc9d7ba87e
3 changed files with 85 additions and 17 deletions

13
sshdh.c
View File

@ -4,6 +4,10 @@ struct ssh_kex ssh_diffiehellman = {
"diffie-hellman-group1-sha1"
};
struct ssh_kex ssh_diffiehellman_gex = {
"diffie-hellman-group-exchange-sha1"
};
/*
* The prime p used in the key exchange.
*/
@ -49,6 +53,15 @@ void dh_setup_group1(void) {
dh_init();
}
/*
* Initialise DH for an alternative group.
*/
void dh_setup_group(Bignum pval, Bignum gval) {
p = copybn(pval);
g = copybn(gval);
dh_init();
}
/*
* Clean up.
*/