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

#
#
# delete "bn.ilg"
#
# delete "bn.ind"
#
# delete "bn.pdf"
#
# delete "poster.pdf"
#
# delete "tommath.pdf"
#
# rename "makefile"
#     to "Makefile.in"
#
# patch "Makefile.in"
#  from [0db3fd66a1f1ef47d182d20b71279c91070272da]
#    to [699792a85f9324d650e3ce0b66c89818912d07b5]
#
# patch "bn_mp_clear.c"
#  from [246c4a2b16e20f7d0a43f1fc990c3a7f1ead9bfb]
#    to [88da3976df72ea9ec9f9e4586b10bac6c7022fa2]
#
# patch "tommath_class.h"
#  from [a91c35ab0e5d115c16d6c6c9f6a107d22ee31d55]
#    to [7688e3b0cc18153b3383bfa6ff66abfc978c4680]
#
============================================================
--- makefile	0db3fd66a1f1ef47d182d20b71279c91070272da
+++ Makefile.in	699792a85f9324d650e3ce0b66c89818912d07b5
@@ -5,16 +5,22 @@ VERSION=0.35
 #version of library
 VERSION=0.35

-CFLAGS  +=  -I./ -Wall -W -Wshadow -Wsign-compare
+VPATH=@srcdir@
+srcdir=@srcdir@

+# Dropbear takes flags from the toplevel makefile
+CFLAGS += -I$(srcdir)
+
+#CFLAGS  +=  -I./ -Wall -W -Wshadow -Wsign-compare
+
 #for speed
-CFLAGS += -O3 -funroll-all-loops
+#CFLAGS += -O3 -funroll-all-loops

 #for size
 #CFLAGS += -Os

 #x86 optimizations [should be valid for any GCC install though]
-CFLAGS  += -fomit-frame-pointer
+#CFLAGS  += -fomit-frame-pointer

 #debug
 #CFLAGS += -g3
@@ -67,7 +73,7 @@ libtommath.a:  $(OBJECTS)

 libtommath.a:  $(OBJECTS)
 	$(AR) $(ARFLAGS) libtommath.a $(OBJECTS)
-	ranlib libtommath.a
+	$(RANLIB) libtommath.a

 #make a profiled library (takes a while!!!)
 #
@@ -146,10 +152,10 @@ clean:

 clean:
 	rm -f *.bat *.pdf *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test ltmtest mpitest mtest/mtest mtest/mtest.exe \
-        *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c *.da *.dyn *.dpi tommath.tex `find -type f | grep [~] | xargs` *.lo *.la
+        *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c *.da *.dyn *.dpi tommath.tex *.lo *.la
 	rm -rf .libs
-	cd etc ; make clean
-	cd pics ; make clean
+	cd etc && make clean
+	cd pics && make clean

 zipup: clean manual poster docs
 	perl gen.pl ; mv mpi.c pre_gen/ ; \
============================================================
--- bn_mp_clear.c	246c4a2b16e20f7d0a43f1fc990c3a7f1ead9bfb
+++ bn_mp_clear.c	88da3976df72ea9ec9f9e4586b10bac6c7022fa2
@@ -19,14 +19,17 @@ mp_clear (mp_int * a)
 void
 mp_clear (mp_int * a)
 {
-  int i;
+  volatile mp_digit *p;
+  int len;

   /* only do anything if a hasn't been freed previously */
   if (a->dp != NULL) {
     /* first zero the digits */
-    for (i = 0; i < a->used; i++) {
-        a->dp[i] = 0;
-    }
+	len = a->alloc;
+	p = a->dp;
+	while (len--) {
+		*p++ = 0;
+	}

     /* free ram */
     XFREE(a->dp);
============================================================
--- tommath_class.h	a91c35ab0e5d115c16d6c6c9f6a107d22ee31d55
+++ tommath_class.h	7688e3b0cc18153b3383bfa6ff66abfc978c4680
@@ -992,3 +992,9 @@
 #else
 #define LTM_LAST
 #endif
+
+/* Dropbear doesn't need these. */
+#undef BN_MP_KARATSUBA_MUL_C
+#undef BN_MP_KARATSUBA_SQR_C
+#undef BN_MP_TOOM_MUL_C
+#undef BN_MP_TOOM_SQR_C