Standard library
nox.ed25519
Ed25519 detached-signature verification (RFC 8032), built on the Zig standard library. Signing is done by noxc sign / noxc publish; this module lets Nox programs (for example the package registry server) check signatures.
Text
import nox.ed25519Capability: none (pure computation).
| Function | Meaning |
|---|---|
verify(pub_hex, msg, sig_hex) -> bool |
True when sig_hex (128 hex characters) is a valid signature of msg under the public key pub_hex (64 hex characters). Any malformed input (wrong length, non-hex, invalid curve point) returns False; nothing raises. |
fingerprint(pub_hex) -> str |
The 32-character key fingerprint used by noxc sign (first 16 bytes of the SHA-256 of the raw key, in hex); "" for invalid input. |
Text
pk: str = "d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a"
sg: str = "e5564300c360ac729086e2cc806e828a84877f1eb8e5d974d873e065224901555fb8821590a33bacc61e39701cf9b46bd25bf5f0595bbe24655141438e7a100b"
print(nox.ed25519.verify(pk, "", sg)) # True (RFC 8032, test vector 1)