summaryrefslogtreecommitdiff
path: root/libtomcrypt/src/pk/ecc/ltc_ecc_map.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtomcrypt/src/pk/ecc/ltc_ecc_map.c')
-rw-r--r--libtomcrypt/src/pk/ecc/ltc_ecc_map.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/libtomcrypt/src/pk/ecc/ltc_ecc_map.c b/libtomcrypt/src/pk/ecc/ltc_ecc_map.c
index 4f3ec09..c745f29 100644
--- a/libtomcrypt/src/pk/ecc/ltc_ecc_map.c
+++ b/libtomcrypt/src/pk/ecc/ltc_ecc_map.c
@@ -5,8 +5,6 @@
*
* The library is free for all purposes without any express
* guarantee it works.
- *
- * Tom St Denis, tomstdenis@gmail.com, 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 @@ int ltc_ecc_map(ecc_point *P, void *modulus, void *mp)
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 @@ int ltc_ecc_map(ecc_point *P, void *modulus, void *mp)
/* 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 @@ done:
#endif
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref: $Format:%D$ */
+/* git commit: $Format:%H$ */
+/* commit time: $Format:%ai$ */