1 //-----------------------------------------------------------------------------
2 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // See LICENSE.txt for the text of the license.
15 //-----------------------------------------------------------------------------
16 // High frequency Electronic Machine Readable Travel Document commands
17 //-----------------------------------------------------------------------------
19 #ifndef CMDHFEMRTD_H__
20 #define CMDHFEMRTD_H__
28 typedef struct emrtd_dg_s
{
35 bool eac
; // EAC only (we can't dump these)
36 bool required
; // some are required only if PACE
37 bool fastdump
; // fast to dump
38 int (*parser
)(uint8_t *data
, size_t datalen
);
39 int (*dumper
)(uint8_t *data
, size_t datalen
, const char *path
);
42 typedef struct emrtd_hashalg_s
{
44 int (*hasher
)(uint8_t *datain
, int datainlen
, uint8_t *dataout
);
47 const uint8_t descriptor
[15];
50 typedef struct emrtd_pacealg_s
{
52 int (*keygenerator
)(uint8_t *datain
, int datainlen
, uint8_t *dataout
);
53 const uint8_t descriptor
[10];
56 // Standardized Domain Parameters
57 typedef struct emrtd_pacesdp_s
{
63 int CmdHFeMRTD(const char *Cmd
);
65 int dumpHF_EMRTD(char *documentnumber
, char *dob
, char *expiry
, bool BAC_available
, const char *path
);
66 int infoHF_EMRTD(char *documentnumber
, char *dob
, char *expiry
, bool BAC_available
, bool only_fast
);
67 int infoHF_EMRTD_offline(const char *path
);