comparison libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.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
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
17 #include "tomcrypt.h" 15 #include "tomcrypt.h"
18 16
19 /** 17 /**
20 @file ltc_ecc_is_valid_idx.c 18 @file ltc_ecc_is_valid_idx.c
21 ECC Crypto, Tom St Denis 19 ECC Crypto, Tom St Denis
22 */ 20 */
23 21
24 #ifdef LTC_MECC 22 #ifdef LTC_MECC
25 23
26 /** Returns whether an ECC idx is valid or not 24 /** Returns whether an ECC idx is valid or not
27 @param n The idx number to check 25 @param n The idx number to check
28 @return 1 if valid, 0 if not 26 @return 1 if valid, 0 if not
29 */ 27 */
30 int ltc_ecc_is_valid_idx(int n) 28 int ltc_ecc_is_valid_idx(int n)
31 { 29 {
32 int x; 30 int x;
33 31
34 for (x = 0; ltc_ecc_sets[x].size != 0; x++); 32 for (x = 0; ltc_ecc_sets[x].size != 0; x++);
38 } 36 }
39 return 0; 37 return 0;
40 } 38 }
41 39
42 #endif 40 #endif
43 /* $Source$ */ 41 /* ref: $Format:%D$ */
44 /* $Revision$ */ 42 /* git commit: $Format:%H$ */
45 /* $Date$ */ 43 /* commit time: $Format:%ai$ */
46 44