Release v4.15864 - Radium
[RRG-proxmark3.git] / armsrc / iclass.h
blob6801777f9e2e6562c28bb78509318c6846bc8524
1 //-----------------------------------------------------------------------------
2 // Copyright (C) Gerhard de Koning Gans - May 2008
3 // Contribution made during a security research at Radboud University Nijmegen
4 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
5 //
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 #ifndef __ICLASS_H
19 #define __ICLASS_H
21 #include "common.h"
22 #include "iclass_cmd.h"
24 void SniffIClass(uint8_t jam_search_len, uint8_t *jam_search_string);
25 void ReaderIClass(uint8_t flags);
27 void iClass_WriteBlock(uint8_t *msg);
28 void iClass_Dump(uint8_t *msg);
30 void iClass_Restore(iclass_restore_req_t *msg);
32 int do_iclass_simulation_nonsec(void);
33 int do_iclass_simulation(int simulationMode, uint8_t *reader_mac_buf);
34 void SimulateIClass(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint8_t *datain);
35 void iclass_simulate(uint8_t sim_type, uint8_t num_csns, bool send_reply, uint8_t *datain, uint8_t *dataout, uint16_t *dataoutlen);
37 void iClass_Authentication_fast(iclass_chk_t *p);
38 bool iclass_auth(iclass_auth_req_t *payload, uint8_t *out);
40 void iClass_ReadBlock(uint8_t *msg);
41 bool iclass_read_block(uint16_t blockno, uint8_t *data, uint32_t *start_time, uint32_t *eof_time);
43 bool select_iclass_tag(picopass_hdr_t *hdr, bool use_credit_key, uint32_t *eof_time);
44 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);
45 #endif