]> git.zerfleddert.de Git - proxmark3-svn/blob - client/mifarehost.h
ec1117e831a9cdd5856d55959754203ab3b53d3e
[proxmark3-svn] / client / mifarehost.h
1 // Merlok, 2011
2 // people from mifare@nethemba.com, 2010
3 //
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
6 // the license.
7 //-----------------------------------------------------------------------------
8 // High frequency ISO14443A commands
9 //-----------------------------------------------------------------------------
10
11 #include <stdio.h>
12 #include <stdlib.h>
13 #include <unistd.h>
14 #include <conio.h>
15 #include "common.h"
16 #include "cmdmain.h"
17 #include "ui.h"
18 #include "data.h"
19 #include "proxusb.h"
20 #include "util.h"
21 #include "nonce2key/nonce2key.h"
22 #include "nonce2key/crapto1.h"
23
24 #define MEM_CHUNK 1000000
25 #define NESTED_SECTOR_RETRY 10
26
27 typedef struct fnVector { uint8_t blockNo, keyType; uint32_t uid, nt, ks1; } fnVector;
28
29 typedef struct {
30 uint64_t Key[2];
31 int foundKey[2];
32 } sector;
33
34 typedef struct {
35 uint64_t *possibleKeys;
36 uint32_t size;
37 } pKeys;
38
39 typedef struct {
40 uint64_t key;
41 int count;
42 } countKeys;
43
44 int mfnested(uint8_t blockNo, uint8_t keyType, uint8_t * key, uint8_t trgBlockNo, uint8_t trgKeyType, uint8_t * ResultKeys);
45 int mfCheckKeys (uint8_t blockNo, uint8_t keyType, uint8_t keycnt, uint8_t * keyBlock, uint64_t * key);
46
Impressum, Datenschutz