Bug fix: Montgomery multiplication could produce results with the wrong
authorUlf Möller <ulf@openssl.org>
Thu, 14 Sep 2000 18:37:53 +0000 (18:37 +0000)
committerUlf Möller <ulf@openssl.org>
Thu, 14 Sep 2000 18:37:53 +0000 (18:37 +0000)
sign.

CHANGES
crypto/bn/bn_mont.c

diff --git a/CHANGES b/CHANGES
index f3ff38a5892e479b873fa72cbef475bb84dca015..a0a0512b7d4e62331e2063fc35e527d99655c5ba 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,10 @@
 
  Changes between 0.9.5a and 0.9.6  [xx XXX 2000]
 
+  *) Bug fix: Montgomery multiplication could produce results with the
+     wrong sign.
+     [Ulf Möller]
+
   *) Add RPM specification openssl.spec and modify it to build three
      packages.  The default package contains applications, application
      documentation and run-time libraries.  The devel package contains
index d40a153f24d366d005bd430870b4e69ef556e440..ca58ad33d23eaa7138542d3634e111b3ff67966d 100644 (file)
@@ -190,6 +190,7 @@ int BN_from_montgomery(BIGNUM *ret, BIGNUM *a, BN_MONT_CTX *mont,
 #if 0
        BN_rshift(ret,r,mont->ri);
 #else
+       ret->neg = r->neg;
        x=ri;
        rp=ret->d;
        ap= &(r->d[x]);