Mercurial > dropbear
comparison libtommath/bn_mp_exptmod.c @ 511:582cb38e4eb5 insecure-nocrypto
propagate from branch 'au.asn.ucc.matt.dropbear' (head cdcc3c729e29544e8b98a408e2dc60e4483dfd2a)
to branch 'au.asn.ucc.matt.dropbear.insecure-nocrypto' (head 0ca38a1cf349f7426ac9de34ebe4c3e3735effab)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 06 Nov 2008 13:16:55 +0000 |
parents | 5ff8218bcee9 |
children | 60fc6476e044 |
comparison
equal
deleted
inserted
replaced
361:461c4b1fb35f | 511:582cb38e4eb5 |
---|---|
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 $ */ |