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)
37 void iso14443b_setup(void);
38 int iso14443b_apdu(uint8_t const *msg
, size_t msg_len
, bool send_chaining
, void *rxdata
, uint16_t rxmaxlen
, uint8_t *res
);
40 int iso14443b_select_card(iso14b_card_select_t
*card
);
41 int iso14443b_select_card_srx(iso14b_card_select_t
*card
);
42 int iso14443b_select_xrx_card(iso14b_card_select_t
*card
);
44 void SimulateIso14443bTag(uint8_t *pupi
);
45 void AcquireRawAdcSamplesIso14443b(uint32_t parameter
);
46 void ReadSTBlock(uint8_t blocknr
);
47 void SniffIso14443b(void);
48 void SendRawCommand14443B(uint32_t, uint32_t, uint8_t, uint8_t[]);
49 void SendRawCommand14443B_Ex(iso14b_raw_cmd_t
*p
);
51 // States for 14B SIM command
55 #define SIM_SELECTING 3
57 #define SIM_ACKNOWLEDGE 5
60 #endif /* __ISO14443B_H */