diff options
-rw-r--r-- | lib/sha1.c | 4 | ||||
-rw-r--r-- | lib/sha1.h | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -24,7 +24,7 @@ #include "ubc_check.h" -/* +/* Because Little-Endian architectures are most common, we only set SHA1DC_BIGENDIAN if one of these conditions is met. Note that all MSFT platforms are little endian, @@ -1643,7 +1643,7 @@ static void sha1_process(SHA1_CTX* ctx, const uint32_t block[16]) unsigned i, j; uint32_t ubc_dv_mask[DVMASKSIZE] = { 0xFFFFFFFF }; uint32_t ihvtmp[5]; - + ctx->ihv1[0] = ctx->ihv[0]; ctx->ihv1[1] = ctx->ihv[1]; ctx->ihv1[2] = ctx->ihv[2]; @@ -64,7 +64,7 @@ void SHA1DCInit(SHA1_CTX*); The best collision attacks against SHA-1 have complexity about 2^60, thus for 240-steps an immediate lower-bound for the best cryptanalytic attacks would be 2^180. An attacker would be better off using a generic birthday search of complexity 2^80. - + Enabling safe SHA-1 hashing will result in the correct SHA-1 hash for messages where no collision attack was detected, but it will result in a different SHA-1 hash for messages where a collision attack was detected. This will automatically invalidate SHA-1 based digital signature forgeries. @@ -97,7 +97,7 @@ void SHA1DCUpdate(SHA1_CTX*, const char*, size_t); /* obtain SHA-1 hash from SHA-1 context */ /* returns: 0 = no collision detected, otherwise = collision found => warn user for active attack */ -int SHA1DCFinal(unsigned char[20], SHA1_CTX*); +int SHA1DCFinal(unsigned char[20], SHA1_CTX*); #if defined(__cplusplus) } |