CRYPTO_FROM_EDDSA_PRIVATE(3MONOCYPHER) | 3MONOCYPHER | CRYPTO_FROM_EDDSA_PRIVATE(3MONOCYPHER) |
crypto_from_eddsa_private
,
crypto_from_eddsa_public
—
#include <monocypher.h>
void
crypto_from_eddsa_private
(uint8_t
x25519[32], const uint8_t eddsa[32]);
void
crypto_from_eddsa_public
(uint8_t
x25519[32], const uint8_t eddsa[32]);
The crypto_from_eddsa_private
() function
converts an EdDSA (with BLAKE2b) private key to an X25519 private key. The
crypto_from_eddsa_public
() function converts an
EdDSA public key to an X25519 public key.
X25519 key pairs cannot be converted back to EdDSA key pairs. The
conversion of private keys is specific to EdDSA with BLAKE2b because of the
way EdDSA works. In particular, this means that the output of
crypto_from_eddsa_private
() differs from
crypto_from_ed25519_private(3monocypher)
in the optional code. However, the output of
crypto_from_eddsa_public
() is identical to
crypto_from_ed25519_public(3monocypher).
The arguments are:
The arguments may overlap or point at the same buffer.
crypto_from_eddsa_private
() and
crypto_from_eddsa_public
() functions first appeared in
Monocypher 3.1.0.
February 13, 2022 | Debian |