23 #ifndef WOLF_CRYPT_SP_H 24 #define WOLF_CRYPT_SP_H 28 #if defined(WOLFSSL_HAVE_SP_RSA) || defined(WOLFSSL_HAVE_SP_DH) || \ 29 defined(WOLFSSL_HAVE_SP_ECC) 33 #include <wolfssl/wolfcrypt/integer.h> 34 #include <wolfssl/wolfcrypt/sp_int.h> 39 #define SP_NOINLINE __declspec(noinline) 40 #elif defined(__IAR_SYSTEMS_ICC__) || defined(__GNUC__) || defined(__KEIL__) 41 #define SP_NOINLINE __attribute__((noinline)) 51 #ifdef WOLFSSL_HAVE_SP_RSA 53 WOLFSSL_LOCAL
int sp_RsaPublic_2048(
const byte* in, word32 inLen,
55 WOLFSSL_LOCAL
int sp_RsaPrivate_2048(
const byte* in, word32 inLen,
57 mp_int* mm, byte* out, word32* outLen);
59 WOLFSSL_LOCAL
int sp_RsaPublic_3072(
const byte* in, word32 inLen,
61 WOLFSSL_LOCAL
int sp_RsaPrivate_3072(
const byte* in, word32 inLen,
63 mp_int* mm, byte* out, word32* outLen);
65 WOLFSSL_LOCAL
int sp_RsaPublic_4096(
const byte* in, word32 inLen,
67 WOLFSSL_LOCAL
int sp_RsaPrivate_4096(
const byte* in, word32 inLen,
69 mp_int* mm, byte* out, word32* outLen);
73 #if defined(WOLFSSL_HAVE_SP_DH) || defined(WOLFSSL_HAVE_SP_RSA) 88 #ifdef WOLFSSL_HAVE_SP_DH 90 WOLFSSL_LOCAL
int sp_DhExp_2048(
mp_int* base,
const byte* exp, word32 expLen,
91 mp_int* mod, byte* out, word32* outLen);
92 WOLFSSL_LOCAL
int sp_DhExp_3072(
mp_int* base,
const byte* exp, word32 expLen,
93 mp_int* mod, byte* out, word32* outLen);
94 WOLFSSL_LOCAL
int sp_DhExp_4096(
mp_int* base,
const byte* exp, word32 expLen,
95 mp_int* mod, byte* out, word32* outLen);
99 #ifdef WOLFSSL_HAVE_SP_ECC 103 int sp_ecc_mulmod_base_256(
mp_int* km,
ecc_point* rm,
int map,
void* heap);
107 word32* outlen,
void* heap);
108 int sp_ecc_sign_256(
const byte* hash, word32 hashLen,
WC_RNG* rng,
mp_int* priv,
110 int sp_ecc_verify_256(
const byte* hash, word32 hashLen,
mp_int* pX,
mp_int* pY,
120 int sp_ecc_uncompress_256(
mp_int* xm,
int odd,
mp_int* ym);
125 int sp_ecc_mulmod_base_384(
mp_int* km,
ecc_point* rm,
int map,
void* heap);
129 word32* outlen,
void* heap);
130 int sp_ecc_sign_384(
const byte* hash, word32 hashLen,
WC_RNG* rng,
mp_int* priv,
132 int sp_ecc_verify_384(
const byte* hash, word32 hashLen,
mp_int* pX,
mp_int* pY,
142 int sp_ecc_uncompress_384(
mp_int* xm,
int odd,
mp_int* ym);
Definition: integer.h:200