"J.H.M. Dassen" <[EMAIL PROTECTED]> writes:
> On Wed, Jan 13, 1999 at 15:09:06 +1100, Alfred Reynolds wrote:
> > I am trying run lsh-keygen but it keeps core dumping on me.
> > I am using redhat 5.2 and slackware 3.0
>
> Good, it means I'm not mad after all. I reported earlier about this problem
> on a Debian system, and as there were no other reports I feared it might be
> Debian specific (I've even gone so far as to rebuild gmp2, but it didn't
> make a difference; neither did using gcc 2.7.2.3 rather than EGCS 1.1.1).
>
> I can confirm that this problem isn't Intel-specific either, as I've been
> able to reproduce it on a Debian PowerPC system.
There seems to be an off-by-one bug in dss_keygen.c. Try the following
patch:
--- dss_keygen.c 1998/12/31 04:02:37 1.2
+++ dss_keygen.c 1999/01/13 16:53:40
@@ -114,8 +114,7 @@
{
mpz_set(t, s);
mpz_add_ui(t, t, j + k);
-
- hash(t, buffer + ( (n+1-k) *SHA_DIGESTSIZE));
+ hash(t, buffer + ( (n-k) * SHA_DIGESTSIZE));
}
bignum_parse_u(p, size, buffer);
/Niels