3 Compile time constant (but machine dependent) tables.
5 Copyright (C) 2013, 2014 Niels Möller
7 This file is part of GNU Nettle.
9 GNU Nettle is free software: you can redistribute it and/or
10 modify it under the terms of either:
12 * the GNU Lesser General Public License as published by the Free
13 Software Foundation; either version 3 of the License, or (at your
14 option) any later version.
18 * the GNU General Public License as published by the Free
19 Software Foundation; either version 2 of the License, or (at your
20 option) any later version.
22 or both in parallel, as here.
24 GNU Nettle is distributed in the hope that it will be useful,
25 but WITHOUT ANY WARRANTY; without even the implied warranty of
26 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 General Public License for more details.
29 You should have received copies of the GNU General Public License and
30 the GNU Lesser General Public License along with this program. If
31 not, see http://www.gnu.org/licenses/.
34 /* Development of Nettle's ECC support was funded by the .SE Internet Fund. */
41 #include "ecc-internal.h"
43 #if HAVE_NATIVE_ecc_224_modp
46 #define ecc_224_modp nettle_ecc_224_modp
48 ecc_224_modp (const struct ecc_modulo *m, mp_limb_t *rp);
51 #define USE_REDC (ECC_REDC_SIZE != 0)
52 #define ecc_224_modp ecc_mod
58 # define ecc_224_redc ecc_pm1_redc
59 #elif ECC_REDC_SIZE == 0
60 # define ecc_224_redc NULL
62 # error Configuration error
65 const struct ecc_curve _nettle_secp_224r1 =
72 ECC_MOD_INV_ITCH (ECC_LIMB_SIZE),
82 USE_REDC ? ecc_224_redc : ecc_224_modp,
91 ECC_MOD_INV_ITCH (ECC_LIMB_SIZE),
110 ECC_ADD_JJJ_ITCH (ECC_LIMB_SIZE),
111 ECC_MUL_A_ITCH (ECC_LIMB_SIZE),
112 ECC_MUL_G_ITCH (ECC_LIMB_SIZE),
113 ECC_J_TO_A_ITCH (ECC_LIMB_SIZE),
127 const struct ecc_curve *nettle_get_secp_224r1(void)
129 return &_nettle_secp_224r1;