The unified diff between revisions [2b4b13ac..] and [1c2b7d38..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'bn_fast_s_mp_mul_high_digs.c'

#
#
# patch "bn_fast_s_mp_mul_high_digs.c"
#  from [ceff3a71492dd8079556c72a83364f4930e9e733]
#    to [58c0a62a1a4fd0eb6d9b66f51b57348225b6d65a]
#
============================================================
--- bn_fast_s_mp_mul_high_digs.c	ceff3a71492dd8079556c72a83364f4930e9e733
+++ bn_fast_s_mp_mul_high_digs.c	58c0a62a1a4fd0eb6d9b66f51b57348225b6d65a
@@ -12,7 +12,7 @@
  * The library is free for all purposes without any express
  * guarantee it works.
  *
- * Tom St Denis, tomstdenis@iahu.ca, http://math.libtomcrypt.org
+ * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com
  */

 /* this is a modified version of fast_s_mul_digs that only produces
@@ -70,9 +70,6 @@ int fast_s_mp_mul_high_digs (mp_int * a,
       _W = _W >> ((mp_word)DIGIT_BIT);
   }

-  /* store final carry */
-  W[ix] = (mp_digit)(_W & MP_MASK);
-
   /* setup dest */
   olduse  = c->used;
   c->used = pa;
@@ -81,7 +78,7 @@ int fast_s_mp_mul_high_digs (mp_int * a,
     register mp_digit *tmpc;

     tmpc = c->dp + digs;
-    for (ix = digs; ix <= pa; ix++) {
+    for (ix = digs; ix < pa; ix++) {
       /* now extract the previous digit [below the carry] */
       *tmpc++ = W[ix];
     }
@@ -95,3 +92,7 @@ int fast_s_mp_mul_high_digs (mp_int * a,
   return MP_OKAY;
 }
 #endif
+
+/* $Source: /cvs/libtom/libtommath/bn_fast_s_mp_mul_high_digs.c,v $ */
+/* $Revision: 1.5 $ */
+/* $Date: 2006/11/14 03:46:25 $ */