Ordo
0.3.4
Symmetric Cryptography Library
|
Misc. asymmetric module (temp) More...
Go to the source code of this file.
Functions | |
ORDO_PUBLIC int | curve25519_gen (void *priv) |
ORDO_PUBLIC void | curve25519_pub (void *pub, const void *priv) |
ORDO_PUBLIC void | curve25519_ecdh (void *shared, const void *priv, const void *other) |
Misc. asymmetric module (temp)
This header provides access to the curve25519 asymmetric elliptic curve DH algorithm. It is in this folder temporarily as an experimental module.
ORDO_PUBLIC int curve25519_gen | ( | void * | priv | ) |
Generates a random private key.
[out] | priv | Output buffer for the private key. |
ORDO_SUCCESS
on success, else an error code.os_secure_random()
. ORDO_PUBLIC void curve25519_pub | ( | void * | pub, |
const void * | priv | ||
) |
Retrieves the public key corresponding to a private key.
[out] | pub | Output buffer for the public key. |
[in] | priv | The private key to be used. |
ORDO_PUBLIC void curve25519_ecdh | ( | void * | shared, |
const void * | priv, | ||
const void * | other | ||
) |
Computes the shared secret between two keypairs.
[out] | shared | Output buffer for the shared secret. |
[in] | priv | The private key of the first keypair. |
[in] | other | The public key of the second keypair. |