Skip to content

test/docs: verify Wycheproof downloads and document that JS-side secrets aren't zeroized #154

Done

Description

@WingZer0o

Part of #152 / #129. Fixes the Wycheproof and JS-secrets items of #127. The Argon2 item is fixed by #140 and the error-string item by #147.

Wycheproof integrity (scripts/fetch-wycheproof.mjs)

  • Only follow HTTPS, including after redirects, as cas-lib 0.6.0 does for its fetcher.
  • After resolving WYCHEPROOF_REF to a commit SHA, fetch that commit's tree from the GitHub API and check each downloaded file's git blob SHA-1 against it. Fail on a mismatch. This keeps the "always newest vectors" behaviour from CLAUDE.md, but ties each file to the logged commit.

JS-side secrets

  • Add a "Secret key material" section to README.md, mirroring cas-lib's crate-level docs:
    • the global ZeroAlloc zeroes freed Rust heap memory;
    • keys, passwords and shared secrets passed as Array<number> / string, or returned to JS, live on the V8 heap until garbage collection, and can't be wiped reliably;
    • keep them short-lived.
  • Add a short note in the JSDoc of key-returning methods, or link the README section from docs/EXAMPLES.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions