Proxmark developers community

Research, development and trades concerning the powerful Proxmark3 device!

You are not logged in.

#1 2010-11-10 02:51:19

caibutou2008
Member
Registered: 2010-11-08
Posts: 10

how to compile crapto-1

I have downloaded crapto-1 from google code. also copy the c source code as http://code.google.com/p/proxmark3/wiki/RunningPM3

But I have no idea about this gcc thing. can anyone help me?

I did some research and installed Cygwin but somehow the gcc doesn't work in it.

I am able to use proxmark to capture data between reader and 1k mifare card. I just want to see how this crapto-1 works.

Offline

#2 2010-11-10 03:42:23

hat
Member
Registered: 2009-04-12
Posts: 160

Re: how to compile crapto-1

gcc is a c compiler, you should be able to use any C compiler. since you are on windows that's probably MSVC or borlandc or ...

crapto1 is not a program but rather some library functions you would indeed need a "program" like the one  on that wiki you linked.

sadly however the code on the wiki is not compatible with recent versions of crapto1

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.

Offline

#3 2010-11-10 04:36:48

caibutou2008
Member
Registered: 2010-11-08
Posts: 10

Re: how to compile crapto-1

hat wrote:

gcc is a c compiler, you should be able to use any C compiler. since you are on windows that's probably MSVC or borlandc or ...

crapto1 is not a program but rather some library functions you would indeed need a "program" like the one  on that wiki you linked.

sadly however the code on the wiki is not compatible with recent versions of crapto1

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.

Thanks Hat. I did try to use VC to compile all these files as a project (main.c, crapto1.c, crypto1.c and crapto1.h) But it didn't work because it seems stdint.h isn't in the VC library so I went for Cygwin to try but failed because of not able to set up gcc......

I did notice there are some definitions different between main and crapto1.

What is this mfoc you mentioned?

Offline

#4 2010-11-10 08:41:35

rconty
Member
Registered: 2009-06-15
Posts: 7

Re: how to compile crapto-1

Hello,

hat wrote:

gcc is a c compiler, you should be able to use any C compiler. since you are on windows that's probably MSVC or borlandc or ...

MinGW contains gcc for windows. Using this compiler allow to use the code without modifications.

Offline

#5 2010-11-10 08:43:46

caibutou2008
Member
Registered: 2010-11-08
Posts: 10

Re: how to compile crapto-1

finally, i got the compiler working....... it is bloody hard...... alright, will come back with my test result......

Offline

#6 2010-11-10 08:45:32

rconty
Member
Registered: 2009-06-15
Posts: 7

Re: how to compile crapto-1

caibutou2008 wrote:

But it didn't work because it seems stdint.h isn't in the VC library

For libnfc project, we use "msinttypes" from
http://code.google.com/p/msinttypes/

caibutou2008 wrote:

What is this mfoc you mentioned?

MFOC, for Mifare Classic Offline Cracker, is a tool that can recover keys from Mifare Classic cards.
http://code.google.com/p/nfc-tools/wiki/mfoc

Offline

#7 2011-03-24 00:43:08

sponex
Member
Registered: 2010-10-23
Posts: 1

Re: how to compile crapto-1

Im struggling to get this programme compiled in linux, anyone able to lend some advice?

Offline

#8 2012-02-01 12:05:08

aminbakhtvar62
Member
Registered: 2011-02-23
Posts: 24

Re: how to compile crapto-1

hi can we use crapto1 with proxmak3? i mean other than using hf mf mifare command.because everytime i enter the command the "ks" and "par" are all zeros and it returns an invalid key

Offline

Board footer

Powered by FluxBB