hf seos - added the skeleton for future use
[RRG-proxmark3.git] / armsrc / epa.h
blob2372381818697f889f502cff18f168f64d33abb9
1 //-----------------------------------------------------------------------------
2 // Frederik Möllers - August 2012
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 // Routines to support the German eletronic "Personalausweis" (ID card)
9 //-----------------------------------------------------------------------------
11 #ifndef __EPA_H
12 #define __EPA_H
14 #include "common.h"
15 #include "pm3_cmd.h"
17 // this struct is used by EPA_Parse_CardAccess and contains info about the
18 // PACE protocol supported by the chip
19 typedef struct {
20 uint8_t oid[10];
21 uint8_t version;
22 uint8_t parameter_id;
23 } pace_version_info_t;
25 // general functions
26 void EPA_Finish(void);
27 size_t EPA_Parse_CardAccess(uint8_t *data,
28 size_t length,
29 pace_version_info_t *pace_info);
30 int EPA_Read_CardAccess(uint8_t *buffer, size_t max_length);
31 int EPA_Setup(void);
33 // PACE related functions
34 int EPA_PACE_MSE_Set_AT(pace_version_info_t pace_version_info, uint8_t password);
35 int EPA_PACE_Get_Nonce(uint8_t requested_length, uint8_t *nonce);
37 void EPA_PACE_Collect_Nonce(PacketCommandNG *c);
38 void EPA_PACE_Replay(PacketCommandNG *c);
40 #endif /* __EPA_H */