Merge pull request #1327 from Pondorasti/patch-1
[RRG-proxmark3.git] / include / em4x70.h
blob183e7398def14978c2bb55ee1a10e4f0b11d3f93
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2020 sirloins
3 //
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
6 // the license.
7 //-----------------------------------------------------------------------------
8 // Low frequency EM4x70 structs
9 //-----------------------------------------------------------------------------
11 #ifndef EM4X70_H__
12 #define EM4X70_H__
14 #define EM4X70_NUM_BLOCKS 16
16 // Common word/block addresses
17 #define EM4X70_PIN_WORD_LOWER 10
18 #define EM4X70_PIN_WORD_UPPER 11
20 typedef struct {
21 bool parity;
23 // Used for writing address
24 uint8_t address;
25 uint16_t word;
27 // PIN to unlock
28 uint32_t pin;
30 // Used for authentication
31 uint8_t rnd[7];
32 uint8_t frnd[4];
34 // Used to write new key
35 uint8_t crypt_key[12];
37 } em4x70_data_t;
39 #endif /* EM4X70_H__ */