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

Primitive. More...

#include "ordo/primitives/block_ciphers.h"
Include dependency graph for threefish256.h:

Go to the source code of this file.

Functions

ORDO_PUBLIC int threefish256_init (struct THREEFISH256_STATE *state, const void *key, size_t key_len, const struct THREEFISH256_PARAMS *params)
 
ORDO_PUBLIC void threefish256_forward (const struct THREEFISH256_STATE *state, void *block)
 
ORDO_PUBLIC void threefish256_inverse (const struct THREEFISH256_STATE *state, void *block)
 
ORDO_PUBLIC void threefish256_final (struct THREEFISH256_STATE *state)
 
ORDO_PUBLIC size_t threefish256_query (int query, size_t value)
 
ORDO_PUBLIC size_t threefish256_bsize (void)
 

Detailed Description

Primitive.

Threefish-256 is a block cipher with a 256-bit block size and a 256-bit key size. It also has an optional 128-bit tweak, which can be set through the cipher parameters.

The Threefish ciphers were originally designed to be used as a building block for the Skein hash function family.

Function Documentation

ORDO_PUBLIC int threefish256_init ( struct THREEFISH256_STATE *  state,
const void *  key,
size_t  key_len,
const struct THREEFISH256_PARAMS params 
)
See Also
block_init()
Return values
ORDO_KEY_LENif the key length is not 32 (bytes).
ORDO_PUBLIC void threefish256_forward ( const struct THREEFISH256_STATE *  state,
void *  block 
)
See Also
block_forward()
ORDO_PUBLIC void threefish256_inverse ( const struct THREEFISH256_STATE *  state,
void *  block 
)
See Also
block_inverse()
ORDO_PUBLIC void threefish256_final ( struct THREEFISH256_STATE *  state)
See Also
block_final()
ORDO_PUBLIC size_t threefish256_query ( int  query,
size_t  value 
)
See Also
block_query()
ORDO_PUBLIC size_t threefish256_bsize ( void  )

Gets the size in bytes of a THREEFISH256_STATE.

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