diff --git a/client/src/mifare/desfirecore.c b/client/src/mifare/desfirecore.c index d06691744..c348fd3a9 100644 --- a/client/src/mifare/desfirecore.c +++ b/client/src/mifare/desfirecore.c @@ -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); }