Lightweight Cryptography Primitives
|
Romulus-H hash algorithm. More...
#include <stddef.h>
Go to the source code of this file.
Data Structures | |
union | romulus_hash_state_t |
State information for Romulus-H incremental modes. More... | |
Macros | |
#define | ROMULUS_HASH_SIZE 32 |
Size of the fixed-length hash value for Romulus-H. | |
#define | ROMULUS_HASH_RATE 32 |
Number of bytes in a rate block for Romulus-H. | |
Functions | |
int | romulus_hash (unsigned char *out, const unsigned char *in, size_t inlen) |
Hashes a block of input data with Romulus-H. More... | |
void | romulus_hash_init (romulus_hash_state_t *state) |
Initializes the state for a Romulus-H hashing operation. More... | |
void | romulus_hash_update (romulus_hash_state_t *state, const unsigned char *in, size_t inlen) |
Updates a Romulus-H hash state with more input data. More... | |
void | romulus_hash_finalize (romulus_hash_state_t *state, unsigned char *out) |
Returns the final hash value from a Romulus-H hashing operation. More... | |
Romulus-H hash algorithm.
Romulus-H is a hash algorithm based on the block cipher SKINNY-128-384+, using the MDPH construction. The algorithm produces a 256-bit fixed length output.
References: https://romulusae.github.io/romulus/
int romulus_hash | ( | unsigned char * | out, |
const unsigned char * | in, | ||
size_t | inlen | ||
) |
Hashes a block of input data with Romulus-H.
out | Buffer to receive the hash output which must be at least ROMULUS_HASH_SIZE bytes in length. |
in | Points to the input data to be hashed. |
inlen | Length of the input data in bytes. |
void romulus_hash_finalize | ( | romulus_hash_state_t * | state, |
unsigned char * | out | ||
) |
Returns the final hash value from a Romulus-H hashing operation.
state | Hash state to be finalized. |
out | Buffer to receive the hash output which must be at least ROMULUS_HASH_SIZE bytes in length. |
void romulus_hash_init | ( | romulus_hash_state_t * | state | ) |
Initializes the state for a Romulus-H hashing operation.
state | Hash state to be initialized. |
void romulus_hash_update | ( | romulus_hash_state_t * | state, |
const unsigned char * | in, | ||
size_t | inlen | ||
) |
Updates a Romulus-H hash state with more input data.
state | Hash state to be updated. |
in | Points to the input data to be absorbed into the state. |
inlen | Length of the input data to be absorbed into the state. |