<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>RE: PuTTY compatibility: Does gen_rsa_priv_key still need to regenerate primes until modulus is a multiple-of-8-bits long ?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Matt,<BR>
&nbsp;&nbsp; Thanks, that was really quick!<BR>
<BR>
&nbsp;&nbsp; Regards,<BR>
&nbsp;&nbsp; -- Sajin<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: Matt Johnston [<A HREF="mailto:matt@ucc.asn.au">mailto:matt@ucc.asn.au</A>]<BR>
Sent: Fri 9/12/2008 12:49 PM<BR>
To: Valoth, Sajin [NETPWR/EMBED/MA]<BR>
Cc: dropbear@ucc.asn.au<BR>
Subject: Re: PuTTY compatibility: Does gen_rsa_priv_key still need to regenerate primes until modulus is a multiple-of-8-bits long ?<BR>
<BR>
On Fri, Sep 12, 2008 at 10:32:01AM -0500, Sajin.Valoth@Emerson.com wrote:<BR>
&gt; Hi all,<BR>
&gt;&nbsp;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; With dropbear 0.48.1 running on a MIPS Au1550 platform,<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RSA key generation occasionally takes a very long time (multiple<BR>
&gt; minutes);<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the problem was traced to the loop shown below in<BR>
&gt; gen_rsa_priv_key()<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; which executes many times, until a value of the modulus, n,<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is finally computed that is a multiple-of-8-bits long.<BR>
...<BR>
&gt;&nbsp;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; However, using more recent versions of PuTTY&nbsp; (0.58 and 0.60),<BR>
&gt; I don't see any problems<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with keys generated by dropbear where the modulus is not a<BR>
&gt; multiple-of-8-bits long.<BR>
&gt;&nbsp;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; So, my question is: should the loop above be deprecated since<BR>
&gt; it doesn't appear to be necessary any more?<BR>
<BR>
Yes, it looks like this was fixed in PuTTY 0.54 in 2004 [1],<BR>
so can be removed. Thanks for letting me know.<BR>
<BR>
Cheers,<BR>
Matt<BR>
<BR>
[1] <A HREF="http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/rsa-non8mult-verify-fail.html">http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/rsa-non8mult-verify-fail.html</A><BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>