nx_jose_es256.nx
buildroot/runtime/nx_jose_es256.nx
about
nx_jose_es256.nx -- ES256 (ECDSA P-256 + SHA-256) JWS flattened
signing, RFC 7515/7518. The Ed25519 path (nx_jose) is sovereign but
Let's Encrypt's production CA requires ES256 (or RS256) account keys
and issues ECDSA/RSA certs -- never Ed25519 -- so the ACME client
needs this.
Standalone (does NOT import nx_jose) so the whole import graph stays
on nx_syscalls.nx -- nx_jose pulls nx_syscalls_x86_64.nx which would
double-define every sys_* against the P-256 crypto stack.
REUSABLE beyond ACME: JWT ES256, OAuth, WebPush VAPID, etc.
ES256 JWS signature is the RAW r||s concatenation (32+32=64 bytes,
each big-endian), NOT ASN.1-DER -- RFC 7518 ยง3.4.
license_tier: ORIGINAL (composes RFC 7515/7518 + the substrate P-256 stack)
dependencies 8 imports · 1 importers
imports: nx_syscalls.nxnx_jwt.nxnx_sha256.nxnx_u256.nxnx_p256_point.nxnx_p256_scalar_mul.nxnx_ecdsa_p256_sign.nxnx_ecdsa_p256.nx
imported by: nx_acme_es256.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 26 | const NXES_MAGIC_4096: i64 = 4096 |
| 28 | const NXES_OK: i64 = 0 |
| 29 | const NXES_BAD_ARG: i64 = 1 |
| 30 | const NXES_OOM: i64 = 2 |
| 31 | const NXES_SIGN_ERR: i64 = 3 |
functions
| 34 | func nxes_put_cstr(out: *u8, off: *i64, cap: i64, s: *u8) -> i64 { |
| 42 | func nxes_put_bytes(out: *u8, off: *i64, cap: i64, src: *u8, n: i64) -> i64 { |
| 52 | func nx_p256_pubkey_from_priv(priv_limbs: *i64, out_x: *i64, out_y: *i64) -> i64 {
called by 3: mainmainmain calls 5: p256_point_allocp256_point_load_gp256_scalar_mulp256_point_to_affineu256_copy |
| 64 | func nxes_signature_input(protected_json: *u8, prot_n: i64, |
| 84 | func nx_jose_sign_es256_flattened( |
| 134 | func main() -> i64 { |