Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tamper Detection #471

Merged
merged 73 commits into from
Oct 31, 2024
Merged

Tamper Detection #471

merged 73 commits into from
Oct 31, 2024

Conversation

odudex
Copy link
Member

@odudex odudex commented Oct 15, 2024

What is this PR for?

Add a tamper detection mechanism called "Tamper Code Flash Hash" or "TC Flash Hash".
The mechanism combines cryptographic hashes, a Tamper Check Code, and camera-generated entropy to create a tamper indicator that is unique to each device, represented by a memorable image and four words.
A side feature is the "Flash Map", which is a visual tool to check the areas of the flash memory that contain data.
This PR also covers the addition of BIP85 base64 passwords.

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Docs update
  • Other

add introduction to anti-tamper doc
allow PIN with letters and special chars
allow disabling PIN
flash snapshot has words dedicated to SPIFFS
adapt fill_flash to all devices
update flash hash docs
move keypad index indicator down
@odudex odudex marked this pull request as ready for review October 29, 2024 17:21
Copy link
Collaborator

@jdlcdl jdlcdl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as of 108th commit 4c91316

  • have followed this branch since the beginning,
  • up to date on visual code review
  • still need to test beta10 on Amigo
  • no major issues found on Amigo, I focused testing on:
    • *.mpy files on sdcard are not imported
    • derived passwords and mnemonics from bip85 are as expected
    • flash-map and tamper-check-flash-hash features, functionality, reproducibility

as discussed, assuming this to be merged to develop and then readied w/ final adjustments towards release, we discussed todo:

  • feed the watchdog when looping in capture_image_with_sufficient_entropy(),
  • flush input events while flash_map is being drawn so that user sees it when done,
  • update docs about users filling-flash and timing out after 25s with "Insufficient entropy" in a dark room.
    note: I see that the 3 commits below resolve discussed todos.

@odudex odudex changed the base branch from main to develop October 31, 2024 19:03
@odudex odudex merged commit e3eae82 into develop Oct 31, 2024
7 checks passed
@odudex odudex deleted the pin_and_anti_tamper branch November 13, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants