code wiki / _hdl_build / nx_device_cert.nx

nx_device_cert.nx

buildroot/runtime/_hdl_build/nx_device_cert.nx

1986 B41 linesdepth 9pulls 12 transitivereach 3 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_device_cert.nx -- DEVICE provisioning for the access wall (the "provision certain devices to certain areas even over the internet" layer, L3). A provisioned device = (device_id, ed25519 PUBLIC key) in the registry; the device holds the matching PRIVATE key. To access, the device signs a FRESH server challenge (nonce) with its private key; the server verifies the signature against the registered public key -> the device_ok signal the PDP (nx_access_wall) consumes. Spoof-proof (no private key => no valid signature), replay-resistant (fresh challenge), and works over the public internet -- the mTLS essence without a shared secret. Does NOT roll crypto: reuses the KAT-verified ed25519 (ed25519_verify_full, RFC 8032). license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_ed25519_signature.nx nx_syscalls.nx nx_device_cert.nx nx_access_pep.nx nx_device_cert_gate.nx

imports: nx_ed25519_signature.nxnx_syscalls.nx

imported by: nx_access_pep.nxnx_device_cert_gate.nx

structs

none

consts

none

functions

12func dc_streq(a: *u8, b: *u8) -> i64
called by 1: dc_find
26func dc_find(ids: *i64, n: i64, id: *u8) -> i64
called by 1: dc_verify calls 1: dc_streq
35func dc_verify(ids: *i64, pubs: *i64, n: i64, id: *u8, challenge: *u8, clen: i64, sig: *u8) -> i64