From a79b61517bc7123250d0e2dc21dc18deccf0bb64 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Sat, 24 Jun 2017 17:50:50 +0800 Subject: update to libtomcrypt 1.17 (with Dropbear changes) --- libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c') diff --git a/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c b/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c index cf81f24..4a02068 100644 --- a/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c +++ b/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c @@ -6,7 +6,7 @@ * The library is free for all purposes without any express * guarantee it works. * - * Tom St Denis, tomstdenis@gmail.com, http://libtomcrypt.com + * Tom St Denis, tomstdenis@gmail.com, 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 @@ int ltc_ecc_is_valid_idx(int n) 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$ */ -- cgit v1.2.3