Debian Codegraph @

mpi/ec-internal.h

raw
1 /* ec-internal.h - Internal declarations of ec*.c
2 * Copyright (C) 2013 g10 Code GmbH
3 *
4 * This file is part of Libgcrypt.
5 *
6 * Libgcrypt is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2.1 of
9 * the License, or (at your option) any later version.
10 *
11 * Libgcrypt is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef GCRY_EC_INTERNAL_H
21 #define GCRY_EC_INTERNAL_H
22
23 #include <config.h>
24
25 void _gcry_mpi_ec_ed25519_mod (gcry_mpi_t a);
26
27 #ifndef ASM_DISABLED
28 void _gcry_mpi_ec_nist192_mod (gcry_mpi_t w, mpi_ec_t ctx);
29 void _gcry_mpi_ec_nist224_mod (gcry_mpi_t w, mpi_ec_t ctx);
30 void _gcry_mpi_ec_nist256_mod (gcry_mpi_t w, mpi_ec_t ctx);
31 void _gcry_mpi_ec_nist384_mod (gcry_mpi_t w, mpi_ec_t ctx);
32 void _gcry_mpi_ec_nist521_mod (gcry_mpi_t w, mpi_ec_t ctx);
33 #else
34 # define _gcry_mpi_ec_nist192_mod NULL
35 # define _gcry_mpi_ec_nist224_mod NULL
36 # define _gcry_mpi_ec_nist256_mod NULL
37 # define _gcry_mpi_ec_nist384_mod NULL
38 # define _gcry_mpi_ec_nist521_mod NULL
39 #endif
40
41 #ifdef HAVE_GCC_INLINE_ASM_S390X
42 int _gcry_s390x_ec_hw_mul_point (mpi_point_t result, gcry_mpi_t scalar,
43 mpi_point_t point, mpi_ec_t ctx);
44 # define mpi_ec_hw_mul_point _gcry_s390x_ec_hw_mul_point
45 #else
46 # define mpi_ec_hw_mul_point(r,s,p,c) (-1)
47 #endif
48
49 #endif /*GCRY_EC_INTERNAL_H*/