Research, development and trades concerning the powerful Proxmark3 device.
Remember; sharing is caring. Bring something back to the community.
"Learn the tools of the trade the hard way." +Fravia
You are not logged in.
Time changes and with it the technology
Proxmark3 @ discord
Users of this forum, please be aware that information stored on this site is not private.
Pages: 1
I used the crypto1 source code from google and the main.c from Proxmark.org and ran the program. With exact same input data as proxmark.org, I got different key output.
nt': 8d65734b
nt'': 9a427b20
ks2: e38f32ab
ks3: c6ef8f19
Found Key: [45 fa 58 0f 6d 31]
Does anyone know why?
Offline
could be a number of things
a) you messed something up
b) the compiler you are using compiled crapto1 creatively / there are some bugs
if you could give exact details, paste your .c, your crapto1 version, your compiler version, ..
and anything you may have done. i'll see if i can help you out
alternatively just pop in some linux livecd ^^
Offline
Hi Hat,
I have done the following things,
I used MinGW32 and compiled the files under window command windows. Because I was not able to compile main.c, crypto1.c and crapto1.c together. I actually put all the source code into one file and just compiled that file. During the compile, there were lots of errors, mainly double definitions because some functions are definited in both crypto1.c and crapto1.c. So I just black out the duplicated functions and compile was success and i got totally different data.
The crapto1 was downloaded from google code and it is the only one there.
Offline
anyways "there were lots of errors, mainly double definitions because some functions are definited in both crypto1.c and crapto1.c. So I just black out the duplicated functions and compile was success "
does not comply with
"if you could give exact details, paste your .c, your crapto1 version, your compiler version, ..
and anything you may have done. i'll see if i can help you out"
I can not help you based on this information.
I don't log on to a culinary forum, and tell them i just combined two recipes made some changes, skipped some steps, and that the result is not tasty.
Last edited by hat (2010-11-10 22:51:35)
Offline
Hat, are you able to tell me the crypto1 source code on this website is the latest?
http://code.google.com/p/crapto1/downloads/list
I use the main.c from http://code.google.com/p/proxmark3/wiki/RunningPM3
The only changes I made was change lfsr_recovery to lfsr_recovery32, and change lfsr_rollback to lfsr_rollback_word.
My compiler version should be mingw-w64-bin_i686-mingw_20100611.
I am sorry that the way i decribed things might be a bit confusing. I am not really familiar with compiling C under linux. And the main purpose is to try this crypto1 function because I have captured some data with Proxmark with a reader and mifare 1K card. And I know the key on this card and I want to verify whether the function works and how it works.
Offline
seriously dude wasting my time much?
you'll probably want to change lfsr_recovery -> lfsr_recovery64
and those lfsr_rollback -> lfsr_rollback_word iirc. there are other projects like mfoc that bundle crapto so those should be easier to compile.
The only changes I made was change lfsr_recovery to lfsr_recovery32,
see the difference. anyway you may have made more mistakes, i can't help you if you don't share the code you created. If i do it it works. so you can continue with your vague descriptions, or you can just be precise.
ktnx
Offline
Hi Hat,
You know what, as soon as I changed from 32 to 64, it works!!! Thanks a lot! And it also seems the algorithm works on my test data as well but the key generates in a reverse way. Is it what it suppose to be like? For example, the key on my card should be AA BB CC DD EE FF, but the output from algorithm is FF EE DD CC BB AA.
Offline
the code on that wiki is that old that it prints the key bytes in the wrong order.
Offline
yes, the key is displayed in a reverse order. But it is not a big deal.
Offline
Pages: 1