code wiki / (root) / nx_hkdf_sha384_wasm.nx

nx_hkdf_sha384_wasm.nx

buildroot/runtime/nx_hkdf_sha384_wasm.nx

16648 B408 linesdepth 0pulls 0 transitivereach 0 importersview sourcekind orphan librarytopic hkdf
docsdependenciesstructsconstsfunctions

about

nx_hkdf_sha384_wasm.nx -- HKDF-SHA-384 (RFC 5869) for WAT target. Built on inline HMAC-SHA-384 (= SHA-512 compression + SHA-384 IV + 48-byte truncation). PRK length = 48 (one HMAC-SHA-384 output); HashLen = 48; max OKM = 255 * 48 = 12,240 bytes. Used in the TLS 1.3 key schedule when the ciphersuite is TLS_AES_256_GCM_SHA384. API: nx_hkdf384_extract(salt, salt_len, ikm, ikm_len, scratch, prk_out) nx_hkdf384_expand(prk, info, info_len, okm_len, scratch, okm_out) Verified vs RFC-style cross-check against Node OpenSSL HKDF-SHA-384. license_tier: INDEPENDENT_REDERIVE genealogy_id: international-research-sources/ietf/rfc_5869 + rfc_4231 lineage_id: nishi_hkdf_sha384_wasm_q1 safe_shift_audit: rotr-style (shift exponent = nn, mask exponent = 64-nn; differs -> safe)

dependencies 0 imports · 0 importers

imports: none

imported by: nobody (leaf or entry point)

structs

none

consts

21const W_OFF: i64 = 200
22const HMAC_B: i64 = 128

functions

24func _rotr64(x: i64, n: i64) -> i64
called by 1: _sha512_compress
32func _be64_read(buf: *u8, off: i64) -> i64
called by 1: _sha512_compress
44func _be64_write(buf: *u8, off: i64, v: i64) -> i64
56func _i64_le_get(buf: *u8, idx: i64) -> i64
called by 1: _sha512_compress
63func _i64_le_set(buf: *u8, idx: i64, v: i64) -> i64
called by 1: _sha512_compress
75func _h_get(ctx: *u8, i: i64) -> i64
82func _h_set(ctx: *u8, i: i64, v: i64) -> i64
95func _sha512_k(i: i64) -> i64
called by 1: _sha512_compress
139func _sha512_compress(ctx: *u8) -> i64
194func _sha512_init(ctx: *u8) -> i64
called by 2: _sha512_one_shot_hmac_sha512 calls 1: _h_set
208func _sha512_one_shot(in_ptr: *u8, in_len: i64, ctx: *u8, out_ptr: *u8) -> i64
260func _hmac_sha512(key_ptr: *u8, key_len: i64,
345func nx_hkdf384_extract(salt_ptr: *u8, salt_len: i64,
calls 1: _hmac_sha512
369func nx_hkdf384_expand(prk_ptr: *u8, info_ptr: *u8, info_len: i64,
calls 1: _hmac_sha512