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

2018-10-17 Thread brian m. carlson
On Wed, Oct 17, 2018 at 06:12:41PM +0200, SZEDER Gábor wrote: > On macOS there is a MIN macro already defined in the system headers, > resulting in the following error: > > CC sha256/block/sha256.o > sha256/block/sha256.c:133:9: error: 'MIN' macro redefined > [-Werror,-Wmacro-redefined]

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

2018-10-17 Thread SZEDER Gábor
On Mon, Oct 15, 2018 at 02:18:57AM +, brian m. carlson wrote: > diff --git a/sha256/block/sha256.c b/sha256/block/sha256.c > new file mode 100644 > index 00..18350c161a > --- /dev/null > +++ b/sha256/block/sha256.c > @@ -0,0 +1,180 @@ > +#include "git-compat-util.h" > +#include

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

2018-10-16 Thread Duy Nguyen
On Tue, Oct 16, 2018 at 1:31 AM brian m. carlson wrote: > > On Mon, Oct 15, 2018 at 04:59:12PM +0200, Duy Nguyen wrote: > > On Mon, Oct 15, 2018 at 4:23 AM brian m. carlson > > wrote: > > > > > > SHA-1 is weak and we need to transition to a new hash function. For > > > some time, we have

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

2018-10-15 Thread brian m. carlson
On Mon, Oct 15, 2018 at 04:59:12PM +0200, Duy Nguyen wrote: > On Mon, Oct 15, 2018 at 4:23 AM brian m. carlson > wrote: > > > > 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

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

2018-10-15 Thread Duy Nguyen
On Mon, Oct 15, 2018 at 4:23 AM brian m. carlson wrote: > > 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

[PATCH v2 10/13] Add a base implementation of SHA-256 support

2018-10-14 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