Lightweight Cryptography Primitives
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions | Variables
internal-blake2s.h File Reference

BLAKE2s implementation for performance comparisons. More...

#include "aead-common.h"

Go to the source code of this file.

Macros

#define BLAKE2S_HASH_SIZE   32
 Size of the hash for BLAKE2s.
 

Functions

int internal_blake2s_hash (unsigned char *out, const unsigned char *in, unsigned long long inlen)
 Hashes a block of input data with BLAKE2s to generate a hash value. More...
 

Variables

aead_hash_algorithm_t const internal_blake2s_hash_algorithm
 Meta-information block for the BLAKE2s hash algorithm.
 

Detailed Description

BLAKE2s implementation for performance comparisons.

BLAKE2s is not one of the NIST lightweight submissions. We use it as a baseline to evaluate the performance of other hash algorithsm. For example, a performance result of "1.2 BLAKE's" means that the algorithm is 1.2 times faster than BLAKE2s on the same input data on the same hardware.

This BLAKE2s implementation is based on the one from the Arduino Cryptography Library.

Function Documentation

int internal_blake2s_hash ( unsigned char *  out,
const unsigned char *  in,
unsigned long long  inlen 
)

Hashes a block of input data with BLAKE2s to generate a hash value.

Parameters
outBuffer to receive the hash output which must be at least BLAKE2S_HASH_SIZE bytes in length.
inPoints to the input data to be hashed.
inlenLength of the input data in bytes.
Returns
Returns zero on success or -1 if there was an error in the parameters.