1 //-----------------------------------------------------------------------------
2 // Copyright (C) Jonathan Westhues, Nov 2006
3 // Copyright (C) Gerhard de Koning Gans - May 2008
4 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
6 // This program is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // See LICENSE.txt for the text of the license.
17 //-----------------------------------------------------------------------------
18 // Routines to support ISO 14443 type B.
19 //-----------------------------------------------------------------------------
30 # define AddCrc14A(data, len) compute_crc(CRC_14443_A, (data), (len), (data)+(len), (data)+(len)+1)
34 # define AddCrc14B(data, len) compute_crc(CRC_14443_B, (data), (len), (data)+(len), (data)+(len)+1)
38 #define AddCrc15(data, len) compute_crc(CRC_ICLASS, (data), (len), (data)+(len), (data)+(len)+1)
41 void iso14443b_setup(void);
42 int iso14443b_apdu(uint8_t const *msg
, size_t msg_len
, bool send_chaining
, void *rxdata
, uint16_t rxmaxlen
, uint8_t *response_byte
, uint16_t *responselen
);
44 int iso14443b_select_card(iso14b_card_select_t
*card
);
46 void SimulateIso14443bTag(const uint8_t *pupi
);
47 void read_14b_st_block(uint8_t blocknr
);
48 void SniffIso14443b(void);
49 void SendRawCommand14443B(iso14b_raw_cmd_t
*p
);
51 // States for 14B SIM command
52 #define SIM_POWER_OFF 0
58 #endif /* __ISO14443B_H */