1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner.
6 * The library is free for all purposes without any express
10 /* Implements ECC over Z/pZ for curve y^2 = x^3 - 3x + b
12 * All curves taken from NIST recommendation paper of July 1999
13 * Available at http://csrc.nist.gov/cryptval/dss.htm
18 @file ltc_ecc_points.c
19 ECC Crypto, Tom St Denis
25 Allocate a new ECC point
26 @return A newly allocated point or NULL on error
28 ecc_point *ltc_ecc_new_point(void)
31 p = XCALLOC(1, sizeof(*p));
35 if (mp_init_multi(&p->x, &p->y, &p->z, NULL) != CRYPT_OK) {
42 /** Free an ECC point from memory
43 @param p The point to free
45 void ltc_ecc_del_point(ecc_point *p)
47 /* prevents free'ing null arguments */
49 mp_clear_multi(p->x, p->y, p->z, NULL); /* note: p->z may be NULL but that's ok with this function anyways */
55 /* ref: $Format:%D$ */
56 /* git commit: $Format:%H$ */
57 /* commit time: $Format:%ai$ */