Skip to content

Commit

Permalink
Picopass: allow zero keys (#44)
Browse files Browse the repository at this point in the history
Co-authored-by: あく <alleteam@gmail.com>
  • Loading branch information
bettse and skotopes authored Sep 19, 2023
1 parent bf2f50c commit 4af84c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scenes/picopass_scene_read_card_success.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ void picopass_scene_read_card_success_on_enter(void* context) {
furi_string_cat_printf(csn_str, "%02X", csn[i]);
}

bool no_key = picopass_is_memset(pacs->key, 0x00, RFAL_PICOPASS_BLOCK_LEN);
// We can't test the pacs->key in case it is intentionally all 0's and we can't test the key block since it is populated with the diversified key before each key test, so we approximate with the PACS config block being blank.
bool no_key = picopass_is_memset(
AA1[PICOPASS_ICLASS_PACS_CFG_BLOCK_INDEX].data, 0x00, RFAL_PICOPASS_BLOCK_LEN);
bool empty = picopass_is_memset(
AA1[PICOPASS_ICLASS_PACS_CFG_BLOCK_INDEX].data, 0xFF, RFAL_PICOPASS_BLOCK_LEN);

Expand Down

0 comments on commit 4af84c8

Please sign in to comment.