mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-09 01:36:52 +08:00
Merge pull request #1746 from nvx/bugfix/gallagher_kdf_admin_card
Fix gallagher KDF generation for Admin Cards aka Reader Config Cards
This commit is contained in:
commit
5f99882eac
1 changed files with 2 additions and 1 deletions
|
@ -491,7 +491,8 @@ int mfdes_kdf_input_gallagher(uint8_t *uid, uint8_t uidLen, uint8_t keyNo, uint3
|
|||
|
||||
int len = 0;
|
||||
// If the keyNo == 1 or the aid is 000000, then omit the UID.
|
||||
if (keyNo != 1 && aid != 0x000000) {
|
||||
// On the other hand, if the aid is 1f81f4 (config card) always include the UID.
|
||||
if ((keyNo != 1 && aid != 0x000000) || (aid == 0x1f81f4)) {
|
||||
if (*kdfInputLen < (4 + uidLen)) {
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue