From 1142ec19d44e2f135a072bfe613716d8e4668d64 Mon Sep 17 00:00:00 2001 From: Gregor Pintar Date: Mon, 14 Oct 2013 14:12:24 +0200 Subject: [PATCH] skein256 hash simplification --- lib/hash/skein256.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/hash/skein256.c b/lib/hash/skein256.c index 68cf8ca..f82171f 100644 --- a/lib/hash/skein256.c +++ b/lib/hash/skein256.c @@ -149,11 +149,7 @@ static void skein256_finish(kripto_hash *s) } memset(s->buf + s->i, 0, 32 - s->i); - - if(s->tweak[15] == 0x70) /* if still first */ - s->tweak[15] = 0xF0; /* type MSG, first, final */ - else s->tweak[15] = 0xB0; /* type MSG, final */ - + s->tweak[15] ^= 0x80; /* add final */ skein256_process(s); memset(s->buf, 0, 32); -- 2.11.4.GIT