Ordo  0.3.4
Symmetric Cryptography Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Functions
skein256.h File Reference

Primitive. More...

#include "ordo/primitives/hash_functions.h"
Include dependency graph for skein256.h:

Go to the source code of this file.

Functions

ORDO_PUBLIC int skein256_init (struct SKEIN256_STATE *state, const struct SKEIN256_PARAMS *params)
 
ORDO_PUBLIC void skein256_update (struct SKEIN256_STATE *state, const void *buffer, size_t len)
 
ORDO_PUBLIC void skein256_final (struct SKEIN256_STATE *state, void *digest)
 
ORDO_PUBLIC size_t skein256_query (int query, size_t value)
 
ORDO_PUBLIC size_t skein256_bsize (void)
 

Detailed Description

Primitive.

This is the Skein-256 hash function, which produces a 256-bit digest by default (but has parameters to output a longer digest) and has a 256-bit internal state. This implementation supports messages up to a length of 2^64 - 1 bytes instead of the 2^96 - 1 available, but we trust this will not be an issue. This is a rather flexible hash with lots of options. Currently, the only options supported are:

Note arbitrary output length used to be supported, but is no longer, since parameters should not leak through the interface, and this feature is also available in a more generic way via key stretching modules such as HKDF or DRBG.

Function Documentation

ORDO_PUBLIC int skein256_init ( struct SKEIN256_STATE *  state,
const struct SKEIN256_PARAMS params 
)
See Also
hash_init()
Return values
ORDO_ARGif parameters were provided, but requested an output length of zero bytes.
ORDO_PUBLIC void skein256_update ( struct SKEIN256_STATE *  state,
const void *  buffer,
size_t  len 
)
See Also
hash_update()
ORDO_PUBLIC void skein256_final ( struct SKEIN256_STATE *  state,
void *  digest 
)
See Also
hash_final()
ORDO_PUBLIC size_t skein256_query ( int  query,
size_t  value 
)
See Also
hash_query()
ORDO_PUBLIC size_t skein256_bsize ( void  )

Gets the size in bytes of a SKEIN256_STATE.

Returns
The size in bytes of the structure.
Remarks
Binary compatibility layer.