summaryrefslogtreecommitdiffhomepage
path: root/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-06-24 17:50:50 +0800
committerMatt Johnston <matt@ucc.asn.au>2017-06-24 17:50:50 +0800
commita79b61517bc7123250d0e2dc21dc18deccf0bb64 (patch)
treef95c80c6801abd286eaf370dd794859235d1be82 /libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c
parent99361f54ca77e0d1ff821c02d7d8df3a87aafde5 (diff)
update to libtomcrypt 1.17 (with Dropbear changes)
Diffstat (limited to 'libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c')
-rw-r--r--libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c12
1 files changed, 6 insertions, 6 deletions
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$ */