From 00c3f629523e0983f7876b33f9e88bc80bfc8939 Mon Sep 17 00:00:00 2001 From: Aram Date: Mon, 13 Mar 2017 12:58:00 +0100 Subject: [PATCH] Fixed a silly mistake in collecting parity bits --- libnfc_crypto1_crack.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) mode change 100644 => 100755 libnfc_crypto1_crack.c diff --git a/libnfc_crypto1_crack.c b/libnfc_crypto1_crack.c old mode 100644 new mode 100755 index 8a53f64..1da7259 --- a/libnfc_crypto1_crack.c +++ b/libnfc_crypto1_crack.c @@ -464,8 +464,7 @@ int nested_auth(uint32_t uid, uint64_t known_key, uint8_t ab_key, uint8_t for_bl nonces[nonces_collected] = 0; for(i = 0; i < 4; i++){ nonces[nonces_collected] |= ((uint64_t) Rx[i]) << (8*i); - bool parity = (RxPar[i] != oddparity(Rx[i])) ^ parity(Rx[i]); - nonces[nonces_collected] |= ((uint64_t) parity) << (32 + (8*i)); + nonces[nonces_collected] |= ((uint64_t) !RxPar[i]) << (32 + (8*i)); } nonces_collected++; }