20 Commits
Author SHA1 Message Date
Laan Tungir e577de4e2d v0.1.27 - Entropy audit: remediate 3 findings (F-006 RP2040 xorshift fallback, F-007 PQ DRBG docs, F-008 SLH-DSA SK.prf domain separation) 2026-08-13 08:30:55 -04:00
Laan Tungir 0b1c3ea382 v0.1.24 - Migrate Teensy 4.1 signer to role+path authorization model (deprecate nostr_index) 2026-08-08 13:55:02 -04:00
Laan Tungir e04196f1f1 v0.1.8 - Consolidated USB test page, fixed OTP round-trip, reformatted SD card, added pad checksum logging 2026-08-01 05:26:42 -04:00
Laan Tungir 0ea3e60391 v0.1.7 - Teensy 4.1 OTP SD pad: complete implementation with UI pad selection
Solution D: 4 KB chunk cap, dropped boot-time checksum verify (can't scale
to 900 GB), increased transport frame + req/resp buffers to 8 KB.
test_otp_sd.py: 10/10 pass (ASCII + binary round-trips, offset advance,
2 KB large plaintext, tamper detection).

Phase 6: ui_pick_pad() LVGL pad-selection screen with chksum prefix + size
display, Skip button, 30s timeout. otp_pad_sd_list_pads() scans /pads and
returns chksums + sizes. Wired into the non-debug boot flow in signer.ino
(DEBUG_AUTO_GENERATE=0 path). DEBUG_AUTO_GENERATE=1 stays headless with
auto-bind_first.

README: added comprehensive memory management section documenting the
FlexRAM architecture, custom linker script, .rodata-to-FLASH move,
build-time stack gauge, and current memory layout.
2026-07-30 18:20:30 -04:00
Laan Tungir ac2e6347a2 v0.1.6 - Teensy 4.1 SD-card OTP pad: real implementation working on hardware
- otppad_embedded: bit-compatible port of libotppad (2386/2386 host tests pass)
- otp_pad_sd: SdFat-direct SD card pad reader (FAT-only, ASCII armor + binary .otp)
- pad_gen.ino: TRNG-sourced 1 MB pad generator using i.MX RT1062 TRNG registers
- Linker script: moved .rodata from DTCM to FLASH (EXCLUDE_FILE ed25519),
  reclaiming 124 KB DTCM, free stack 5.9 KB -> 130.9 KB
- check_stack.sh: build-time FlexRAM stack gauge, wired into build_signer.sh
- test_otp_sd.py: 8/9 hardware tests pass (ASCII + binary round-trips,
  offset advance, tamper detection; 10 KB plaintext times out on perf)
