cecies
|
Curve25519 and Curve448 key-pair generators (both export their output into NUL-terminated, hex-encoded strings). More...
#include <time.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
#include "util.h"
#include "types.h"
Go to the source code of this file.
Functions | |
CECIES_API int | cecies_generate_curve25519_keypair (cecies_curve25519_keypair *output, const uint8_t *additional_entropy, size_t additional_entropy_length) |
CECIES_API int | cecies_generate_curve448_keypair (cecies_curve448_keypair *output, const uint8_t *additional_entropy, size_t additional_entropy_length) |
Curve25519 and Curve448 key-pair generators (both export their output into NUL-terminated, hex-encoded strings).
CECIES_API int cecies_generate_curve25519_keypair | ( | cecies_curve25519_keypair * | output, |
const uint8_t * | additional_entropy, | ||
size_t | additional_entropy_length | ||
) |
Generates a CECIES Curve25519 keypair and writes it into the specified output buffers.
output | The cecies_curve25519_keypair instance into which to write the generated key-pair. |
additional_entropy | [OPTIONAL] Additional entropy bytes for the CSPRNG. Can be set to NULL if you wish not to add custom entropy. |
additional_entropy_length | [OPTIONAL] Length of the additional_entropy array. If additional_entropy is NULL , this value is ignored. |
0
if key generation succeeded; error codes as defined inside the header file or MbedTLS otherwise. CECIES_API int cecies_generate_curve448_keypair | ( | cecies_curve448_keypair * | output, |
const uint8_t * | additional_entropy, | ||
size_t | additional_entropy_length | ||
) |
Generates a CECIES Curve448 keypair and writes it into the specified output buffers.
output | The cecies_curve448_keypair instance into which to write the generated key-pair. |
additional_entropy | [OPTIONAL] Additional entropy bytes for the CSPRNG. Can be set to NULL if you wish not to add custom entropy. |
additional_entropy_length | [OPTIONAL] Length of the additional_entropy array. If additional_entropy is NULL , this value is ignored. |
0
if key generation succeeded; error codes as defined inside the header file or MbedTLS otherwise.