ReviewOS

home-lang/home

Port Bun crypto algorithm alias normalization

#638
Closed chris opened this 10 days ago ·
10 days ago

Track the remaining node:crypto compatibility gap exposed by Bun test/js/node/crypto/node-crypto.test.js.

Current Home Debug baseline: 159 pass / 28 fail. All failures come from shared algorithm-name resolution across crypto.createHash, crypto.hash, and Bun.CryptoHasher: case-insensitive SHAKE aliases (including shake-128/shake-256), mixed-case blake2s256, and mixed-case HMAC names.

Port the upstream Bun alias-table semantics at the shared native/runtime layer; do not special-case assertions or weaken the upstream test.

10 days ago

Resolved on main by 635328f35776eada816ad7f65da5894a9cea7f05 (feat(crypto): port Bun algorithm alias normalization).

The port adds the upstream shake-128/shake-256 aliases, makes EVP/RustCrypto dispatch share one ASCII-case-insensitive lookup, canonicalizes the Home JSC hash bridge, and preserves optional HMAC keys through Bun.CryptoHasher.

Validation against unmodified Bun tests:

  • js/node/crypto/node-crypto.test.js: 159 pass / 28 fail → 187 pass / 0 fail in Debug; 187/0 in true ReleaseFast (341 assertions)
  • js/bun/util/bun-cryptohasher.test.ts: 397 pass / 0 fail in Debug and true ReleaseFast (55,642 assertions)
  • checked-in copies: 187/0 and 397/0 in Debug
  • exact Debug and ReleaseFast builds completed cleanly

No test source, assertion, workload, timeout, or skip was changed.

Sign in to comment on this issue.