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:
13
sshdh.c
13
sshdh.c
@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user