Skip to content

Commit 0fa60c6

Browse files
committed
update picopass
1 parent 1f0d6d6 commit 0fa60c6

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

application.fam

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ App(
1010
],
1111
stack_size=4 * 1024,
1212
fap_description="App to communicate with NFC tags using the PicoPass(iClass) format",
13-
fap_version="1.2",
13+
fap_version="1.3",
1414
fap_icon="125_10px.png",
1515
fap_category="NFC",
1616
fap_libs=["mbedtls"],

scenes/picopass_scene_read_card_success.c

+15-2
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,24 @@ void picopass_scene_read_card_success_on_enter(void* context) {
9595

9696
if(pacs->key) {
9797
furi_string_cat_printf(key_str, "Key: ");
98-
9998
uint8_t key[RFAL_PICOPASS_BLOCK_LEN];
10099
memcpy(key, &pacs->key, RFAL_PICOPASS_BLOCK_LEN);
100+
101+
bool standard_key = true;
102+
// Handle DES key being 56bits with parity in LSB
101103
for(uint8_t i = 0; i < RFAL_PICOPASS_BLOCK_LEN; i++) {
102-
furi_string_cat_printf(key_str, "%02X", key[i]);
104+
if((key[i] & 0xFE) != (picopass_iclass_key[i] & 0xFE)) {
105+
standard_key = false;
106+
break;
107+
}
108+
}
109+
110+
if(standard_key) {
111+
furi_string_cat_printf(key_str, "Standard");
112+
} else {
113+
for(uint8_t i = 0; i < RFAL_PICOPASS_BLOCK_LEN; i++) {
114+
furi_string_cat_printf(key_str, "%02X", key[i]);
115+
}
103116
}
104117
}
105118

0 commit comments

Comments
 (0)