Validate the challenge's matmul params before any n×n allocation (audit
M-1). Bounds n/r so a pathological/forged envelope can't trigger a
multi-GB allocation or a RangeError (n≥65536 overflows the Uint32Array
index); mirrors the Rust kernel's from_hex checks so pure-JS and WASM reject
the same inputs. Throws a clear Error on violation.
Validate the challenge's matmul params before any
n×nallocation (audit M-1). Boundsn/rso a pathological/forged envelope can't trigger a multi-GB allocation or aRangeError(n≥65536overflows the Uint32Array index); mirrors the Rust kernel'sfrom_hexchecks so pure-JS and WASM reject the same inputs. Throws a clearErroron violation.