diff --git a/groestl.c b/groestl.c index e0ea63e9e..de3784cbf 100644 --- a/groestl.c +++ b/groestl.c @@ -1019,21 +1019,18 @@ groestl_big_close(sph_groestl_big_context *sc, groestl_big_init(sc, (unsigned)out_len << 3); } -/* see sph_groestl.h */ void groestl512_Init(void *cc) { groestl_big_init((sph_groestl_big_context *)cc, 512); } -/* see sph_groestl.h */ void groestl512_Update(void *cc, const void *data, size_t len) { groestl_big_core((sph_groestl_big_context *)cc, data, len); } -/* see sph_groestl.h */ void groestl512_Final(void *cc, void *dst) { @@ -1046,15 +1043,7 @@ groestl512_DoubleTrunc(void *cc, void *dst) char buf[64]; groestl512_Final(cc, buf); - groestl512_Init(cc); groestl512_Update(cc, buf, sizeof(buf)); groestl512_Final(cc, buf); memcpy(dst, buf, 32); } - -/* see sph_groestl.h */ -void -sph_groestl512_addbits_and_close(void *cc, unsigned ub, unsigned n, void *dst) -{ - groestl_big_close((sph_groestl_big_context *)cc, ub, n, dst, 64); -} diff --git a/groestl.h b/groestl.h index 533d8c0bb..aeabf9442 100644 --- a/groestl.h +++ b/groestl.h @@ -89,23 +89,7 @@ void groestl512_Update(void *cc, const void *data, size_t len); */ void groestl512_Final(void *cc, void *dst); - +/* Calculate double Groestl-512 hash and truncate it to 256-bits. */ void groestl512_DoubleTrunc(void *cc, void *dst); -/** - * Add a few additional bits (0 to 7) to the current computation, then - * terminate it and output the result in the provided buffer, which must - * be wide enough to accomodate the result (64 bytes). If bit number i - * in ub has value 2^i, then the extra bits are those - * numbered 7 downto 8-n (this is the big-endian convention at the byte - * level). The context is automatically reinitialized. - * - * @param cc the Groestl-512 context - * @param ub the extra bits - * @param n the number of extra bits (0 to 7) - * @param dst the destination buffer - */ -void sph_groestl512_addbits_and_close( - void *cc, unsigned ub, unsigned n, void *dst); - #endif