- test_classical.py: 16/16 pass with new memory layout (ed25519 OK)
- Memory evaluation document: plans/teensy41_memory_evaluation.md
2026-07-30 17:10:50 -04:00
Laan Tungir b1f8076b1d v0.1.5 - Fixed ml-dsa-65 SHAKE re-squeeze domain separation bug: poly_challenge, poly_eta, and poly_uniform_gamma1 re-absorbed the same seed on buffer exhaustion, producing identical output and potentially hanging the SampleInBall rejection loop; added a monotonic re-squeeze counter to the absorb buffer so each re-squeeze produces fresh bytes; note: ml-dsa-65 sign still hangs because the rejection loop never accepts a candidate — this is a separate NTT-correctness bug in the matvec/scalar multiplication wrappers that requires comparison against a PQClean reference implementation 2026-07-27 19:07:51 -04:00
Laan Tungir 314f1c520a v0.1.4 - Teensy 4.1 PQ stack fixes: moved ml-kem-768 NTT working polys (polyvec_matrix_pointwise 6656B, indcpa enc 9728B, indcpa dec 5120B, poly_mul_negacyclic 1024B) and ml-dsa-65 sign poly c (1024B) + SHAKE out buffers (2688B) from DTCM stack to DMAMEM (RAM2) static workspace; fixed ml-kem-768 keygen crash (verified on hardware); added ml-dsa-65 rejection-loop DMAMEM counter diagnostic; ml-dsa-65 sign no longer crashes but hangs due to pre-existing NTT correctness bug (rejection loop runs to exhaustion) — next milestone is to compare NTT output against host reference 2026-07-27 18:46:09 -04:00
Laan Tungir ea2f1cd78e v0.1.3 - Fixed Teensy 4.1 ed25519 sign/verify stack overflow: moved ed_add's 12 gf arrays (1536B), ed_frombytes' 9 gf arrays (1152B), sc_reduce/sc_muladd int64_t x[64] (512B), and ed25519_sign/verify SHA-512 ctx (328B) from DTCM stack to DMAMEM (RAM2) workspace; added persistent crash diagnostics (DMAMEM op marker + stack/heap measurement); full classical+Nostr suite now passes 16/16 in one uninterrupted boot (get_info, secp256k1/ed25519/x25519 pubkeys, schnorr+ecdsa sign/verify, ed25519 sign/verify, x25519 shared secret, derive, nostr pubkey/sign_event, nip04+nip44 round-trips) 2026-07-27 16:34:02 -04:00
Laan Tungir 9282e22b00 v0.1.2 - Teensy 4.1 secp256k1 stack reductions + shared context: reduced WINDOW_A 5->4 (Strauss ecmult tables 8->4 entries, fixes schnorr verify stack overflow) and ECMULT_CONST_GROUP_SIZE 5->4 (ECDH tables 16->8, fixes nip04 crash); added secp256k1_get_shared_context() and reused it in dispatch.cpp ECDSA/schnorr helpers to eliminate per-request secp256k1_context_create/destroy heap fragmentation; reordered test_signer.py to test classical+nostr verbs before PQ verbs and added nostr_sign_event/nip04/nip44 round-trip tests 2026-07-27 12:18:38 -04:00
Laan Tungir 2ba81c4bc8 v0.1.1 - Fixed Teensy 4.1 NIP-04 crash and NIP-44 dispatch bug: reduced secp256k1 ECMULT_CONST_GROUP_SIZE 5->4 to halve ECDH stack usage (~3.5KB->~1.7KB) preventing DTCM stack overflow in secp256k1_ecmult_const during nip04/nip44 ECDH; fixed is_nip44 selector in dispatch.cpp (method[7] was always 'i', digit is at method[9]) so nostr_nip44_* verbs now reach the nip44 implementation instead of silently calling nip04; verified nip04+nip44 round-trip on hardware 2026-07-27 07:16:53 -04:00
Laan Tungir 64fbd5c874 v0.1.0 - CYD firmware v0.0.2: algorithm-based API upgrade (all verbs, all algorithms), vendored Keccak/SHAKE + PSA ed25519/x25519 for IDF v5.4, Web Serial test page, CYD docs, Teensy 4.1 port plan (1TB SDXC OTP pad), brainstorming READMEs for BLE/IR/NFC/FPGA signer concepts 2026-07-21 13:16:04 -04:00
Laan Tungir c5f1a70658 v0.0.47 - Added post-quantum cryptography (ML-DSA-65, SLH-DSA-128s, ML-KEM-768) and standard ECC (ed25519, x25519) support with algorithm-based API 2026-07-16 15:14:57 -04:00
Laan Tungir d15eebb80f v0.0.34 - Add qrexec bridge subcommand and --bridge-source-trusted flag for persistent-signer qrexec transport 2026-07-11 09:37:51 -04:00
Laan Tungir c847179ba4 v0.0.33 - Implement in-place mnemonic entry grid with staged prefix selection and fix stage-3 candidate rendering 2026-06-09 10:29:15 -04:00
Laan Tungir 69c46ab2a7 v0.0.32 - Fix KB2040 Python WebUSB handshake and robust frame reassembly for get-public-key 2026-06-08 20:24:02 -04:00
Laan Tungir 6fd09f521a v0.0.31 - Harden LVGL screen transitions with widget pointer resets and null guards 2026-05-28 09:22:42 -04:00
Laan Tungir 430e391347 v0.0.30 - CYD: add post-approval event log screen and document CH340 EN-GND capacitor reset mitigation 2026-05-27 06:56:40 -04:00
Laan Tungir bd23b674d6 v0.0.29 - Feather firmware: auto-approve sign_event and always return explicit JSON-RPC errors for unhandled/oversized requests 2026-05-11 13:43:14 -04:00
Laan Tungir e4fa743654 v0.0.28 - Finalize Feather TinyUSB migration and remove cardputer artifacts 2026-05-09 16:22:50 -04:00
Laan Tungir 268b33b6d3 first 2026-05-02 12:31:26 -04:00