avr-crypto-lib/twister/twister-large.h

46 lines
1.6 KiB
C
Raw Permalink Normal View History

2009-05-14 14:28:59 +00:00
/* twister-large.h */
2008-12-22 03:19:07 +00:00
2009-05-14 14:28:59 +00:00
#ifndef TWISTER_large_H_
#define TWISTER_large_H_
2008-12-22 03:19:07 +00:00
#include <stdint.h>
#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;
2009-05-14 14:28:59 +00:00
} twister_large_ctx_t;
2008-12-22 03:19:07 +00:00
2009-05-14 14:28:59 +00:00
typedef twister_large_ctx_t twister384_ctx_t;
typedef twister_large_ctx_t twister512_ctx_t;
2008-12-22 03:19:07 +00:00
2008-12-28 20:20:22 +00:00
/*********************************************************************/
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);
2008-12-22 03:19:07 +00:00
2008-12-28 20:20:22 +00:00
/*********************************************************************/
2008-12-22 03:19:07 +00:00
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);
2008-12-22 03:19:07 +00:00
2008-12-28 20:20:22 +00:00
/*********************************************************************/
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);
2008-12-22 03:19:07 +00:00
2009-05-14 14:28:59 +00:00
#endif /* TWISTER_large_H_ */
2008-12-22 03:19:07 +00:00