]> cvs.zerfleddert.de Git - proxmark3-svn/blob - client/nonce2key/nonce2key.h
CHG: 'lf hid wiegand' - remaking the wiegand calcs
[proxmark3-svn] / client / nonce2key / nonce2key.h
1 //-----------------------------------------------------------------------------
2 // Merlok - June 2011
3 // Roel - Dec 2009
4 // Unknown author
5 // iceman - may 2015
6 // marshmellow42 - june 2016
7 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
8 // at your option, any later version. See the LICENSE.txt file for the text of
9 // the license.
10 //-----------------------------------------------------------------------------
11 // MIFARE Darkside hack
12 //-----------------------------------------------------------------------------
13
14 #ifndef __NONCE2KEY_H
15 #define __NONCE2KEY_H
16
17 #include <stdio.h>
18 #include <stdlib.h>
19 #include "crapto1.h"
20 #include "common.h"
21 #include "mifare.h" // nonces_t struct
22 #include "ui.h" // PrintAndLog
23 #include "util.h" // FALSE / TRUE
24 #include "proxmark3.h"
25 #include "mifarehost.h"
26
27 extern int nonce2key(uint32_t uid, uint32_t nt, uint32_t nr, uint64_t par_info, uint64_t ks_info, uint64_t * key);
28 extern int nonce2key_ex(uint8_t blockno, uint8_t keytype, uint32_t uid, uint32_t nt, uint32_t nr, uint64_t ks_info, uint64_t * key);
29
30 //iceman, added these to be able to crack key direct from "hf 14 sim" && "hf mf sim"
31 bool tryMfk32(nonces_t data, uint64_t *outputkey, bool verbose );
32 bool tryMfk32_moebius(nonces_t data, uint64_t *outputkey, bool verbose); // <<-- this one has best success
33 int tryMfk64_ex(uint8_t *data, uint64_t *outputkey );
34 int tryMfk64(uint32_t uid, uint32_t nt, uint32_t nr_enc, uint32_t ar_enc, uint32_t at_enc, uint64_t *outputkey);
35 #endif
Impressum, Datenschutz