Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 1 | /** |
Janos Follath | 47d28f0 | 2016-11-01 13:22:05 +0000 | [diff] [blame] | 2 | * \file ecp_internal.h |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 3 | * |
Janos Follath | 372697b | 2016-10-28 16:53:11 +0100 | [diff] [blame] | 4 | * \brief Function declarations for alternative implementation of elliptic curve |
| 5 | * point arithmetic. |
Darryl Green | a40a101 | 2018-01-05 15:33:17 +0000 | [diff] [blame] | 6 | */ |
| 7 | /* |
Bence Szépkúti | a2947ac | 2020-08-19 16:37:36 +0200 | [diff] [blame] | 8 | * Copyright The Mbed TLS Contributors |
Bence Szépkúti | f744bd7 | 2020-06-05 13:02:18 +0200 | [diff] [blame] | 9 | * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
| 10 | * |
| 11 | * This file is provided under the Apache License 2.0, or the |
| 12 | * GNU General Public License v2.0 or later. |
| 13 | * |
| 14 | * ********** |
| 15 | * Apache License 2.0: |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 16 | * |
| 17 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 18 | * not use this file except in compliance with the License. |
| 19 | * You may obtain a copy of the License at |
| 20 | * |
| 21 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 22 | * |
| 23 | * Unless required by applicable law or agreed to in writing, software |
| 24 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 25 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 26 | * See the License for the specific language governing permissions and |
| 27 | * limitations under the License. |
| 28 | * |
Bence Szépkúti | f744bd7 | 2020-06-05 13:02:18 +0200 | [diff] [blame] | 29 | * ********** |
| 30 | * |
| 31 | * ********** |
| 32 | * GNU General Public License v2.0 or later: |
| 33 | * |
| 34 | * This program is free software; you can redistribute it and/or modify |
| 35 | * it under the terms of the GNU General Public License as published by |
| 36 | * the Free Software Foundation; either version 2 of the License, or |
| 37 | * (at your option) any later version. |
| 38 | * |
| 39 | * This program is distributed in the hope that it will be useful, |
| 40 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 41 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 42 | * GNU General Public License for more details. |
| 43 | * |
| 44 | * You should have received a copy of the GNU General Public License along |
| 45 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 46 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 47 | * |
| 48 | * ********** |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 49 | */ |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 50 | |
| 51 | /* |
| 52 | * References: |
| 53 | * |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 54 | * [1] BERNSTEIN, Daniel J. Curve25519: new Diffie-Hellman speed records. |
| 55 | * <http://cr.yp.to/ecdh/curve25519-20060209.pdf> |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 56 | * |
| 57 | * [2] CORON, Jean-S'ebastien. Resistance against differential power analysis |
| 58 | * for elliptic curve cryptosystems. In : Cryptographic Hardware and |
| 59 | * Embedded Systems. Springer Berlin Heidelberg, 1999. p. 292-302. |
| 60 | * <http://link.springer.com/chapter/10.1007/3-540-48059-5_25> |
| 61 | * |
| 62 | * [3] HEDABOU, Mustapha, PINEL, Pierre, et B'EN'ETEAU, Lucien. A comb method to |
| 63 | * render ECC resistant against Side Channel Attacks. IACR Cryptology |
| 64 | * ePrint Archive, 2004, vol. 2004, p. 342. |
| 65 | * <http://eprint.iacr.org/2004/342.pdf> |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 66 | * |
| 67 | * [4] Certicom Research. SEC 2: Recommended Elliptic Curve Domain Parameters. |
| 68 | * <http://www.secg.org/sec2-v2.pdf> |
| 69 | * |
| 70 | * [5] HANKERSON, Darrel, MENEZES, Alfred J., VANSTONE, Scott. Guide to Elliptic |
| 71 | * Curve Cryptography. |
| 72 | * |
| 73 | * [6] Digital Signature Standard (DSS), FIPS 186-4. |
| 74 | * <http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf> |
| 75 | * |
Darryl Green | 11999bb | 2018-03-13 15:22:58 +0000 | [diff] [blame] | 76 | * [7] Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 77 | * Security (TLS), RFC 4492. |
| 78 | * <https://tools.ietf.org/search/rfc4492> |
| 79 | * |
| 80 | * [8] <http://www.hyperelliptic.org/EFD/g1p/auto-shortw-jacobian.html> |
| 81 | * |
| 82 | * [9] COHEN, Henri. A Course in Computational Algebraic Number Theory. |
| 83 | * Springer Science & Business Media, 1 Aug 2000 |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 84 | */ |
| 85 | |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 86 | #ifndef MBEDTLS_ECP_INTERNAL_H |
| 87 | #define MBEDTLS_ECP_INTERNAL_H |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 88 | |
Ron Eldor | 8b0cf2e | 2018-02-14 16:02:41 +0200 | [diff] [blame] | 89 | #if !defined(MBEDTLS_CONFIG_FILE) |
| 90 | #include "config.h" |
| 91 | #else |
| 92 | #include MBEDTLS_CONFIG_FILE |
| 93 | #endif |
| 94 | |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 95 | #if defined(MBEDTLS_ECP_INTERNAL_ALT) |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 96 | |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 97 | /** |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 98 | * \brief Indicate if the Elliptic Curve Point module extension can |
| 99 | * handle the group. |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 100 | * |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 101 | * \param grp The pointer to the elliptic curve group that will be the |
| 102 | * basis of the cryptographic computations. |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 103 | * |
| 104 | * \return Non-zero if successful. |
| 105 | */ |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 106 | unsigned char mbedtls_internal_ecp_grp_capable( const mbedtls_ecp_group *grp ); |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 107 | |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 108 | /** |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 109 | * \brief Initialise the Elliptic Curve Point module extension. |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 110 | * |
| 111 | * If mbedtls_internal_ecp_grp_capable returns true for a |
| 112 | * group, this function has to be able to initialise the |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 113 | * module for it. |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 114 | * |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 115 | * This module can be a driver to a crypto hardware |
| 116 | * accelerator, for which this could be an initialise function. |
| 117 | * |
| 118 | * \param grp The pointer to the group the module needs to be |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 119 | * initialised for. |
| 120 | * |
| 121 | * \return 0 if successful. |
| 122 | */ |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 123 | int mbedtls_internal_ecp_init( const mbedtls_ecp_group *grp ); |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 124 | |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 125 | /** |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 126 | * \brief Frees and deallocates the Elliptic Curve Point module |
| 127 | * extension. |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 128 | * |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 129 | * \param grp The pointer to the group the module was initialised for. |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 130 | */ |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 131 | void mbedtls_internal_ecp_free( const mbedtls_ecp_group *grp ); |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 132 | |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 133 | #if defined(ECP_SHORTWEIERSTRASS) |
| 134 | |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 135 | #if defined(MBEDTLS_ECP_RANDOMIZE_JAC_ALT) |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 136 | /** |
| 137 | * \brief Randomize jacobian coordinates: |
| 138 | * (X, Y, Z) -> (l^2 X, l^3 Y, l Z) for random l. |
| 139 | * |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 140 | * \param grp Pointer to the group representing the curve. |
| 141 | * |
| 142 | * \param pt The point on the curve to be randomised, given with Jacobian |
| 143 | * coordinates. |
| 144 | * |
| 145 | * \param f_rng A function pointer to the random number generator. |
| 146 | * |
| 147 | * \param p_rng A pointer to the random number generator state. |
| 148 | * |
| 149 | * \return 0 if successful. |
| 150 | */ |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 151 | int mbedtls_internal_ecp_randomize_jac( const mbedtls_ecp_group *grp, |
Janos Follath | b8a90fb | 2016-11-15 13:45:01 +0000 | [diff] [blame] | 152 | mbedtls_ecp_point *pt, int (*f_rng)(void *, unsigned char *, size_t), |
| 153 | void *p_rng ); |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 154 | #endif |
| 155 | |
| 156 | #if defined(MBEDTLS_ECP_ADD_MIXED_ALT) |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 157 | /** |
| 158 | * \brief Addition: R = P + Q, mixed affine-Jacobian coordinates. |
| 159 | * |
| 160 | * The coordinates of Q must be normalized (= affine), |
| 161 | * but those of P don't need to. R is not normalized. |
| 162 | * |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 163 | * This function is used only as a subrutine of |
| 164 | * ecp_mul_comb(). |
| 165 | * |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 166 | * Special cases: (1) P or Q is zero, (2) R is zero, |
| 167 | * (3) P == Q. |
| 168 | * None of these cases can happen as intermediate step in |
| 169 | * ecp_mul_comb(): |
| 170 | * - at each step, P, Q and R are multiples of the base |
| 171 | * point, the factor being less than its order, so none of |
| 172 | * them is zero; |
| 173 | * - Q is an odd multiple of the base point, P an even |
| 174 | * multiple, due to the choice of precomputed points in the |
| 175 | * modified comb method. |
| 176 | * So branches for these cases do not leak secret information. |
| 177 | * |
| 178 | * We accept Q->Z being unset (saving memory in tables) as |
| 179 | * meaning 1. |
| 180 | * |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 181 | * Cost in field operations if done by [5] 3.22: |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 182 | * 1A := 8M + 3S |
| 183 | * |
| 184 | * \param grp Pointer to the group representing the curve. |
| 185 | * |
| 186 | * \param R Pointer to a point structure to hold the result. |
| 187 | * |
| 188 | * \param P Pointer to the first summand, given with Jacobian |
| 189 | * coordinates |
| 190 | * |
| 191 | * \param Q Pointer to the second summand, given with affine |
| 192 | * coordinates. |
| 193 | * |
| 194 | * \return 0 if successful. |
| 195 | */ |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 196 | int mbedtls_internal_ecp_add_mixed( const mbedtls_ecp_group *grp, |
Janos Follath | b8a90fb | 2016-11-15 13:45:01 +0000 | [diff] [blame] | 197 | mbedtls_ecp_point *R, const mbedtls_ecp_point *P, |
| 198 | const mbedtls_ecp_point *Q ); |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 199 | #endif |
| 200 | |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 201 | /** |
| 202 | * \brief Point doubling R = 2 P, Jacobian coordinates. |
| 203 | * |
| 204 | * Cost: 1D := 3M + 4S (A == 0) |
| 205 | * 4M + 4S (A == -3) |
| 206 | * 3M + 6S + 1a otherwise |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 207 | * when the implementation is based on the "dbl-1998-cmo-2" |
| 208 | * doubling formulas in [8] and standard optimizations are |
| 209 | * applied when curve parameter A is one of { 0, -3 }. |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 210 | * |
| 211 | * \param grp Pointer to the group representing the curve. |
| 212 | * |
| 213 | * \param R Pointer to a point structure to hold the result. |
| 214 | * |
| 215 | * \param P Pointer to the point that has to be doubled, given with |
| 216 | * Jacobian coordinates. |
| 217 | * |
| 218 | * \return 0 if successful. |
| 219 | */ |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 220 | #if defined(MBEDTLS_ECP_DOUBLE_JAC_ALT) |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 221 | int mbedtls_internal_ecp_double_jac( const mbedtls_ecp_group *grp, |
Janos Follath | b8a90fb | 2016-11-15 13:45:01 +0000 | [diff] [blame] | 222 | mbedtls_ecp_point *R, const mbedtls_ecp_point *P ); |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 223 | #endif |
| 224 | |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 225 | /** |
| 226 | * \brief Normalize jacobian coordinates of an array of (pointers to) |
| 227 | * points. |
| 228 | * |
| 229 | * Using Montgomery's trick to perform only one inversion mod P |
| 230 | * the cost is: |
| 231 | * 1N(t) := 1I + (6t - 3)M + 1S |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 232 | * (See for example Algorithm 10.3.4. in [9]) |
| 233 | * |
| 234 | * This function is used only as a subrutine of |
| 235 | * ecp_mul_comb(). |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 236 | * |
| 237 | * Warning: fails (returning an error) if one of the points is |
| 238 | * zero! |
| 239 | * This should never happen, see choice of w in ecp_mul_comb(). |
| 240 | * |
| 241 | * \param grp Pointer to the group representing the curve. |
| 242 | * |
| 243 | * \param T Array of pointers to the points to normalise. |
| 244 | * |
| 245 | * \param t_len Number of elements in the array. |
| 246 | * |
| 247 | * \return 0 if successful, |
| 248 | * an error if one of the points is zero. |
| 249 | */ |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 250 | #if defined(MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT) |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 251 | int mbedtls_internal_ecp_normalize_jac_many( const mbedtls_ecp_group *grp, |
Janos Follath | b8a90fb | 2016-11-15 13:45:01 +0000 | [diff] [blame] | 252 | mbedtls_ecp_point *T[], size_t t_len ); |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 253 | #endif |
| 254 | |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 255 | /** |
| 256 | * \brief Normalize jacobian coordinates so that Z == 0 || Z == 1. |
| 257 | * |
Janos Follath | 5634b86 | 2016-12-08 16:15:51 +0000 | [diff] [blame] | 258 | * Cost in field operations if done by [5] 3.2.1: |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 259 | * 1N := 1I + 3M + 1S |
| 260 | * |
| 261 | * \param grp Pointer to the group representing the curve. |
| 262 | * |
| 263 | * \param pt pointer to the point to be normalised. This is an |
| 264 | * input/output parameter. |
| 265 | * |
| 266 | * \return 0 if successful. |
| 267 | */ |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 268 | #if defined(MBEDTLS_ECP_NORMALIZE_JAC_ALT) |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 269 | int mbedtls_internal_ecp_normalize_jac( const mbedtls_ecp_group *grp, |
Janos Follath | b8a90fb | 2016-11-15 13:45:01 +0000 | [diff] [blame] | 270 | mbedtls_ecp_point *pt ); |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 271 | #endif |
| 272 | |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 273 | #endif /* ECP_SHORTWEIERSTRASS */ |
| 274 | |
| 275 | #if defined(ECP_MONTGOMERY) |
| 276 | |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 277 | #if defined(MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT) |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 278 | int mbedtls_internal_ecp_double_add_mxz( const mbedtls_ecp_group *grp, |
Janos Follath | b8a90fb | 2016-11-15 13:45:01 +0000 | [diff] [blame] | 279 | mbedtls_ecp_point *R, mbedtls_ecp_point *S, const mbedtls_ecp_point *P, |
| 280 | const mbedtls_ecp_point *Q, const mbedtls_mpi *d ); |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 281 | #endif |
| 282 | |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 283 | /** |
| 284 | * \brief Randomize projective x/z coordinates: |
| 285 | * (X, Z) -> (l X, l Z) for random l |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 286 | * |
| 287 | * \param grp pointer to the group representing the curve |
| 288 | * |
| 289 | * \param P the point on the curve to be randomised given with |
| 290 | * projective coordinates. This is an input/output parameter. |
| 291 | * |
| 292 | * \param f_rng a function pointer to the random number generator |
| 293 | * |
| 294 | * \param p_rng a pointer to the random number generator state |
| 295 | * |
| 296 | * \return 0 if successful |
| 297 | */ |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 298 | #if defined(MBEDTLS_ECP_RANDOMIZE_MXZ_ALT) |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 299 | int mbedtls_internal_ecp_randomize_mxz( const mbedtls_ecp_group *grp, |
Janos Follath | b8a90fb | 2016-11-15 13:45:01 +0000 | [diff] [blame] | 300 | mbedtls_ecp_point *P, int (*f_rng)(void *, unsigned char *, size_t), |
| 301 | void *p_rng ); |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 302 | #endif |
| 303 | |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 304 | /** |
| 305 | * \brief Normalize Montgomery x/z coordinates: X = X/Z, Z = 1. |
| 306 | * |
| 307 | * \param grp pointer to the group representing the curve |
| 308 | * |
| 309 | * \param P pointer to the point to be normalised. This is an |
| 310 | * input/output parameter. |
| 311 | * |
| 312 | * \return 0 if successful |
| 313 | */ |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 314 | #if defined(MBEDTLS_ECP_NORMALIZE_MXZ_ALT) |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 315 | int mbedtls_internal_ecp_normalize_mxz( const mbedtls_ecp_group *grp, |
Janos Follath | b8a90fb | 2016-11-15 13:45:01 +0000 | [diff] [blame] | 316 | mbedtls_ecp_point *P ); |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 317 | #endif |
| 318 | |
Janos Follath | aab9efb | 2016-12-02 13:49:21 +0000 | [diff] [blame] | 319 | #endif /* ECP_MONTGOMERY */ |
| 320 | |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 321 | #endif /* MBEDTLS_ECP_INTERNAL_ALT */ |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 322 | |
Janos Follath | c44ab97 | 2016-11-18 16:38:23 +0000 | [diff] [blame] | 323 | #endif /* ecp_internal.h */ |
Janos Follath | b069753 | 2016-08-18 12:38:46 +0100 | [diff] [blame] | 324 | |