Mercurial > dropbear
diff libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c @ 1437:871b18fd7065 fuzz
merge from main (libtommath/libtomcrypt/curve25510-donna updates)
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 24 Jun 2017 22:51:45 +0800 |
parents | f849a5ca2efc |
children | 6dba84798cd5 |
line wrap: on
line diff
--- a/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c Sat Jun 24 10:34:58 2017 +0800 +++ b/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c Sat Jun 24 22:51:45 2017 +0800 @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, [email protected], http://libtomcrypt.com + * Tom St Denis, [email protected], http://libtom.org */ /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b @@ -21,7 +21,7 @@ ECC Crypto, Tom St Denis */ -#ifdef MECC +#ifdef LTC_MECC /** Returns whether an ECC idx is valid or not @param n The idx number to check @@ -33,14 +33,14 @@ for (x = 0; ltc_ecc_sets[x].size != 0; x++); /* -1 is a valid index --- indicating that the domain params were supplied by the user */ - if ((n >= -1) || (n < x)) { + if ((n >= -1) && (n < x)) { return 1; } return 0; } #endif -/* $Source: /cvs/libtom/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c,v $ */ -/* $Revision: 1.4 $ */ -/* $Date: 2006/11/21 00:10:18 $ */ +/* $Source$ */ +/* $Revision$ */ +/* $Date$ */