diff libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c @ 1435:f849a5ca2efc

update to libtomcrypt 1.17 (with Dropbear changes)
author Matt Johnston <matt@ucc.asn.au>
date Sat, 24 Jun 2017 17:50:50 +0800
parents 0cbe8f6dbf9e
children 6dba84798cd5
line wrap: on
line diff
--- a/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c	Sat Jun 24 11:53:32 2017 +0800
+++ b/libtomcrypt/src/pk/ecc/ltc_ecc_is_valid_idx.c	Sat Jun 24 17:50:50 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$ */