Code cleanup: Refactoring nonce2key

- include nonce2key() in mifarehost.c
- remove tools/nonce2key
- simplify mifare_autopwn.lua
This commit is contained in:
pwpiwi 2017-03-11 18:32:53 +01:00
commit 7779d73c71
14 changed files with 378 additions and 609 deletions

View file

@ -509,7 +509,7 @@ lfsr_common_prefix(uint32_t pfx, uint32_t rr, uint8_t ks[8], uint8_t par[8][8],
odd = lfsr_prefix_ks(ks, 1);
even = lfsr_prefix_ks(ks, 0);
s = statelist = malloc((sizeof *statelist) << 21); // need more for no_par special attack. Enough???
s = statelist = malloc((sizeof *statelist) << 22); // was << 20. Need more for no_par special attack. Enough???
if(!s || !odd || !even) {
free(statelist);
statelist = 0;