eddy
820d09ab63
chore: rebuild release with fixed firmware, gitignore release/
2026-07-30 23:41:24 +02:00
eddy
70f004c45b
docs: add release build spec and implementation plan
...
Also un-ignores docs/ directory so project documentation (specs, plans)
is tracked in git. Individual research files remain gitignored.
2026-07-30 19:54:13 +02:00
eddy
f26ab1542b
chore: gitignore keystore and signing.properties
2026-07-30 19:51:12 +02:00
eddy
15498d025a
chore: remove research docs from git tracking, add to .gitignore
2026-07-29 23:53:26 +02:00
eddy
9c520f57c2
Add .worktrees/ to .gitignore
2026-07-27 12:32:40 +02:00
eddy
9a84b05b8a
Replace compile-time HMAC key with USB provisioning
...
ESP firmware:
- Store HMAC key in NVS via Preferences library instead of compile-time
hmac_key.h
- KEY? responds with HMAC_KEY:<hex> (if provisioned) or NO_KEY
- New SET_KEY:<64-hex> command stores key in NVS and responds OK
- Boot messages updated to reflect provisioning state
Android app:
- UsbKeyReceiver detects NO_KEY response and auto-provisions:
generates random 32-byte key via SecureRandom, sends SET_KEY,
waits for OK, saves key to SharedPreferences
- Read loop now breaks on both HMAC_KEY: and NO_KEY responses
Cleanup:
- Removed tools/generate_hmac_key.py and src/hmac_key.h
- Removed hmac_key.h from .gitignore
- README updated for new provisioning flow
2026-07-26 09:30:21 +02:00
eddy
7f68e9ad70
Add BLE security: Just Works pairing + HMAC-SHA256 authentication
...
Two-layer security for the BLE relay:
1. BLE Just Works pairing (link-layer encryption)
- ESP32 requires bonding before accepting writes
- Characteristic permissions set to ESP_GATT_PERM_WRITE_ENCRYPTED
- IO capability NO_INPUT_NO_OUTPUT (no passkey needed)
- LE Secure Connections with bonding (ESP_LE_AUTH_REQ_SC_BOND)
2. HMAC-SHA256 authentication (application-level)
- 32-byte shared secret in src/hmac_key.h (generated, gitignored)
- Each command signed: HMAC-SHA256(key, command || sequence)
- 37-byte packet format: [cmd:1][seq:4][hmac:32]
- Sequence counter prevents replay (strictly increasing, starts at 1)
- mbedtls on ESP, javax.crypto.Mac on Android
Key management:
- tools/generate_hmac_key.py generates random key + writes src/hmac_key.h
- ESP prints hex key to serial 5 seconds after boot
- Android app: SettingsActivity with eye-toggle password field
- Key stored in SharedPreferences, supports multiple ESP modules
Other changes:
- Android app: bonding flow (createBond -> BOND_BONDED -> discover)
- Android app: MTU negotiation (request 256)
- Android app: settings button (gear icon) in main screen
- Fix: sequence counter starts at 1 to prevent first-packet rejection
- Updated README with full security documentation
2026-07-26 08:18:52 +02:00
eddy
7c9dde172a
Initial commit: BLE relay controller for Atom VoiceS3R
2026-07-26 01:17:31 +02:00