Skip to content

Commit 9c8e73c

Browse files
Update README.md
1 parent 5f63fc9 commit 9c8e73c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

‎README.md‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ make
4343

4444
## Command-line usage
4545

46-
There are two programs `bin/sha1dc` and `bin/sha1dc_partialcoll`.
47-
The first program `bin/sha1dc` will detect and warn for files that were generated with a cryptanalytic SHA-1 collision attack like the one documented at https://shattered.io/.
48-
The second program `bin/sha1dc_partialcoll` will detect and warn for files that were generated with a cryptanalytic collision attack against reduced-round SHA-1 (of which there are a few examples so far).
46+
There are two programs `bin/sha1dcsum` and `bin/sha1dcsum_partialcoll`.
47+
The first program `bin/sha1dcsum` will detect and warn for files that were generated with a cryptanalytic SHA-1 collision attack like the one documented at https://shattered.io/.
48+
The second program `bin/sha1dcsum_partialcoll` will detect and warn for files that were generated with a cryptanalytic collision attack against reduced-round SHA-1 (of which there are a few examples so far).
4949

5050
Examples:
5151
```
52-
bin/sha1dc test/sha1_reducedsha_coll.bin
53-
bin/sha1dc_partialcoll test/sha1reducedsha_coll.bin
52+
bin/sha1dcsum test/sha1_reducedsha_coll.bin test/shattered-1.pdf
53+
bin/sha1dcsum_partialcoll test/sha1reducedsha_coll.bin test/shattered-1.pdf
5454
```
5555

5656
## Library usage
@@ -62,8 +62,14 @@ See the documentation in `lib/sha1.h`. Here is a simple example code snippet:
6262
SHA1_CTX ctx;
6363
unsigned char hash[20];
6464
SHA1DCInit(&ctx);
65-
// SHA1DCSetSafeHash(&ctx, 0); // disable safe-hash mode (safe-hash mode is enabled by default)
65+
66+
/** disable safe-hash mode (safe-hash mode is enabled by default) **/
67+
// SHA1DCSetSafeHash(&ctx, 0);
68+
/** disable use of unavoidable attack conditions to speed up detection (enabled by default) **/
69+
// SHA1DCSetUseUBC(&ctx, 0);
70+
6671
SHA1DCUpdate(&ctx, buffer, (unsigned)(size));
72+
6773
int iscoll = SHA1DCFinal(hash,&ctx);
6874
if (iscoll)
6975
printf("collision detected");

0 commit comments

Comments
(0)