Crypto++
8.6
Free C++ class library of cryptographic schemes
|
Go to the source code of this file.
Functions | |
int | curve25519_mult (byte publicKey[32], const byte secretKey[32]) |
Generate a public key. More... | |
int | curve25519_mult (byte sharedKey[32], const byte secretKey[32], const byte othersKey[32]) |
Generate a shared key. More... | |
int | ed25519_publickey (byte publicKey[32], const byte secretKey[32]) |
Creates a public key from a secret key. More... | |
int | ed25519_sign (const byte *message, size_t messageLength, const byte secretKey[32], const byte publicKey[32], byte signature[64]) |
Creates a signature on a message. More... | |
int | ed25519_sign (std::istream &stream, const byte secretKey[32], const byte publicKey[32], byte signature[64]) |
Creates a signature on a message. More... | |
int | ed25519_sign_open (const byte *message, size_t messageLength, const byte publicKey[32], const byte signature[64]) |
Verifies a signature on a message. More... | |
int | ed25519_sign_open (std::istream &stream, const byte publicKey[32], const byte signature[64]) |
Verifies a signature on a message. More... | |
Functions for curve25519 and ed25519 operations This header provides the entry points into Andrew Moon's curve25519 and ed25519 curve functions. The Crypto++ classes x25519 and ed25519 use the functions. The functions are in the Donna
namespace and are curve25519_mult(), ed25519_publickey(), ed25519_sign() and ed25519_sign_open(). At the moment the hash function for signing is fixed at SHA512.
Definition in file donna.h.
Generate a public key.
publicKey | byte array for the public key |
secretKey | byte array with the private key |
pubkey
. Generate a shared key.
sharedKey | byte array for the shared secret |
secretKey | byte array with the private key |
othersKey | byte array with the peer's public key |
sharedKey
. Creates a public key from a secret key.
publicKey | byte array for the public key |
secretKey | byte array with the private key |
publicKey
. int ed25519_sign | ( | const byte * | message, |
size_t | messageLength, | ||
const byte | secretKey[32], | ||
const byte | publicKey[32], | ||
byte | signature[64] | ||
) |
Creates a signature on a message.
message | byte array with the message |
messageLength | size of the message, in bytes |
publicKey | byte array with the public key |
secretKey | byte array with the private key |
signature | byte array for the signature |
int ed25519_sign | ( | std::istream & | stream, |
const byte | secretKey[32], | ||
const byte | publicKey[32], | ||
byte | signature[64] | ||
) |
Creates a signature on a message.
stream | std::istream derived class |
publicKey | byte array with the public key |
secretKey | byte array with the private key |
signature | byte array for the signature |
int ed25519_sign_open | ( | const byte * | message, |
size_t | messageLength, | ||
const byte | publicKey[32], | ||
const byte | signature[64] | ||
) |
Verifies a signature on a message.
message | byte array with the message |
messageLength | size of the message, in bytes |
publicKey | byte array with the public key |
signature | byte array with the signature |
Verifies a signature on a message.
stream | std::istream derived class |
publicKey | byte array with the public key |
signature | byte array with the signature |