Commit 4b252732 authored by Niels Möller's avatar Niels Möller

New function ecc_bit_size.

parent f508b1fe
2014-01-30 Niels Möller <nisse@lysator.liu.se>
* ecc-size.c (ecc_bit_size): New function.
2014-01-27 Niels Möller <nisse@lysator.liu.se>
* eax.h (struct eax_key, struct eax_ctx): Use union
......
......@@ -29,6 +29,12 @@
#include "ecc.h"
#include "ecc-internal.h"
unsigned
ecc_bit_size (const struct ecc_curve *ecc)
{
return ecc->bit_size;
}
mp_size_t
ecc_size (const struct ecc_curve *ecc)
{
......
......@@ -46,6 +46,7 @@ extern "C" {
#define ecc_scalar_get nettle_ecc_scalar_get
#define ecc_scalar_random nettle_ecc_scalar_random
#define ecc_point_mul nettle_ecc_point_mul
#define ecc_bit_size nettle_ecc_bit_size
#define ecc_size nettle_ecc_size
#define ecc_size_a nettle_ecc_size_a
#define ecc_size_j nettle_ecc_size_j
......@@ -139,7 +140,9 @@ ecc_point_mul_g (struct ecc_point *r, const struct ecc_scalar *n);
support infinity as an input or output.
*/
/* FIXME: Also provided some compile time constants? */
/* Returns the bit size of a single coordinate (and of the prime p). */
unsigned
ecc_bit_size (const struct ecc_curve *ecc);
/* Returns the size of a single coordinate. */
mp_size_t
......
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