code wiki / (root) / nx_x509_verify_ecdsa_test.nx

nx_x509_verify_ecdsa_test.nx

buildroot/runtime/nx_x509_verify_ecdsa_test.nx

6440 B120 linesdepth 11pulls 20 transitivereach 0 importersview sourcekind gate/prooftopic x509
docsdependenciesstructsconstsfunctions

about

nx_x509_verify_ecdsa_test.nx -- end-to-end KAT for the X.509 outer-signature verify pipeline (SHA-256 + DER parse + ECDSA verify). Test vector exploit: RFC 6979 §A.2.5 documents (NIST P-256 + SHA-256, msg = "sample") -> r, s. Since SHA-256("sample") is the documented hash AND our nx_x509_verify_ecdsa_p256 hashes the tbs input with SHA-256 before verifying, we can use: tbs = "sample" (6 ASCII bytes) sig_der = DER-encoded RFC 6979 r/s pub_x/y = RFC 6979 pubkey and the verify should return OK. This proves the FULL pipeline (hash + parse + ECDSA verify) without needing a real ECDSA- signed X.509 cert + chain. expect_exit: 0 license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_u256.nx nx_ecdsa_p256.nx nx_x509_verify_ecdsa.nx nx_x509_verify_ecdsa_test.nx

imports: nx_syscalls.nxnx_u256.nxnx_ecdsa_p256.nxnx_x509_verify_ecdsa.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

23func main() -> i64