Commit Graph
4 Commits
Author SHA1 Message Date
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 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 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