From 7edf0d2b0a9173b8f55f649e6961d94647eb27f1 Mon Sep 17 00:00:00 2001 From: "zveriu@gmail.com" Date: Mon, 17 Oct 2011 07:03:37 +0000 Subject: [PATCH] - Added INSTALL file with the mambo-jambo compilation instructions - Added few TODO items - Changed asm to __asm__ so that some GNUC compilers are happy --- INSTALL | 9 +++++++++ TODO | 4 +++- src/crapto1.h | 6 ++++-- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 INSTALL diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..52dc595 --- /dev/null +++ b/INSTALL @@ -0,0 +1,9 @@ +Until I fix the AM/AC configs/scripts, here is what makes it compile: + +automake +autoreconf +automake --add-missing +autoreconf +automake +./configure +make \ No newline at end of file diff --git a/TODO b/TODO index 7903d96..8f776bd 100644 --- a/TODO +++ b/TODO @@ -16,4 +16,6 @@ ITEMS 1. Improve the performance (though not bad) 2. Optimize bits operations 3. Remove dead-code/commented block after testing -4. Proper error handling in some cases (not critical errors, but nice to have checks in place) \ No newline at end of file +4. Proper error handling in some cases (not critical errors, but nice to have checks in place) +5. Periodically save the state (or most important part of it at least) such as of Nt/Nr arrays, etc., so that it can later be resumed on the same card +6. Calibration methodology and routine for MFCUK to determine best field on/off delays so that it generates the lowest entropy for tag's Nt values \ No newline at end of file diff --git a/src/crapto1.h b/src/crapto1.h index 7547344..93a689b 100644 --- a/src/crapto1.h +++ b/src/crapto1.h @@ -61,13 +61,15 @@ static inline int parity(uint32_t x) x ^= x >> 4; return BIT(0x6996, x & 0xf); #else - asm( "movl %1, %%eax\n" + __asm__( + "movl %1, %%eax\n" "mov %%ax, %%cx\n" "shrl $0x10, %%eax\n" "xor %%ax, %%cx\n" "xor %%ch, %%cl\n" "setpo %%al\n" - "movzx %%al, %0\n": "=r"(x) : "r"(x): "eax","ecx"); + "movzx %%al, %0\n": "=r"(x) : "r"(x): "eax","ecx" + ); return x; #endif }