From 70f0694643e172e73d2788993c6e6c7f67849b53 Mon Sep 17 00:00:00 2001 From: Aram Date: Tue, 12 Apr 2016 21:54:40 +0200 Subject: [PATCH] Cleaned up README and reverted GOOD_BYTES_REQUIRED change --- README.md | 5 ++++- pwpiwi_proxmark3_hard_nested.patch | 11 ++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f03ab3b..a0f2e57 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/pwpiwi_proxmark3_hard_nested.patch b/pwpiwi_proxmark3_hard_nested.patch index 2db24fc..2922fba 100644 --- a/pwpiwi_proxmark3_hard_nested.patch +++ b/pwpiwi_proxmark3_hard_nested.patch @@ -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 #include #include @@ -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;