X-Git-Url: https://git.cryptolib.org/?p=avr-crypto-lib.git;a=blobdiff_plain;f=twister%2Ftwister-large.h;fp=twister%2Ftwister-large.h;h=45de18b7424420b8eea8d6c0ed0bf5edffd90965;hp=0000000000000000000000000000000000000000;hb=4f50c75ee5a6cc88bf7ea71957ed509e298e6c25;hpb=7701e318e4e2bac7f84dbf6e368f1501814948fc diff --git a/twister/twister-large.h b/twister/twister-large.h new file mode 100644 index 0000000..45de18b --- /dev/null +++ b/twister/twister-large.h @@ -0,0 +1,45 @@ +/* twister-large.h */ + +#ifndef TWISTER_large_H_ +#define TWISTER_large_H_ + +#include +#include "twister.h" + +typedef uint8_t twister384_hash_t[384/8]; +typedef uint8_t twister512_hash_t[512/8]; + +typedef struct { + twister_state_t state; + twister_checksum_t checksum; +} twister_large_ctx_t; + +typedef twister_large_ctx_t twister384_ctx_t; +typedef twister_large_ctx_t twister512_ctx_t; + +/*********************************************************************/ + +void twister_large_nextBlock(twister_large_ctx_t* ctx, const void* msg); +void twister_large_init(twister_large_ctx_t* ctx, uint16_t hashsize_b); +void twister_large_lastBlock(twister_large_ctx_t* ctx, const void* msg, uint16_t length_b); +void twister_large_ctx2hash(void* dest, twister_large_ctx_t* ctx, uint16_t hashsize_b); + +/*********************************************************************/ + +void twister384_init(twister384_ctx_t* ctx); +void twister384_nextBlock(twister384_ctx_t* ctx, const void* msg); +void twister384_lastBlock(twister384_ctx_t* ctx, const void* msg, uint16_t length_b); +void twister384_ctx2hash(void* dest, twister384_ctx_t* ctx); +void twister384(void* dest, const void* msg, uint32_t msg_length_b); + +/*********************************************************************/ + +void twister512_init(twister512_ctx_t* ctx); +void twister512_nextBlock(twister512_ctx_t* ctx, const void* msg); +void twister512_lastBlock(twister512_ctx_t* ctx, const void* msg, uint16_t length_b); +void twister512_ctx2hash(void* dest, twister512_ctx_t* ctx); +void twister512(void* dest, const void* msg, uint32_t msg_length_b); + + +#endif /* TWISTER_large_H_ */ +