From: simon Date: Sun, 16 Mar 2003 13:28:48 +0000 (+0000) Subject: RSA blinding requires random numbers. Hence, Pageant now needs to X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/36b4376e151a09df0e03e9fdd10bddbe2204b23a RSA blinding requires random numbers. Hence, Pageant now needs to have the random number generator linked in. git-svn-id: svn://svn.tartarus.org/sgt/putty@2945 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/Recipe b/Recipe index 08399e4d..7ad3d32e 100644 --- a/Recipe +++ b/Recipe @@ -142,7 +142,7 @@ psftp : [C] psftp console WINSSH be_none SFTP WINMISC scp.res LIBS1 pageant : [G] pageant sshrsa sshpubk sshdes sshbn sshmd5 version tree234 + misc sshaes sshsha pageantc sshdss sshsh512 winutils winmisc - + pageant.res LIBS + + sshrand noise winstore ageant.res LIBS puttygen : [G] puttygen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version + sshrand noise sshsha winstore misc winctrls sshrsa sshdss winmisc diff --git a/pageant.c b/pageant.c index 50daf63e..1b282ab8 100644 --- a/pageant.c +++ b/pageant.c @@ -128,24 +128,6 @@ static void *get_keylist1(void); static void *get_keylist2(void); /* - * We need this to link with the RSA code, because rsaencrypt() - * pads its data with random bytes. Since we only use rsadecrypt() - * and the signing functions, which are deterministic, this should - * never be called. - * - * If it _is_ called, there is a _serious_ problem, because it - * won't generate true random numbers. So we must scream, panic, - * and exit immediately if that should happen. - */ -int random_byte(void) -{ - MessageBox(main_hwnd, "Internal Error", APPNAME, MB_OK | MB_ICONERROR); - exit(0); - /* this line can't be reached but it placates MSVC's warnings :-) */ - return 0; -} - -/* * Blob structure for passing to the asymmetric SSH2 key compare * function, prototyped here. */ @@ -1948,6 +1930,11 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) } /* + * Initialise the random number generator. + */ + random_init(); + + /* * Initialise storage for short-term passphrase cache. */ passphrases = newtree234(NULL);