Blake implementation in C

Yes sir, that is true for multiple threads but in a case where we are not
using threads and if we are calling the "raazcompress"  function many
times, then that will result in redeclaration of those variables which are
now defined in this function . Will it create any overhead or it is okay?

*Sarthak Jain *
*B.tech(Hons.) - C.S.E - IIIrd year *
*The L.N.M. Institute of Information Technology, Jaipur*
*Contact - 9166517286*
*LinkedIn - http://www.linkedin.com/in/sarthaksj
<http://www.linkedin.com/in/sarthaksj>*


On Mon, Jun 23, 2014 at 7:56 PM, satvikc <notifications@github.com> wrote:

> In raaz-hash/cbits/raaz/hash/blake256/portable.c:
>
> > +typedef uint32_t word;
> > +#define HASH_SIZE 8
> > +#define BLOCK_SIZE 16
> > +#define SALT_SIZE 4
> > +#define counte_SIZE 2
> > +#define ROTATEL(x,n) ((x << n) | (x >> (32-n)))
> > +#define ROTATER(x,n) ((x >> n) | (x << (32-n)))
> > +typedef word Hash[HASH_SIZE];
> > +typedef word Block[BLOCK_SIZE];
> > +typedef word Salt[SALT_SIZE];
> > +word coun[counte_SIZE];
> > +
> > +int index1, index2;
> > +word mblock[BLOCK_SIZE];
> > +word constant[16];
> > +word v[4][4];
>
> Its about security and thread safety. What happens if you call blake from
> multiple threads. Its not thread safe. Also globals can leak information
> about data as the memory is not secure.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/piyush-kurur/raaz/pull/160/files#r14077523>.
>