Skip to content

refactor(crypto): confine implementation dependencies to crypto/* - #976

Open
Xuanwo wants to merge 2 commits into
mainfrom
xuanwo/scope-crypto-dependencies
Open

Xuanwo wants to merge 2 commits into
mainfrom
xuanwo/scope-crypto-dependencies

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 20, 2026

Copy link
Copy Markdown
Member

Closes #975.

Direct cryptographic implementation dependencies now live only under crypto/*. The seven inherited raw dependencies (aes-gcm, getrandom, hmac, p256, rsa, sha1, sha2) are declared directly by reqsign-crypto-rustcrypto instead of the root workspace, and the service test suites use fixed synthetic fixtures plus recording providers instead of runtime key generation and direct backend verification.

The service tests still check the protocol-level behavior independently: canonical signing inputs, PKCS#1/PKCS#8 and LF/CRLF PEM handling, encrypted-PEM and public-key rejection, fixed RS256 JWT vectors, AWS SigV4a scalar derivation and DER-hex wrapping, and Tink CAB key/nonce/AAD/plaintext plus protobuf and wire framing. Backend algorithm correctness remains covered by the provider crates.

A manifest check now rejects direct cryptographic implementation crates outside crypto/* in normal, dev, and build dependency kinds, including renamed packages, target-specific tables, and unused root [workspace.dependencies] entries. The existing resolved production graph check remains in place. docs/crypto-provider.md documents the stricter boundary.

Validation on the PR head:

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --no-fail-fast
  • RUSTDOCFLAGS='--cfg docsrs' cargo +nightly test --doc --all-features --workspace
  • cargo +1.87.0 check --workspace --all-targets --all-features
  • core, RustCrypto, aws-core, and aws-v4a checks plus both facade WASM builds
  • hawkeye check
  • manifest boundary check and its synthetic corner-case tests
  • per-root production cargo tree --all-features --target all --edges normal gate

This branch has not been deployed

No deployments
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.

refactor(crypto): remove direct cryptographic crate dependencies outside crypto/*

2 participants