--- pgp/src/rsagen.c 2018/04/24 16:41:14 1.1.1.5 +++ pgp/src/rsagen.c 2018/04/24 16:45:43 1.1.1.8 @@ -30,6 +30,10 @@ #include "random.h" #include "rsaglue.h" +#ifdef MACTC5 +extern DialogPtr ProgressDialog; +#endif + static void derive_rsakeys(unitptr n,unitptr e,unitptr d, unitptr p,unitptr q,unitptr u,short ebits); /* Given primes p and q, derive RSA key components n, e, d, and u. */ @@ -113,7 +117,8 @@ static void derive_rsakeys(unitptr n, un mp_dec(e); mp_dec(e); /* precompensate for preincrements of e */ do { mp_inc(e); mp_inc(e); /* try odd e's until we get it. */ - mp_gcd(ptemp,e,phi); /* look for e such that gcd(e,phi(n)) = 1 */ + mp_gcd(ptemp,e,phi); /* look for e such that + gcd(e,phi(n)) = 1 */ } while (testne(ptemp,1)); /* Now we have e. Next, compute d, then u, then n. @@ -185,6 +190,11 @@ int rsa_keygen(unitptr n, unitptr e, uni trueRandConsume(pbits); /* "use up" this many bits */ +#ifdef MACTC5 + ShowWindow(ProgressDialog); + DrawDialog(ProgressDialog); +#endif + #ifdef STRONGPRIMES /* make a good strong prime for the key */ status = goodprime(p,pbits,pbits-latitude(pbits)); #else /* just any random prime will suffice for the key */ @@ -211,7 +221,8 @@ int rsa_keygen(unitptr n, unitptr e, uni return(status); /* failed to find a suitable prime */ /* Note that at this point we can't be sure that q>p. */ - if (mp_compare(p,q) >= 0) { /* ensure that p= 0) { /* ensure that p