Commit 2dfae9f3 authored by Niels Möller's avatar Niels Möller

ecc_point_get: Allow NULL x or y.

parent c8c37f89
2013-04-04 Niels Möller <nisse@lysator.liu.se>
* ecc-point.c (ecc_point_get): Allow NULL x or y, ignore
corresponding coordinate.
* nettle.texinfo (Elliptic curves): Document high-level ECDSA
support.
......
......@@ -84,6 +84,8 @@ void
ecc_point_get (const struct ecc_point *p, mpz_t x, mpz_t y)
{
mp_size_t size = p->ecc->size;
mpz_set_n (x, p->p, size);
mpz_set_n (y, p->p + size, size);
if (x)
mpz_set_n (x, p->p, size);
if (y)
mpz_set_n (y, p->p + size, size);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment