Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brian Smith
nettle
Commits
4b252732
Commit
4b252732
authored
Jan 30, 2014
by
Niels Möller
Browse files
New function ecc_bit_size.
parent
f508b1fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
4b252732
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
...
...
ecc-size.c
View file @
4b252732
...
...
@@ -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
)
{
...
...
ecc.h
View file @
4b252732
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment