27 #ifndef WOLF_CRYPT_ED448_H 28 #define WOLF_CRYPT_ED448_H 34 #include <wolfssl/wolfcrypt/fe_448.h> 35 #include <wolfssl/wolfcrypt/ge_448.h> 37 #include <wolfssl/wolfcrypt/sha3.h> 39 #ifdef WOLFSSL_ASYNC_CRYPT 40 #include <wolfssl/wolfcrypt/async.h> 58 #define ED448_KEY_SIZE 57 59 #define ED448_SIG_SIZE 114 61 #define ED448_PUB_KEY_SIZE 57 63 #define ED448_PRV_KEY_SIZE (ED448_PUB_KEY_SIZE+ED448_KEY_SIZE) 71 #ifndef WC_ED448KEY_TYPE_DEFINED 73 #define WC_ED448KEY_TYPE_DEFINED 78 byte p[ED448_PUB_KEY_SIZE];
79 byte k[ED448_PRV_KEY_SIZE];
80 #ifdef FREESCALE_LTC_ECC 82 byte pointX[ED448_KEY_SIZE];
83 byte pointY[ED448_KEY_SIZE];
86 #ifdef WOLFSSL_ASYNC_CRYPT 87 WC_ASYNC_DEV asyncDev;
93 int wc_ed448_make_public(
ed448_key* key,
unsigned char* pubKey,
98 int wc_ed448_sign_msg(
const byte* in, word32 inLen, byte* out, word32 *outLen,
99 ed448_key* key,
const byte* context, byte contextLen);
101 int wc_ed448ph_sign_hash(
const byte* hash, word32 hashLen, byte* out,
103 const byte* context, byte contextLen);
105 int wc_ed448ph_sign_msg(
const byte* in, word32 inLen, byte* out,
106 word32 *outLen,
ed448_key* key,
const byte* context,
109 int wc_ed448_verify_msg(
const byte* sig, word32 sigLen,
const byte* msg,
110 word32 msgLen,
int* stat,
ed448_key* key,
111 const byte* context, byte contextLen);
113 int wc_ed448ph_verify_hash(
const byte* sig, word32 sigLen,
const byte* hash,
114 word32 hashLen,
int* stat,
ed448_key* key,
115 const byte* context, byte contextLen);
117 int wc_ed448ph_verify_msg(
const byte* sig, word32 sigLen,
const byte* msg,
118 word32 msgLen,
int* stat,
ed448_key* key,
119 const byte* context, byte contextLen);
125 int wc_ed448_import_public(
const byte* in, word32 inLen,
ed448_key* key);
127 int wc_ed448_import_private_only(
const byte* priv, word32 privSz,
130 int wc_ed448_import_private_key(
const byte* priv, word32 privSz,
131 const byte* pub, word32 pubSz,
ed448_key* key);
133 int wc_ed448_export_public(
ed448_key*, byte* out, word32* outLen);
135 int wc_ed448_export_private_only(
ed448_key* key, byte* out, word32* outLen);
137 int wc_ed448_export_private(
ed448_key* key, byte* out, word32* outLen);
139 int wc_ed448_export_key(
ed448_key* key, byte* priv, word32 *privSz,
140 byte* pub, word32 *pubSz);