1 //-----------------------------------------------------------------------------
2 // Copyright (C) Gerhard de Koning Gans - May 2008
3 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // See LICENSE.txt for the text of the license.
16 //-----------------------------------------------------------------------------
17 // Mifare Classic Card Simulation
18 //-----------------------------------------------------------------------------
26 # define CheckCrc14A(data, len) check_crc(CRC_14443_A, (data), (len))
29 #define AC_DATA_READ 0
30 #define AC_DATA_WRITE 1
32 #define AC_DATA_DEC_TRANS_REST 3
33 #define AC_KEYA_READ 0
34 #define AC_KEYA_WRITE 1
35 #define AC_KEYB_READ 2
36 #define AC_KEYB_WRITE 3
42 #define AUTHKEYNONE 0xff
44 void Mifare1ksim(uint16_t flags
, uint8_t exitAfterNReads
, uint8_t *datain
, uint16_t atqa
, uint8_t sak
);