Crypto++
7.0
Free C++ class library of cryptographic schemes
|
ed25519 message accumulator More...
Public Member Functions | |
ed25519_MessageAccumulator () | |
Create a message accumulator. | |
ed25519_MessageAccumulator (RandomNumberGenerator &rng) | |
Create a message accumulator. More... | |
void | Update (const byte *msg, size_t len) |
Add data to the accumulator. More... | |
void | Restart () |
Reset the accumulator. | |
byte * | signature () |
Retrieve pointer to signature buffer. More... | |
const byte * | signature () const |
Retrieve pointer to signature buffer. More... | |
const byte * | data () const |
Retrieve pointer to data buffer. More... | |
size_t | size () const |
Retrieve size of data buffer. More... | |
![]() | |
HashTransformation & | Ref () |
Provides a reference to this object. More... | |
virtual byte * | CreateUpdateSpace (size_t &size) |
Request space which can be written into by the caller. More... | |
virtual void | Final (byte *digest) |
Computes the hash of the current message. More... | |
unsigned int | TagSize () const |
Provides the tag size of the hash. More... | |
virtual unsigned int | BlockSize () const |
Provides the block size of the compression function. More... | |
virtual unsigned int | OptimalBlockSize () const |
Provides the input block size most efficient for this hash. More... | |
virtual unsigned int | OptimalDataAlignment () const |
Provides input and output data alignment for optimal performance. More... | |
virtual void | CalculateDigest (byte *digest, const byte *input, size_t length) |
Updates the hash with additional input and computes the hash of the current message. More... | |
virtual bool | Verify (const byte *digest) |
Verifies the hash of the current message. More... | |
virtual bool | VerifyDigest (const byte *digest, const byte *input, size_t length) |
Updates the hash with additional input and verifies the hash of the current message. More... | |
virtual void | CalculateTruncatedDigest (byte *digest, size_t digestSize, const byte *input, size_t length) |
Updates the hash with additional input and computes the hash of the current message. More... | |
virtual bool | TruncatedVerify (const byte *digest, size_t digestLength) |
Verifies the hash of the current message. More... | |
virtual bool | VerifyTruncatedDigest (const byte *digest, size_t digestLength, const byte *input, size_t length) |
Updates the hash with additional input and verifies the hash of the current message. More... | |
![]() | |
Algorithm (bool checkSelfTestStatus=true) | |
Interface for all crypto algorithms. More... | |
virtual std::string | AlgorithmName () const |
Provides the name of this algorithm. More... | |
virtual std::string | AlgorithmProvider () const |
Retrieve the provider of this algorithm. More... | |
![]() | |
virtual Clonable * | Clone () const |
Copies this object. More... | |
Static Public Attributes | |
static const int | RESERVE_SIZE =2048+64 |
static const int | SIGNATURE_LENGTH =64 |
ed25519 message accumulator
ed25519 buffers the entire message, and does not digest the message incrementally. You should be careful with large messages like files on-disk. The behavior is by design because Bernstein feels small messages should be authenticated; and larger messages will be hashed by the application.
Definition at line 253 of file xed25519.h.
|
inline |
Create a message accumulator.
ed25519 does not use a RNG. You can safely use NullRNG() because IsProbablistic returns false.
Definition at line 266 of file xed25519.h.
|
inlinevirtual |
Add data to the accumulator.
msg | pointer to the data to accumulate |
len | the size of the data, in bytes |
Implements HashTransformation.
Definition at line 273 of file xed25519.h.
|
inline |
Retrieve pointer to signature buffer.
Definition at line 286 of file xed25519.h.
|
inline |
Retrieve pointer to signature buffer.
Definition at line 292 of file xed25519.h.
|
inline |
Retrieve pointer to data buffer.
Definition at line 298 of file xed25519.h.
|
inline |
Retrieve size of data buffer.
Definition at line 304 of file xed25519.h.