RetroArch
ecp_internal.h
Go to the documentation of this file.
1 
25 /*
26  * References:
27  *
28  * [1] BERNSTEIN, Daniel J. Curve25519: new Diffie-Hellman speed records.
29  * <http://cr.yp.to/ecdh/curve25519-20060209.pdf>
30  *
31  * [2] CORON, Jean-S'ebastien. Resistance against differential power analysis
32  * for elliptic curve cryptosystems. In : Cryptographic Hardware and
33  * Embedded Systems. Springer Berlin Heidelberg, 1999. p. 292-302.
34  * <http://link.springer.com/chapter/10.1007/3-540-48059-5_25>
35  *
36  * [3] HEDABOU, Mustapha, PINEL, Pierre, et B'EN'ETEAU, Lucien. A comb method to
37  * render ECC resistant against Side Channel Attacks. IACR Cryptology
38  * ePrint Archive, 2004, vol. 2004, p. 342.
39  * <http://eprint.iacr.org/2004/342.pdf>
40  *
41  * [4] Certicom Research. SEC 2: Recommended Elliptic Curve Domain Parameters.
42  * <http://www.secg.org/sec2-v2.pdf>
43  *
44  * [5] HANKERSON, Darrel, MENEZES, Alfred J., VANSTONE, Scott. Guide to Elliptic
45  * Curve Cryptography.
46  *
47  * [6] Digital Signature Standard (DSS), FIPS 186-4.
48  * <http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf>
49  *
50  * [7] Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer
51  * Security (TLS), RFC 4492.
52  * <https://tools.ietf.org/search/rfc4492>
53  *
54  * [8] <http://www.hyperelliptic.org/EFD/g1p/auto-shortw-jacobian.html>
55  *
56  * [9] COHEN, Henri. A Course in Computational Algebraic Number Theory.
57  * Springer Science & Business Media, 1 Aug 2000
58  */
59 
60 #ifndef MBEDTLS_ECP_INTERNAL_H
61 #define MBEDTLS_ECP_INTERNAL_H
62 
63 #if defined(MBEDTLS_ECP_INTERNAL_ALT)
64 
74 unsigned char mbedtls_internal_ecp_grp_capable( const mbedtls_ecp_group *grp );
75 
91 int mbedtls_internal_ecp_init( const mbedtls_ecp_group *grp );
92 
99 void mbedtls_internal_ecp_free( const mbedtls_ecp_group *grp );
100 
101 #if defined(ECP_SHORTWEIERSTRASS)
102 
103 #if defined(MBEDTLS_ECP_RANDOMIZE_JAC_ALT)
104 
119 int mbedtls_internal_ecp_randomize_jac( const mbedtls_ecp_group *grp,
120  mbedtls_ecp_point *pt, int (*f_rng)(void *, unsigned char *, size_t),
121  void *p_rng );
122 #endif
123 
124 #if defined(MBEDTLS_ECP_ADD_MIXED_ALT)
125 
164 int mbedtls_internal_ecp_add_mixed( const mbedtls_ecp_group *grp,
166  const mbedtls_ecp_point *Q );
167 #endif
168 
188 #if defined(MBEDTLS_ECP_DOUBLE_JAC_ALT)
189 int mbedtls_internal_ecp_double_jac( const mbedtls_ecp_group *grp,
191 #endif
192 
218 #if defined(MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT)
219 int mbedtls_internal_ecp_normalize_jac_many( const mbedtls_ecp_group *grp,
220  mbedtls_ecp_point *T[], size_t t_len );
221 #endif
222 
236 #if defined(MBEDTLS_ECP_NORMALIZE_JAC_ALT)
237 int mbedtls_internal_ecp_normalize_jac( const mbedtls_ecp_group *grp,
239 #endif
240 
241 #endif /* ECP_SHORTWEIERSTRASS */
242 
243 #if defined(ECP_MONTGOMERY)
244 
245 #if defined(MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT)
246 int mbedtls_internal_ecp_double_add_mxz( const mbedtls_ecp_group *grp,
248  const mbedtls_ecp_point *Q, const mbedtls_mpi *d );
249 #endif
250 
266 #if defined(MBEDTLS_ECP_RANDOMIZE_MXZ_ALT)
267 int mbedtls_internal_ecp_randomize_mxz( const mbedtls_ecp_group *grp,
268  mbedtls_ecp_point *P, int (*f_rng)(void *, unsigned char *, size_t),
269  void *p_rng );
270 #endif
271 
282 #if defined(MBEDTLS_ECP_NORMALIZE_MXZ_ALT)
283 int mbedtls_internal_ecp_normalize_mxz( const mbedtls_ecp_group *grp,
284  mbedtls_ecp_point *P );
285 #endif
286 
287 #endif /* ECP_MONTGOMERY */
288 
289 #endif /* MBEDTLS_ECP_INTERNAL_ALT */
290 
291 #endif /* ecp_internal.h */
292 
static const unsigned char pt[MAX_TESTS][64]
Definition: gcm.c:573
ECP group structure.
Definition: ecp.h:138
#define T(x)
#define P(a, b, c, d, k, s, t)
#define R(t)
#define S(x)
Definition: luac.c:394
ECP point structure (jacobian coordinates)
Definition: ecp.h:106
MPI structure.
Definition: bignum.h:179