1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner.
6 * The library is free for all purposes without any express
10 /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b
12 * All curves taken from NIST recommendation paper of July 1999
13 * Available at http://csrc.nist.gov/cryptval/dss.htm
18 @file ltc_ecc_is_valid_idx.c
19 ECC Crypto, Tom St Denis
24 /** Returns whether an ECC idx is valid or not
25 @param n The idx number to check
26 @return 1 if valid, 0 if not
28 int ltc_ecc_is_valid_idx(int n)
32 for (x = 0; ltc_ecc_sets[x].size != 0; x++);
33 /* -1 is a valid index --- indicating that the domain params were supplied by the user */
34 if ((n >= -1) && (n < x)) {
41 /* ref: $Format:%D$ */
42 /* git commit: $Format:%H$ */
43 /* commit time: $Format:%ai$ */