Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/tree/main/native/sig # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / native / sig` `2c9c8b5` docs: fix remaining README drift against current main Cursor Agent committed 2026-10-30 ``` .. tests/ .crumb 3002 .gitignore 5 Makefile 4190 README.md 2690 aienos_sig.h 2946 ct.c 1330 ed25519.c 18993 sha512.c 5797 sig_internal.h 1857 ``` README.md # native/sig: in-house Ed25519 and SHA-512 in C Scope: pure Ed25519 from RFC 8032 Section 5.1 (key derivation, sign, verify) and SHA-512 (FIPS 180-4). No Ed25519ph, no Ed25519ctx, no batch verification, no outside library. Library objects use no heap, clock or I/O (`make lib-checks`). API: `aienos_sig.h`; library: `out/libaienos_sig.a`. Built for the owner-key signed migration (M5) and signed commitment records (M23 G3). Users today: the owner-signed migration record in `native/m5` (`m5_owner_sig.c`, host-tested), the C kernel's signed artifact and receipt checks (`native/kernel/artifact/`), the A/B slot loader (`native/boot/slot_select.c`) and the M6-B secure transport (`native/net/aienos_sec.c`). ``` make -C native/sig test # lib-checks + RFC 8032 7.1 vectors + negatives + 1000 round trips make -C native/sig sanitize # same tests under ASan + UBSan make -C native/sig mutants # 14 GUARD rules removed one at a time; each must fail the tests ``` The test's last line is `AIENOS_SIG_NATIVE: PASS` (exit 0) or `AIENOS_SIG_NATIVE: FAIL` (exit 1). Verification policy (stricter than the RFC minimum): refuses S >= L, non-canonical y (y >= p) in A or R, off-curve points, x = 0 with the sign bit set, and A or R of small order (order dividing 8). It checks encode([S]B - [k]A) == R bytes (cofactorless). A public key with a small-order component mixed into a large-order point is accepted. Constant-time claims: key derivation and signing have no branch and no memory index that depends on the secret key or nonce. The scalar ladder always doubles and adds and keeps the sum with a masked select; scalar reduction mod L is bit-serial with a masked subtract; inversion and square-root exponents are public constants. Checked by reading the source and spot-checking AArch64 `-O2` disassembly (only loop-counter and stack-guard branches in those paths). Verification and point decoding take only public input and are NOT constant time. Not covered: no timing measurement on real hardware, no fault-injection or glitch resistance (no sign-then-verify countermeasure), no power or EM side-channel analysis, no independent cryptographic audit. Another compiler or flag set could reintroduce branches. Stack temporaries inside field operations are not wiped; the key hash, nonce and secret scalar buffers are. This library's own tests run on the host only. The C kernel links it for artifact signature checks, so it also runs in the QEMU artifact gates and in the Pi 5 artifact loader run with TEST keys (`docs/native/PI5-7-ARTIFACT-RUNS.md`). Slow by design (generic ladder, no precomputed tables): about 1 ms per sign plus verify on the Spark (hardware-unverified).