mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-08-29 07:38:21 +00:00
Fixed hardcoded length of debug print of authentication nonce for mifare desfire
This commit is contained in:
committed by
Philippe Teuwen
parent
0b40585124
commit
070bdf78a1
@@ -1404,8 +1404,8 @@ static int DesfireAuthenticateEV1(DesfireContext_t *dctx, DesfireSecureChannel s
|
||||
DesfireCryptoEncDecEx(dctx, DCOMainKey, encRndB, rndlen, RndB, false, false, IV);
|
||||
|
||||
if (g_debugMode > 1) {
|
||||
PrintAndLogEx(DEBUG, "encRndB: %s", sprint_hex(encRndB, 8));
|
||||
PrintAndLogEx(DEBUG, "RndB: %s", sprint_hex(RndB, 8));
|
||||
PrintAndLogEx(DEBUG, "encRndB: %s", sprint_hex(encRndB, rndlen));
|
||||
PrintAndLogEx(DEBUG, "RndB: %s", sprint_hex(RndB, rndlen));
|
||||
}
|
||||
|
||||
// - Rotate RndB by 8 bits
|
||||
@@ -1435,7 +1435,7 @@ static int DesfireAuthenticateEV1(DesfireContext_t *dctx, DesfireSecureChannel s
|
||||
memcpy(tmp + rndlen, rotRndB, rndlen);
|
||||
if (g_debugMode > 1) {
|
||||
PrintAndLogEx(DEBUG, "rotRndB: %s", sprint_hex(rotRndB, rndlen));
|
||||
PrintAndLogEx(DEBUG, "Both : %s", sprint_hex(tmp, 32));
|
||||
PrintAndLogEx(DEBUG, "Both : %s", sprint_hex(tmp, rndlen * 2));
|
||||
}
|
||||
DesfireCryptoEncDecEx(dctx, DCOMainKey, tmp, rndlen * 2, both, true, true, IV);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user