My Project
curve25519.h
Go to the documentation of this file.
1 
42 int wc_curve25519_make_key(WC_RNG* rng, int keysize, curve25519_key* key);
43 
87 int wc_curve25519_shared_secret(curve25519_key* private_key,
88  curve25519_key* public_key,
89  byte* out, word32* outlen);
90 
138 int wc_curve25519_shared_secret_ex(curve25519_key* private_key,
139  curve25519_key* public_key,
140  byte* out, word32* outlen, int endian);
141 
164 int wc_curve25519_init(curve25519_key* key);
165 
184 void wc_curve25519_free(curve25519_key* key);
185 
218 int wc_curve25519_import_private(const byte* priv, word32 privSz,
219  curve25519_key* key);
220 
257 int wc_curve25519_import_private_ex(const byte* priv, word32 privSz,
258  curve25519_key* key, int endian);
259 
303 int wc_curve25519_import_private_raw(const byte* priv, word32 privSz,
304  const byte* pub, word32 pubSz, curve25519_key* key);
305 
350 int wc_curve25519_import_private_raw_ex(const byte* priv, word32 privSz,
351  const byte* pub, word32 pubSz,
352  curve25519_key* key, int endian);
353 
392 int wc_curve25519_export_private_raw(curve25519_key* key, byte* out,
393  word32* outLen);
394 
436 int wc_curve25519_export_private_raw_ex(curve25519_key* key, byte* out,
437  word32* outLen, int endian);
438 
480 int wc_curve25519_import_public(const byte* in, word32 inLen,
481  curve25519_key* key);
482 
526 int wc_curve25519_import_public_ex(const byte* in, word32 inLen,
527  curve25519_key* key, int endian);
528 
562 int wc_curve25519_check_public(const byte* pub, word32 pubSz, int endian);
563 
602 int wc_curve25519_export_public(curve25519_key* key, byte* out, word32* outLen);
603 
645 int wc_curve25519_export_public_ex(curve25519_key* key, byte* out,
646  word32* outLen, int endian);
647 
690 int wc_curve25519_export_key_raw(curve25519_key* key,
691  byte* priv, word32 *privSz,
692  byte* pub, word32 *pubSz);
693 
740 int wc_curve25519_export_key_raw_ex(curve25519_key* key,
741  byte* priv, word32 *privSz,
742  byte* pub, word32 *pubSz,
743  int endian);
744 
771 int wc_curve25519_size(curve25519_key* key);
int wc_curve25519_size(curve25519_key *key)
This function returns the key size of the given key structure.
int wc_curve25519_import_private_ex(const byte *priv, word32 privSz, curve25519_key *key, int endian)
curve25519 private key import only. (Big or Little endian).
int wc_curve25519_import_private_raw(const byte *priv, word32 privSz, const byte *pub, word32 pubSz, curve25519_key *key)
This function imports a public-private key pair into a curve25519_key structure. Big endian only.
int wc_curve25519_export_key_raw_ex(curve25519_key *key, byte *priv, word32 *privSz, byte *pub, word32 *pubSz, int endian)
Export curve25519 key pair. Big or little endian.
int wc_curve25519_shared_secret_ex(curve25519_key *private_key, curve25519_key *public_key, byte *out, word32 *outlen, int endian)
This function computes a shared secret key given a secret private key and a received public key....
int wc_curve25519_export_private_raw_ex(curve25519_key *key, byte *out, word32 *outLen, int endian)
This function exports a private key from a curve25519_key structure and stores it in the given out bu...
int wc_curve25519_init(curve25519_key *key)
This function initializes a Curve25519 key. It should be called before generating a key for the struc...
void wc_curve25519_free(curve25519_key *key)
This function frees a Curve25519 object.
int wc_curve25519_export_private_raw(curve25519_key *key, byte *out, word32 *outLen)
This function exports a private key from a curve25519_key structure and stores it in the given out bu...
int wc_curve25519_import_private_raw_ex(const byte *priv, word32 privSz, const byte *pub, word32 pubSz, curve25519_key *key, int endian)
This function imports a public-private key pair into a curve25519_key structure. Supports both big an...
int wc_curve25519_check_public(const byte *pub, word32 pubSz, int endian)
This function checks that a public key buffer holds a valid Curve25519 key value given the endian ord...
int wc_curve25519_shared_secret(curve25519_key *private_key, curve25519_key *public_key, byte *out, word32 *outlen)
This function computes a shared secret key given a secret private key and a received public key....
int wc_curve25519_export_public_ex(curve25519_key *key, byte *out, word32 *outLen, int endian)
This function exports a public key from the given key structure and stores the result in the out buff...
int wc_curve25519_export_public(curve25519_key *key, byte *out, word32 *outLen)
This function exports a public key from the given key structure and stores the result in the out buff...
int wc_curve25519_import_public_ex(const byte *in, word32 inLen, curve25519_key *key, int endian)
This function imports a public key from the given in buffer and stores it in the curve25519_key struc...
int wc_curve25519_export_key_raw(curve25519_key *key, byte *priv, word32 *privSz, byte *pub, word32 *pubSz)
Export Curve25519 key pair. Big endian only.
int wc_curve25519_import_private(const byte *priv, word32 privSz, curve25519_key *key)
This function imports a curve25519 private key only. (Big endian).
int wc_curve25519_import_public(const byte *in, word32 inLen, curve25519_key *key)
This function imports a public key from the given in buffer and stores it in the curve25519_key struc...
int wc_curve25519_make_key(WC_RNG *rng, int keysize, curve25519_key *key)
This function generates a Curve25519 key using the given random number generator, rng,...