"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cipher/tiger.c" between
libgcrypt-1.9.1.tar.bz2 and libgcrypt-1.9.2.tar.bz2

About: Libgcrypt is a general purpose library of cryptographic building blocks (originally based on GnuPG code).

tiger.c  (libgcrypt-1.9.1.tar.bz2):tiger.c  (libgcrypt-1.9.2.tar.bz2)
skipping to change at line 755 skipping to change at line 755
t = lsb; t = lsb;
lsb <<= 3; lsb <<= 3;
msb <<= 3; msb <<= 3;
msb |= t >> 29; msb |= t >> 29;
if( hd->bctx.count < 56 ) /* enough room */ if( hd->bctx.count < 56 ) /* enough room */
{ {
hd->bctx.buf[hd->bctx.count++] = pad; hd->bctx.buf[hd->bctx.count++] = pad;
if (hd->bctx.count < 56) if (hd->bctx.count < 56)
memset (&hd->bctx.buf[hd->bctx.count], 0, 56 - hd->bctx.count); memset (&hd->bctx.buf[hd->bctx.count], 0, 56 - hd->bctx.count);
hd->bctx.count = 56;
/* append the 64 bit count */ /* append the 64 bit count */
buf_put_le32(hd->bctx.buf + 56, lsb); buf_put_le32(hd->bctx.buf + 56, lsb);
buf_put_le32(hd->bctx.buf + 60, msb); buf_put_le32(hd->bctx.buf + 60, msb);
burn = transform( hd, hd->bctx.buf, 1 ); burn = transform( hd, hd->bctx.buf, 1 );
} }
else /* need one extra block */ else /* need one extra block */
{ {
hd->bctx.buf[hd->bctx.count++] = pad; /* pad character */ hd->bctx.buf[hd->bctx.count++] = pad; /* pad character */
/* fill pad and next block with zeroes */ /* fill pad and next block with zeroes */
memset (&hd->bctx.buf[hd->bctx.count], 0, 64 - hd->bctx.count + 56); memset (&hd->bctx.buf[hd->bctx.count], 0, 64 - hd->bctx.count + 56);
hd->bctx.count = 64 + 56;
/* append the 64 bit count */ /* append the 64 bit count */
buf_put_le32(hd->bctx.buf + 64 + 56, lsb); buf_put_le32(hd->bctx.buf + 64 + 56, lsb);
buf_put_le32(hd->bctx.buf + 64 + 60, msb); buf_put_le32(hd->bctx.buf + 64 + 60, msb);
burn = transform( hd, hd->bctx.buf, 2 ); burn = transform( hd, hd->bctx.buf, 2 );
} }
p = hd->bctx.buf; p = hd->bctx.buf;
#define X(a) do { buf_put_be64(p, hd->a); p += 8; } while(0) #define X(a) do { buf_put_be64(p, hd->a); p += 8; } while(0)
#define Y(a) do { buf_put_le64(p, hd->a); p += 8; } while(0) #define Y(a) do { buf_put_le64(p, hd->a); p += 8; } while(0)
skipping to change at line 792 skipping to change at line 791
} }
else else
{ {
Y(a); Y(a);
Y(b); Y(b);
Y(c); Y(c);
} }
#undef X #undef X
#undef Y #undef Y
hd->bctx.count = 0;
_gcry_burn_stack (burn); _gcry_burn_stack (burn);
} }
static byte * static byte *
tiger_read( void *context ) tiger_read( void *context )
{ {
TIGER_CONTEXT *hd = context; TIGER_CONTEXT *hd = context;
return hd->bctx.buf; return hd->bctx.buf;
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)