diff libtomcrypt/src/pk/ecc/ltc_ecc_map.c @ 1511:5916af64acd4 fuzz

merge from main
author Matt Johnston <matt@ucc.asn.au>
date Sat, 17 Feb 2018 19:29:51 +0800
parents 6dba84798cd5
children
line wrap: on
line diff
--- a/libtomcrypt/src/pk/ecc/ltc_ecc_map.c	Tue Jan 23 23:27:40 2018 +0800
+++ b/libtomcrypt/src/pk/ecc/ltc_ecc_map.c	Sat Feb 17 19:29:51 2018 +0800
@@ -5,8 +5,6 @@
  *
  * The library is free for all purposes without any express
  * guarantee it works.
- *
- * Tom St Denis, [email protected], http://libtom.org
  */
 
 /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b
@@ -19,7 +17,7 @@
 /**
   @file ltc_ecc_map.c
   ECC Crypto, Tom St Denis
-*/  
+*/
 
 #ifdef LTC_MECC
 
@@ -40,7 +38,7 @@
    LTC_ARGCHK(mp      != NULL);
 
    if ((err = mp_init_multi(&t1, &t2, NULL)) != CRYPT_OK) {
-      return CRYPT_MEM;
+      return err;
    }
 
    /* first map z back to normal */
@@ -48,7 +46,7 @@
 
    /* get 1/z */
    if ((err = mp_invmod(P->z, modulus, t1)) != CRYPT_OK)                      { goto done; }
- 
+
    /* get 1/z^2 and 1/z^3 */
    if ((err = mp_sqr(t1, t2)) != CRYPT_OK)                                    { goto done; }
    if ((err = mp_mod(t2, modulus, t2)) != CRYPT_OK)                           { goto done; }
@@ -70,7 +68,7 @@
 
 #endif
 
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref:         $Format:%D$ */
+/* git commit:  $Format:%H$ */
+/* commit time: $Format:%ai$ */