code wiki / (root) / nx_hkdf_sha512_wasm.nx

nx_hkdf_sha512_wasm.nx

buildroot/runtime/nx_hkdf_sha512_wasm.nx

15937 B397 linesdepth 0pulls 0 transitivereach 0 importersview sourcekind orphan librarytopic hkdf
docsdependenciesstructsconstsfunctions

about

nx_hkdf_sha512_wasm.nx -- HKDF-SHA-512 (RFC 5869) for WAT target. Built on inline HMAC-SHA-512 (inline SHA-512). Extract uses HMAC directly; Expand chains HMAC outputs T(i) = HMAC(PRK, T(i-1) || info || i). API: nx_hkdf512_extract(salt, salt_len, ikm, ikm_len, scratch, prk_out) nx_hkdf512_expand(prk, info, info_len, okm_len, scratch, okm_out) Verified against RFC 5869 §A.4-A.6 (SHA-512 test cases). license_tier: INDEPENDENT_REDERIVE genealogy_id: international-research-sources/ietf/rfc_5869 + rfc_4231 lineage_id: nishi_hkdf_sha512_wasm_q11

dependencies 0 imports · 0 importers

imports: none

imported by: nobody (leaf or entry point)

structs

none

consts

16const W_OFF: i64 = 200
17const HMAC_B: i64 = 128

functions

19func _rotr64(x: i64, n: i64) -> i64
called by 1: _sha512_compress
27func _be64_read(buf: *u8, off: i64) -> i64
called by 1: _sha512_compress
39func _be64_write(buf: *u8, off: i64, v: i64) -> i64
51func _i64_le_get(buf: *u8, idx: i64) -> i64
called by 1: _sha512_compress
58func _i64_le_set(buf: *u8, idx: i64, v: i64) -> i64
called by 1: _sha512_compress
70func _h_get(ctx: *u8, i: i64) -> i64
77func _h_set(ctx: *u8, i: i64, v: i64) -> i64
90func _sha512_k(i: i64) -> i64
called by 1: _sha512_compress
134func _sha512_compress(ctx: *u8) -> i64
189func _sha512_init(ctx: *u8) -> i64
called by 2: _sha512_one_shot_hmac_sha512 calls 1: _h_set
201func _sha512_one_shot(in_ptr: *u8, in_len: i64, ctx: *u8, out_ptr: *u8) -> i64
252func _hmac_sha512(key_ptr: *u8, key_len: i64,
334func nx_hkdf512_extract(salt_ptr: *u8, salt_len: i64,
calls 1: _hmac_sha512
358func nx_hkdf512_expand(prk_ptr: *u8, info_ptr: *u8, info_len: i64,
calls 1: _hmac_sha512