mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
minor changes with init and doubleing the EMRTD_MAX_FILE_SIZE to 70 000 bytes. Which might help for some files
This commit is contained in:
parent
aa84e5ca8f
commit
5b5f1722b0
1 changed files with 4 additions and 4 deletions
|
@ -39,7 +39,7 @@
|
||||||
// Average EF_DG2 seems to be around 20-25kB or so, but ICAO doesn't set an upper limit
|
// Average EF_DG2 seems to be around 20-25kB or so, but ICAO doesn't set an upper limit
|
||||||
// Iris data seems to be suggested to be around 35kB per eye (Presumably bumping up the file size to around 70kB)
|
// Iris data seems to be suggested to be around 35kB per eye (Presumably bumping up the file size to around 70kB)
|
||||||
// but as we cannot read that until we implement PACE, 35k seems to be a safe point.
|
// but as we cannot read that until we implement PACE, 35k seems to be a safe point.
|
||||||
#define EMRTD_MAX_FILE_SIZE 35000
|
#define EMRTD_MAX_FILE_SIZE 70000
|
||||||
|
|
||||||
// ISO7816 commands
|
// ISO7816 commands
|
||||||
#define EMRTD_P1_SELECT_BY_EF 0x02
|
#define EMRTD_P1_SELECT_BY_EF 0x02
|
||||||
|
@ -411,13 +411,13 @@ static void emrtd_deskey(uint8_t *seed, const uint8_t *type, int length, uint8_t
|
||||||
PrintAndLogEx(DEBUG, "seed.............. %s", sprint_hex_inrow(seed, 16));
|
PrintAndLogEx(DEBUG, "seed.............. %s", sprint_hex_inrow(seed, 16));
|
||||||
|
|
||||||
// combine seed and type
|
// combine seed and type
|
||||||
uint8_t data[50];
|
uint8_t data[50] = { 0x00 };
|
||||||
memcpy(data, seed, length);
|
memcpy(data, seed, length);
|
||||||
memcpy(data + length, type, 4);
|
memcpy(data + length, type, 4);
|
||||||
PrintAndLogEx(DEBUG, "data.............. %s", sprint_hex_inrow(data, length + 4));
|
PrintAndLogEx(DEBUG, "data.............. %s", sprint_hex_inrow(data, length + 4));
|
||||||
|
|
||||||
// SHA1 the key
|
// SHA1 the key
|
||||||
unsigned char key[64];
|
unsigned char key[64] = { 0x00 };
|
||||||
sha1hash(data, length + 4, key);
|
sha1hash(data, length + 4, key);
|
||||||
PrintAndLogEx(DEBUG, "key............... %s", sprint_hex_inrow(key, length + 4));
|
PrintAndLogEx(DEBUG, "key............... %s", sprint_hex_inrow(key, length + 4));
|
||||||
|
|
||||||
|
@ -945,7 +945,7 @@ static bool emrtd_do_bac(char *documentnumber, char *dob, char *expiry, uint8_t
|
||||||
char dobcd = emrtd_calculate_check_digit(dob);
|
char dobcd = emrtd_calculate_check_digit(dob);
|
||||||
char expirycd = emrtd_calculate_check_digit(expiry);
|
char expirycd = emrtd_calculate_check_digit(expiry);
|
||||||
|
|
||||||
char kmrz[25];
|
char kmrz[25] = { 0x00 };
|
||||||
snprintf(kmrz, sizeof(kmrz), "%s%i%s%i%s%i", documentnumber, documentnumbercd, dob, dobcd, expiry, expirycd);
|
snprintf(kmrz, sizeof(kmrz), "%s%i%s%i%s%i", documentnumber, documentnumbercd, dob, dobcd, expiry, expirycd);
|
||||||
PrintAndLogEx(DEBUG, "kmrz.............. " _GREEN_("%s"), kmrz);
|
PrintAndLogEx(DEBUG, "kmrz.............. " _GREEN_("%s"), kmrz);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue