Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change asm() to __asm__() #19

Closed
GoogleCodeExporter opened this issue Apr 19, 2015 · 4 comments
Closed

Change asm() to __asm__() #19

GoogleCodeExporter opened this issue Apr 19, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

This issue was closed by revision r85.

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

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

  • Changed title: Change asm() to asm()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant