nx_hkdf_sha384_wasm.nx
buildroot/runtime/nx_hkdf_sha384_wasm.nx
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
| 21 | const W_OFF: i64 = 200 |
| 22 | const HMAC_B: i64 = 128 |
functions
| 24 | func _rotr64(x: i64, n: i64) -> i64 called by 1: _sha512_compress |
| 32 | func _be64_read(buf: *u8, off: i64) -> i64 called by 1: _sha512_compress |
| 44 | func _be64_write(buf: *u8, off: i64, v: i64) -> i64 |
| 56 | func _i64_le_get(buf: *u8, idx: i64) -> i64 called by 1: _sha512_compress |
| 63 | func _i64_le_set(buf: *u8, idx: i64, v: i64) -> i64 called by 1: _sha512_compress |
| 75 | func _h_get(ctx: *u8, i: i64) -> i64 |
| 82 | func _h_set(ctx: *u8, i: i64, v: i64) -> i64 |
| 95 | func _sha512_k(i: i64) -> i64 called by 1: _sha512_compress |
| 139 | func _sha512_compress(ctx: *u8) -> i64 called by 2: _sha512_one_shot_hmac_sha512 calls 7: _be64_read_i64_le_set_i64_le_get_rotr64_h_get_sha512_k+1 |
| 194 | func _sha512_init(ctx: *u8) -> i64 |
| 208 | func _sha512_one_shot(in_ptr: *u8, in_len: i64, ctx: *u8, out_ptr: *u8) -> i64 |
| 260 | func _hmac_sha512(key_ptr: *u8, key_len: i64, |
| 345 | func nx_hkdf384_extract(salt_ptr: *u8, salt_len: i64, calls 1: _hmac_sha512 |
| 369 | func nx_hkdf384_expand(prk_ptr: *u8, info_ptr: *u8, info_len: i64, calls 1: _hmac_sha512 |