comparison libtomcrypt/src/pk/ecc/ltc_ecc_mulmod_timing.c @ 1471:6dba84798cd5

Update to libtomcrypt 1.18.1, merged with Dropbear changes
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 21:44:05 +0800
parents f849a5ca2efc
children 1ff2a1034c52
comparison
equal deleted inserted replaced
1470:8bba51a55704 1471:6dba84798cd5
3 * LibTomCrypt is a library that provides various cryptographic 3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner. 4 * algorithms in a highly modular and flexible manner.
5 * 5 *
6 * The library is free for all purposes without any express 6 * The library is free for all purposes without any express
7 * guarantee it works. 7 * guarantee it works.
8 *
9 * Tom St Denis, [email protected], http://libtom.org
10 */ 8 */
11 9
12 /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b 10 /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b
13 * 11 *
14 * All curves taken from NIST recommendation paper of July 1999 12 * All curves taken from NIST recommendation paper of July 1999
37 int ltc_ecc_mulmod(void *k, ecc_point *G, ecc_point *R, void *modulus, int map) 35 int ltc_ecc_mulmod(void *k, ecc_point *G, ecc_point *R, void *modulus, int map)
38 { 36 {
39 ecc_point *tG, *M[3]; 37 ecc_point *tG, *M[3];
40 int i, j, err; 38 int i, j, err;
41 void *mu, *mp; 39 void *mu, *mp;
42 unsigned long buf; 40 ltc_mp_digit buf;
43 int bitcnt, mode, digidx; 41 int bitcnt, mode, digidx;
44 42
45 LTC_ARGCHK(k != NULL); 43 LTC_ARGCHK(k != NULL);
46 LTC_ARGCHK(G != NULL); 44 LTC_ARGCHK(G != NULL);
47 LTC_ARGCHK(R != NULL); 45 LTC_ARGCHK(R != NULL);
157 return err; 155 return err;
158 } 156 }
159 157
160 #endif 158 #endif
161 #endif 159 #endif
162 /* $Source$ */ 160 /* ref: $Format:%D$ */
163 /* $Revision$ */ 161 /* git commit: $Format:%H$ */
164 /* $Date$ */ 162 /* commit time: $Format:%ai$ */
165 163