comparison bn_mp_exptmod.c @ 386:97db060d0ef5 libtommath-orig libtommath-0.40

Update to LibTomMath 0.40
author Matt Johnston <matt@ucc.asn.au>
date Thu, 11 Jan 2007 03:11:15 +0000
parents 91fbc376f010
children
comparison
equal deleted inserted replaced
282:91fbc376f010 386:97db060d0ef5
10 * additional optimizations in place. 10 * additional optimizations in place.
11 * 11 *
12 * The library is free for all purposes without any express 12 * The library is free for all purposes without any express
13 * guarantee it works. 13 * guarantee it works.
14 * 14 *
15 * Tom St Denis, [email protected], http://math.libtomcrypt.org 15 * Tom St Denis, [email protected], http://math.libtomcrypt.com
16 */ 16 */
17 17
18 18
19 /* this is a shell function that calls either the normal or Montgomery 19 /* this is a shell function that calls either the normal or Montgomery
20 * exptmod functions. Originally the call to the montgomery code was 20 * exptmod functions. Originally the call to the montgomery code was
64 return MP_VAL; 64 return MP_VAL;
65 #endif 65 #endif
66 } 66 }
67 67
68 /* modified diminished radix reduction */ 68 /* modified diminished radix reduction */
69 #if defined(BN_MP_REDUCE_IS_2K_L_C) && defined(BN_MP_REDUCE_2K_L_C) 69 #if defined(BN_MP_REDUCE_IS_2K_L_C) && defined(BN_MP_REDUCE_2K_L_C) && defined(BN_S_MP_EXPTMOD_C)
70 if (mp_reduce_is_2k_l(P) == MP_YES) { 70 if (mp_reduce_is_2k_l(P) == MP_YES) {
71 return s_mp_exptmod(G, X, P, Y, 1); 71 return s_mp_exptmod(G, X, P, Y, 1);
72 } 72 }
73 #endif 73 #endif
74 74
104 } 104 }
105 #endif 105 #endif
106 } 106 }
107 107
108 #endif 108 #endif
109
110 /* $Source: /cvs/libtom/libtommath/bn_mp_exptmod.c,v $ */
111 /* $Revision: 1.4 $ */
112 /* $Date: 2006/03/31 14:18:44 $ */