Repository navigation
[encstore] Shared PIN-gated encrypted storage module + keyring app - #4428
Open
GlassOnTin wants to merge 1 commit into
Open
GlassOnTin wants to merge 1 commit into
GlassOnTin wants to merge 1 commit into
Conversation
GlassOnTin
force-pushed
the
encstore-keystore
branch
from
November 16, 2026 23:02
a41d335 to
32be282
Compare
GlassOnTin
force-pushed
the
encstore-keystore
branch
from
November 16, 2026 23:05
32be282 to
e58ce48
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
modules/encstore.jsandmodules/EncStore.md: a shared, app-agnostic encrypted Storage module, plusapps/keyringas its first consumer.Design (uses only the hash primitives the firmware exposes; no block cipher):
pin || salt, default 400 rounds (~2-4 s per unlock on a Bangle.js 2), split into separate encryption and MAC keys via domain separation.ct = pt XOR SHA256(encKey || iv || be32(i))over 32-byte blocks.iv || ctwith the separately derived MAC key. Wrong PIN or tampering yields no data.apps/keyringconsumes the module: a PIN gate over a list of label/secret/comment entries, view on tap, relock on BTN1. Entries are provisioned off-watch so secrets never get typed on a 176 px screen.Off-watch reference and tool:
apps/authentiwatch/tools/seal_lock.py(from the authentiwatch PR) reads, verifies and seals the same format with stdlib only. The keyring lock shipped in testing was cross-verified against it byte-for-byte, both directions (correct PIN decodes; wrong PIN rejected with no content revealed).Code written with AI assistance, reviewed and tested on a Bangle.js 2 (firmware 2v29): PIN setup, unlock, wrong-PIN path, viewer, and cross-implementation checks.