lf indala: count fc bit 6 in the --fc/--cn checksum

Three more genuine cards came to light in the repository traces. The
checksum over the card number bits alone matched three of the five,
with fc bit 6 in the sum it matches all five.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
This commit is contained in:
Gabriele GristinaandClaude Mythos 5.1 committed 2026-11-07 01:42:49 +01:00
1 parent 451ce54bed
commit ae6e9be0a4
1 file changed
+2 -1
+2 -1
View File
@@ -1162,8 +1162,9 @@ int getIndalaBits(uint8_t fc, uint16_t cn, uint8_t *bits) {
chk += ((cn >> 5) & 1); //y11 == 67 - 30 = 37
chk += ((cn >> 2) & 1); //y14 == 89 - 30 = 59
chk += (cn & 1); //y16 == 71 - 30 = 41
chk += ((fc >> 6) & 1); // fc b7 == 49, the five genuine cards on record need it
// as on genuine cards, see issue #2939
// as on the five genuine cards on record
if ((chk & 1) == 0) { // If the sum is even, checksum is '01' (binary) = 1.
bits[62] = 0;
bits[63] = 1;