Skip to content

crypto: make caller-controlled boundaries explicit - #71

Merged
loadingalias merged 1 commit into
mainfrom
t9-misuse-resistant-api
Jul 28, 2026
Merged

crypto: make caller-controlled boundaries explicit#71
loadingalias merged 1 commit into
mainfrom
t9-misuse-resistant-api

Conversation

@loadingalias

Copy link
Copy Markdown
Owner

Summary

  • validate borrowed BLAKE2 keys once and return typed errors for variable-output misuse
  • keep normal AEAD sealing responsible for nonce issuance while placing caller-nonce operations and platform overrides behind explicit expert namespaces
  • remove panicking entropy constructors and root-level diagnostic or dangerous exports
  • update affected benchmarks, fuzz and constant-time harnesses, migration guidance, tests, and minor release intent

Performance

The change adds no dependencies, allocations, dynamic dispatch, or new cryptographic indirection. Successful BLAKE2 hot-path code generation remains materially unchanged. The representative AEAD measurement changed by +0.10% with p = .76, so no performance change was detected.

Validation

  • just check
  • just test-all — 1,673 tests passed, 1 skipped; 218 doctests passed
  • just test-feature-matrix — 38/38 profiles passed
  • just check-all --skip-feature-matrix rscrypto
  • official BLAKE2 vectors and portable/backend differential tests
  • changed fuzz-package and constant-time tool builds
  • just push
  • git diff --check

Use validated borrowed BLAKE2 keys and fallible variable outputs, and move caller-nonce sealing, platform overrides, and secret formatting behind expert namespaces. Preserve allocation-free static dispatch and existing cryptographic kernels.
@loadingalias
loadingalias force-pushed the t9-misuse-resistant-api branch from d76f6cb to 1b462ae Compare July 28, 2026 13:09
@loadingalias
loadingalias merged commit c14119d into main Jul 28, 2026
15 checks passed
@loadingalias
loadingalias deleted the t9-misuse-resistant-api branch July 28, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant