y2013t / mfcuk

Automatically exported from code.google.com/p/mfcuk
GNU General Public License v2.0
0 stars 0 forks source link

Change asm() to __asm__() #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
the are to bugs int the code.

1º

if you want to compile on 32-bit you have to change in crapto1.h

 asm(    "movl %1, %%eax\n"

to this

__asm__("movl %1, %%eax\n"

2º

when any version if is compiled on 32-bit system, dosen't work 

the last 2 bytes of the keys are always good, but the first 4 bytes are always 
wrong (sometimes random, sometimes the same).

the problem is here i think

#if !defined __i386__ || !defined __GNUC__
        x ^= x >> 16;
        x ^= x >> 8;
        x ^= x >> 4;
        return BIT(0x6996, x & 0xf);

i think this is not correct, i have to look more deep

lot of people have problems with this issue

http://www.libnfc.org/community/topic/98/mifare-classic-key-recovery-tool-dark-s
ide-attack/page/3/

Original issue reported on code.google.com by thefkb...@gmail.com on 18 Dec 2012 at 8:45

GoogleCodeExporter commented 9 years ago
i was wrong this also happend on x64 systems

i had tried on x64 debian 6.06 and happend this error

Original comment by thefkb...@gmail.com on 23 Dec 2012 at 11:15

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r85.

Original comment by romu...@libnfc.org on 30 Jan 2013 at 2:56

GoogleCodeExporter commented 9 years ago
The issue about 32bit systems wont be resolved...

I just tryed it and the result is the same... the first 4 bytes are incorrect 
and the last 2 bytes are correct.

Original comment by marcioa...@gmail.com on 16 Feb 2013 at 7:32

GoogleCodeExporter commented 9 years ago
I opened a new issue to track the bug related to wrong keys bytes.

Please do NOT open one ticket for more than one issue...

Original comment by romu...@libnfc.org on 18 Feb 2013 at 8:18