diff --git a/client/mifarehost.c b/client/mifarehost.c index d204bf12..f917a2f2 100644 --- a/client/mifarehost.c +++ b/client/mifarehost.c @@ -842,6 +842,11 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) { crypto1_get_lfsr(revstate, &lfsr); printf("key> %x%x\n", (unsigned int)((lfsr & 0xFFFFFFFF00000000) >> 32), (unsigned int)(lfsr & 0xFFFFFFFF)); AddLogUint64(logHexFileName, "key> ", lfsr); + if (validate_prng_nonce(nt)) { + printf("key> Prng: WEAK\n"); + } else { + printf("key> Prng: HARDEND\n"); + } } else { printf("key> nested not implemented!\n"); at_enc = bytes_to_num(data, 4); diff --git a/client/mifarehost.h b/client/mifarehost.h index 031dac1b..8bae5cbc 100644 --- a/client/mifarehost.h +++ b/client/mifarehost.h @@ -61,5 +61,6 @@ extern int tryDecryptWord(uint32_t nt, uint32_t ar_enc, uint32_t at_enc, uint8_t extern int mfCIdentify(); extern int DetectClassicPrng(void); +extern bool validate_prng_nonce(uint32_t nonce); #endif