code wiki / (root) / nx_x25519_test.nx

nx_x25519_test.nx

buildroot/runtime/nx_x25519_test.nx

6257 B145 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic x25519
docsdependenciesstructsconstsfunctions

about

nx_x25519_test.nx -- RFC 7748 §5.2 X25519 KAT. Test vector 1: Input scalar: a546e36bf0527c9d3b16154b82465edd62144c0ac1fc5a18506a2244ba449ac4 Input u-coord: e6db6867583030db3594c1a424b15f7c726624ec26b3353b10a903a6d0ab1c4c Output: c3da55379de9c6908e94ea4df28d084f32eccf03491c71f754b4075577a28552 Also the RFC 8448 §3 ECDHE-shared from the actual TLS handshake: cpriv = 49af42ba7f9994852d713ef2784bcbcaa7911de26adc5642cb634540e7ea5005 spub = c98288761120 95fe66762bdbf7c672e156d6cc253b833df1dd69b1b04e751f0f ecdhe = 8bd4054fb55b9d63fdfbacf9f04b9f0d35e6d63f537563efd46272900f89492d expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_x25519.nx nx_x25519_test.nx

imports: nx_syscalls.nxnx_x25519.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap x25519 nx_scratch_save nx_scratch_init sys_mmap ↻ nx_scratch nx_scratch_init ↻ nx_scratch_oom sys_write sys_exit sys_mmap ↻ fe_alloc nx_scratch ↻ fe_from_bytes fe_one fe_zero fe_zero ↻ fe_copy x25519_ladder_step fe_cswap nx_scratch_save ↻ fe_alloc ↻ fe_add fe_sq fe_mul fe_sub fe_mul ↻ fe_mul_a24 nx_scratch_save ↻ fe_alloc ↻ fe_mul ↻ nx_scratch_restore nx_scratch_restore ↻ fe_cswap ↻ fe_invert nx_scratch_save ↻ fe_alloc ↻ fe_sq ↻ fe_mul ↻

structs

none

consts

none

functions

19func main() -> i64
calls 2: sys_mmapx25519