diff options
author | Niels Möller <nisse@lysator.liu.se> | 2013-02-15 11:01:13 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2013-02-15 11:01:13 +0100 |
commit | 3e33071e4a7070aae5a6017cc9b37dada064a531 (patch) | |
tree | f676f4670d82ad9dcc61fe94d23a7eee070b1773 /ecc-size.c | |
parent | a3dd891c7673f787e73aa19ae3ac99f25349c20e (diff) | |
download | nettle-3e33071e4a7070aae5a6017cc9b37dada064a531.tar.gz |
Integrate ecc_mul_g.
Diffstat (limited to 'ecc-size.c')
-rw-r--r-- | ecc-size.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/ecc-size.c b/ecc-size.c new file mode 100644 index 00000000..c829d460 --- /dev/null +++ b/ecc-size.c @@ -0,0 +1,48 @@ +/* ecc-size.c */ + +/* nettle, low-level cryptographics library + * + * Copyright (C) 2013 Niels Möller + * + * The nettle library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * The nettle library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with the nettle library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02111-1301, USA. + */ + +/* Development of Nettle's ECC support was funded by Internetfonden. */ + +#if HAVE_CONFIG_H +# include "config.h" +#endif + +#include "ecc.h" +#include "ecc-internal.h" + +mp_size_t +ecc_size (const struct ecc_curve *ecc) +{ + return ecc->size; +} + +mp_size_t +ecc_size_a (const struct ecc_curve *ecc) +{ + return 2*ecc->size; +} + +mp_size_t +ecc_size_j (const struct ecc_curve *ecc) +{ + return 3*ecc->size; +} |