Cleaned up README and reverted GOOD_BYTES_REQUIRED change

This commit is contained in:
Aram
2016-04-12 21:54:40 +02:00
parent 0d7a0db303
commit 70f0694643
2 changed files with 6 additions and 10 deletions

View File

@ -7,7 +7,7 @@ A pure C(99) implementation of the [Crypto-1 cipher](https://en.wikipedia.org/wi
Background
----------
I wrote this as a patch for [piwi's imlementation](https://github.com/pwpiwi/proxmark3/tree/hard_nested/) of the research documented in [Ciphertext-only cryptanalysis on Hardened Mifare Classic cards](http://www.cs.ru.nl/~rverdult/Ciphertext-only_Cryptanalysis_on_Hardened_Mifare_Classic_Cards-CCS_2015.pdf) after reading (most of) the paper, while it was still under [active development](http://www.proxmark.org/forum/viewtopic.php?id=2120).
I wrote this as a patch for [piwi's imlementation](https://github.com/pwpiwi/proxmark3/tree/hard_nested/) of the research documented in [Ciphertext-only cryptanalysis on hardened Mifare Classic cards](http://www.cs.ru.nl/~rverdult/Ciphertext-only_Cryptanalysis_on_Hardened_Mifare_Classic_Cards-CCS_2015.pdf) after reading (most of) the paper, while it was still under [active development](http://www.proxmark.org/forum/viewtopic.php?id=2120).
The final patch is included as `pwpiwi_proxmark3_hard_nested.patch`.
Later on, another implementation of the same attack surfaced, [CraptEV1](http://crapto1.netgarage.org/).
@ -34,5 +34,8 @@ I have included a conversion of the test file `0xcafec0de.txt` included in the C
$ ./solve_piwi_bs 0xcafec0de.bin
Acknowledgements
----------------
Special thanks to Carlo Meijer, Roel Verdult, piwi and bla.

View File

@ -11,10 +11,10 @@ index 91e595d..dc3557f 100644
ZLIBSRCS = deflate.c adler32.c trees.c zutil.c inflate.c inffast.c inftrees.c
ZLIB_FLAGS = -DZ_SOLO -DZ_PREFIX -DNO_GZIP -DZLIB_PM3_TUNED
diff --git a/client/cmdhfmfhard.c b/client/cmdhfmfhard.c
index b3893ea..4a0bd38 100644
index b3893ea..10ff98f 100644
--- a/client/cmdhfmfhard.c
+++ b/client/cmdhfmfhard.c
@@ -20,18 +20,21 @@
@@ -20,12 +20,15 @@
#include <pthread.h>
#include <locale.h>
#include <math.h>
@ -30,13 +30,6 @@ index b3893ea..4a0bd38 100644
// uint32_t test_state_odd = 0;
// uint32_t test_state_even = 0;
#define CONFIDENCE_THRESHOLD 0.95 // Collect nonces until we are certain enough that the following brute force is successfull
-#define GOOD_BYTES_REQUIRED 30
+#define GOOD_BYTES_REQUIRED 28
static const float p_K[257] = { // the probability that a random nonce has a Sum Property == K
@@ -88,6 +91,8 @@ typedef struct noncelist {
} noncelist_t;