X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=echo%2Fecho.h;h=6255a4cdbf14856036a0cd03227bcc4563fd3ba0;hb=b8aa8d06134ce687993cb3148d66ebd86dbf1d6f;hp=fcb02f275e2c581a79255f07fde71942d2254b45;hpb=450d74da32fadde564961f4095662fde5c61bb9e;p=avr-crypto-lib.git diff --git a/echo/echo.h b/echo/echo.h index fcb02f2..6255a4c 100644 --- a/echo/echo.h +++ b/echo/echo.h @@ -1,7 +1,7 @@ /* echo.h */ /* This file is part of the AVR-Crypto-Lib. - Copyright (C) 2010 Daniel Otte (daniel.otte@rub.de) + Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -43,13 +43,27 @@ typedef struct{ uint16_t id; }echo_small_ctx_t; +typedef struct{ + uint8_t v[8*16]; + uint8_t salt[16]; + uint64_t counter; + uint16_t id; +}echo_large_ctx_t; + +void echo_small_nextBlock(echo_small_ctx_t *ctx, void *block); +void echo_small_lastBlock(echo_small_ctx_t *ctx, void *block, uint16_t length_b); +void echo_small_ctx2hash(void *dest, uint16_t length_b, echo_small_ctx_t *ctx); +void echo224_ctx2hash(void *dest, echo_small_ctx_t *ctx); +void echo256_ctx2hash(void *dest, echo_small_ctx_t *ctx); +void echo224_init(echo_small_ctx_t *ctx); +void echo256_init(echo_small_ctx_t *ctx); -void echo_small_nextBlock(echo_small_ctx_t* ctx, void* block); -void echo_small_lastBlock(echo_small_ctx_t* ctx, void* block, uint16_t length_b); -void echo_small_ctx2hash(void* dest, uint16_t length_b, echo_small_ctx_t* ctx); -void echo224_ctx2hash(void* dest, echo_small_ctx_t* ctx); -void echo256_ctx2hash(void* dest, echo_small_ctx_t* ctx); -void echo224_init(echo_small_ctx_t* ctx); -void echo256_init(echo_small_ctx_t* ctx); +void echo_large_nextBlock(echo_large_ctx_t *ctx, void *block); +void echo_large_lastBlock(echo_large_ctx_t *ctx, void *block, uint16_t length_b); +void echo_large_ctx2hash(void *dest, uint16_t length_b, echo_large_ctx_t *ctx); +void echo384_ctx2hash(void *dest, echo_large_ctx_t *ctx); +void echo512_ctx2hash(void *dest, echo_large_ctx_t *ctx); +void echo384_init(echo_large_ctx_t *ctx); +void echo512_init(echo_large_ctx_t *ctx); #endif /* ECHO_H_ */