X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/d9ed4e191445d342d11e35fbe4886980e40771a8..ed8c2aeb6383c373da49d4b0b53fe15c7bfc1613:/client/mifarehost.c diff --git a/client/mifarehost.c b/client/mifarehost.c index 97e53f1e..35054d25 100644 --- a/client/mifarehost.c +++ b/client/mifarehost.c @@ -654,12 +654,12 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) { int tryDecryptWord(uint32_t nt, uint32_t ar_enc, uint32_t at_enc, uint8_t *data, int len){ PrintAndLog("\nEncrypted data: [%s]", sprint_hex(data, len) ); - struct Crypto1State *pcs = NULL; + struct Crypto1State *s; ks2 = ar_enc ^ prng_successor(nt, 64); ks3 = at_enc ^ prng_successor(nt, 96); - pcs = lfsr_recovery64(ks2, ks3); - mf_crypto1_decrypt(pcs, data, len, FALSE); + s = lfsr_recovery64(ks2, ks3); + mf_crypto1_decrypt(s, data, len, FALSE); PrintAndLog("Decrypted data: [%s]", sprint_hex(data, len) ); - crypto1_destroy(pcs); + crypto1_destroy(s); return 0; }