Re: [PATCH v3 10/12] Add a base implementation of SHA-256 support

2018-10-27 Thread Jakub Narebski
"brian m. carlson" writes: > SHA-1 is weak and we need to transition to a new hash function. For > some time, we have referred to this new function as NewHash. Recently, > we decided to pick SHA-256 as NewHash. Even if we have decided to not repeat the reasoning behind the need to switch away

Re: [PATCH v3 10/12] Add a base implementation of SHA-256 support

2018-10-22 Thread brian m. carlson
On Mon, Oct 22, 2018 at 11:44:40AM +0200, SZEDER Gábor wrote: > To protect us from potential "macro redefinition" errors, these > #undefs should come before the #defines above. Note also that BLKSIZE > is not #undef-ed. Ah, okay. I think I misread your suggestion. I'll see if anyone has more

Re: [PATCH v3 10/12] Add a base implementation of SHA-256 support

2018-10-22 Thread SZEDER Gábor
On Mon, Oct 22, 2018 at 02:43:40AM +, brian m. carlson wrote: > diff --git a/sha256/block/sha256.c b/sha256/block/sha256.c > new file mode 100644 > index 00..683bc6e39b > --- /dev/null > +++ b/sha256/block/sha256.c > @@ -0,0 +1,186 @@ > +#include "git-compat-util.h" > +#include

[PATCH v3 10/12] Add a base implementation of SHA-256 support

2018-10-21 Thread brian m. carlson
SHA-1 is weak and we need to transition to a new hash function. For some time, we have referred to this new function as NewHash. Recently, we decided to pick SHA-256 as NewHash. Add a basic implementation of SHA-256 based off libtomcrypt, which is in the public domain. Optimize it and