Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cr-marcstevens/sha1collisiondetection.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-05-19 00:54:48 +0300
committerMarc Stevens <cr-marcstevens@users.noreply.github.com>2017-05-20 13:49:39 +0300
commit394e2f0f3ff51da9d7b6f3a6305006daadc85e6c (patch)
tree39c530b402964244c608627d02bf8f458d604a53
parente8397b268195a668dad08646ea4e2b4797410f4f (diff)
Remove trailing spaces in code
This all turns up warnings under "git am". These tend to raise complaints on the git mailing list when they need to apply patches, so give people less of a reason to complain.
-rw-r--r--lib/sha1.c4
-rw-r--r--lib/sha1.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/sha1.c b/lib/sha1.c
index 26516b1..8f16d42 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -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];
diff --git a/lib/sha1.h b/lib/sha1.h
index dd41b0a..1e4e94b 100644
--- a/lib/sha1.h
+++ b/lib/sha1.h
@@ -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)
}