text
[RRG-proxmark3.git] / armsrc / iclass.h
blob9583822567b0198cd53aa75b0848b6d5bd88f1ba
1 //-----------------------------------------------------------------------------
2 // Jonathan Westhues, Aug 2005
3 // Gerhard de Koning Gans, April 2008, May 2011
4 // Iceman, August 2020
5 //
6 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
7 // at your option, any later version. See the LICENSE.txt file for the text of
8 // the license.
9 //-----------------------------------------------------------------------------
10 // Definitions internal to the app source.
11 //-----------------------------------------------------------------------------
12 #ifndef __ICLASS_H
13 #define __ICLASS_H
15 #include "common.h"
16 #include "pm3_cmd.h"
18 void SniffIClass(uint8_t jam_search_len, uint8_t *jam_search_string);
19 void ReaderIClass(uint8_t flags);
21 void iClass_WriteBlock(uint8_t *msg);
22 void iClass_Dump(uint8_t *msg);
24 void iClass_Restore(iclass_restore_req_t *msg);
26 int do_iclass_simulation_nonsec(void);
27 int do_iclass_simulation(int simulationMode, uint8_t *reader_mac_buf);
28 void SimulateIClass(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain);
29 void iclass_simulate(uint8_t sim_type, uint8_t num_csns, bool send_reply, uint8_t *datain, uint8_t *dataout, uint16_t *dataoutlen);
31 void iClass_Authentication_fast(iclass_chk_t *p);
32 bool iclass_auth(iclass_auth_req_t *payload, uint8_t *out);
34 void iClass_ReadBlock(uint8_t *msg);
35 bool iclass_read_block(uint16_t blockno, uint8_t *data, uint32_t *start_time, uint32_t *eof_time);
37 bool select_iclass_tag(picopass_hdr_t *hdr, bool use_credit_key, uint32_t *eof_time);
38 bool authenticate_iclass_tag(iclass_auth_req_t *payload, picopass_hdr_t *hdr, uint32_t *start_time, uint32_t *eof_time, uint8_t *mac_out);
39 #endif