Skip to content

Commit

Permalink
added libtommath-0.36
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom St Denis authored and sjaeckel committed Jul 15, 2010
1 parent fdfa2f4 commit 9294e79
Show file tree
Hide file tree
Showing 159 changed files with 1,588 additions and 475 deletions.
16 changes: 0 additions & 16 deletions TODO

This file was deleted.

Binary file modified bn.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion bn.tex
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
\begin{document}
\frontmatter
\pagestyle{empty}
\title{LibTomMath User Manual \\ v0.35}
\title{LibTomMath User Manual \\ v0.36}
\author{Tom St Denis \\ [email protected]}
\maketitle
This text, the library and the accompanying textbook are all hereby placed in the public domain. This book has been
Expand Down
4 changes: 4 additions & 0 deletions bn_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ char *mp_error_to_string(int code)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_fast_mp_invmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,7 @@ LBL_ERR:mp_clear_multi (&x, &y, &u, &v, &B, &D, NULL);
return res;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_fast_mp_montgomery_reduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,7 @@ int fast_mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
5 changes: 5 additions & 0 deletions bn_fast_s_mp_mul_digs.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
/* execute loop */
for (iz = 0; iz < iy; ++iz) {
_W += ((mp_word)*tmpx++)*((mp_word)*tmpy--);

}

/* store term */
Expand Down Expand Up @@ -103,3 +104,7 @@ int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_fast_s_mp_mul_high_digs.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,7 @@ int fast_s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_fast_s_mp_sqr.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,7 @@ int fast_s_mp_sqr (mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_2expt.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ mp_2expt (mp_int * a, int b)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_abs.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ mp_abs (mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_add.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ int mp_add (mp_int * a, mp_int * b, mp_int * c)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_add_d.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,7 @@ mp_add_d (mp_int * a, mp_digit b, mp_int * c)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_addmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ mp_addmod (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
return res;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_and.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ mp_and (mp_int * a, mp_int * b, mp_int * c)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_clamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ mp_clamp (mp_int * a)
}
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_clear.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ mp_clear (mp_int * a)
}
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_clear_multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ void mp_clear_multi(mp_int *mp, ...)
va_end(args);
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_cmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ mp_cmp (mp_int * a, mp_int * b)
}
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_cmp_d.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ int mp_cmp_d(mp_int * a, mp_digit b)
}
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_cmp_mag.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ int mp_cmp_mag (mp_int * a, mp_int * b)
return MP_EQ;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_cnt_lsb.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ int mp_cnt_lsb(mp_int *a)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ mp_copy (mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_count_bits.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ mp_count_bits (mp_int * a)
return r;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_div.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,7 @@ LBL_Q:mp_clear (&q);
#endif

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_div_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ int mp_div_2(mp_int * a, mp_int * b)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_div_2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,7 @@ int mp_div_2d (mp_int * a, int b, mp_int * c, mp_int * d)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_div_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ mp_div_3 (mp_int * a, mp_int *c, mp_digit * d)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_div_d.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,7 @@ int mp_div_d (mp_int * a, mp_digit b, mp_int * c, mp_digit * d)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_dr_is_modulus.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ int mp_dr_is_modulus(mp_int *a)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_dr_reduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ mp_dr_reduce (mp_int * x, mp_int * n, mp_digit k)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_dr_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ void mp_dr_setup(mp_int *a, mp_digit *d)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_exch.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ mp_exch (mp_int * a, mp_int * b)
*b = t;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_expt_d.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ int mp_expt_d (mp_int * a, mp_digit b, mp_int * c)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
6 changes: 5 additions & 1 deletion bn_mp_exptmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y)
}

/* modified diminished radix reduction */
#if defined(BN_MP_REDUCE_IS_2K_L_C) && defined(BN_MP_REDUCE_2K_L_C)
#if defined(BN_MP_REDUCE_IS_2K_L_C) && defined(BN_MP_REDUCE_2K_L_C) && defined(BN_S_MP_EXPTMOD_C)
if (mp_reduce_is_2k_l(P) == MP_YES) {
return s_mp_exptmod(G, X, P, Y, 1);
}
Expand Down Expand Up @@ -106,3 +106,7 @@ int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_exptmod_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,7 @@ LBL_RES:mp_clear (&res);
}
#endif


/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_exteuclid.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@ _ERR: mp_clear_multi(&u1, &u2, &u3, &v1, &v2, &v3, &t1, &t2, &t3, &q, &tmp, NULL
return err;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_fread.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ int mp_fread(mp_int *a, int radix, FILE *stream)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_fwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,7 @@ int mp_fwrite(mp_int *a, int radix, FILE *stream)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_gcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,7 @@ LBL_U:mp_clear (&v);
return res;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_get_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ unsigned long mp_get_int(mp_int * a)
return res & 0xFFFFFFFFUL;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_grow.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ int mp_grow (mp_int * a, int size)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,7 @@ int mp_init (mp_int * a)
return MP_OKAY;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_init_copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ int mp_init_copy (mp_int * a, mp_int * b)
return mp_copy (b, a);
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_init_multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,7 @@ int mp_init_multi(mp_int *mp, ...)
}

#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_init_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ int mp_init_set (mp_int * a, mp_digit b)
return err;
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
4 changes: 4 additions & 0 deletions bn_mp_init_set_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ int mp_init_set_int (mp_int * a, unsigned long b)
return mp_set_int(a, b);
}
#endif

/* $Source$ */
/* $Revision$ */
/* $Date$ */
Loading

0 comments on commit 9294e79

Please sign in to comment.