Skip to content

build(crypto): drop unused rsa pkcs5 feature - #1071

Merged
Xuanwo merged 1 commit into
mainfrom
xuanwo/remove-unused-rsa-pkcs5
Nov 25, 2026
Merged

Xuanwo merged 1 commit into
mainfrom
xuanwo/remove-unused-rsa-pkcs5

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 25, 2026

Copy link
Copy Markdown
Member

Summary

Dependency effect

cargo tree -p reqsign-crypto-rustcrypto --edges normal shrinks from 70 to 64 unique packages (175 to 153 tree lines) and removes:

block-padding, cbc, pbkdf2, pkcs5, salsa20, scrypt

rsa still has default + pkcs1v15; p256 and aes-gcm remain. The repository does not track Cargo.lock; the local untracked lockfile was refreshed by cargo.

RSA behavior

Positive:

  • cargo test --locked -p reqsign-crypto-rustcrypto --test provider — 14 passed, including rsa_signs_both_pkcs8_and_pkcs1_pem and the deterministic PKCS#1/PKCS#8 signature vector.
  • cargo test --locked -p reqsign-oracle --test private_key_formats — 10 passed, including PKCS#1 and PKCS#8 signing.

Negative:

  • encrypted_private_keys_are_rejected_without_mutating_request passes and asserts CredentialInvalid without changing the request.

Verification

All pass at head 5619764c9f062d995148b40f1f688c3b3cbb3698 on base 04cabf2e724f2d02a4c2e1f4ad4986f1de3e65ba:

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --no-fail-fast
  • cargo test --doc --all-features --workspace
  • cargo test -p reqsign --all-features --tests
  • cargo test -p reqsign --no-default-features --features default-context --test crypto_without_default_crypto
  • cargo build --workspace
  • cargo check -p reqsign-crypto-rustcrypto --target wasm32-unknown-unknown
  • crypto dependency boundary script and its 8 unit tests

Part of #1069. This does not implement full feature slicing or change the OpenDAL SMB lockfile policy.

The RustCrypto backend only accepts unencrypted PKCS#8 and PKCS#1 RSA private keys, so rsa's pkcs5 feature is unused. Removing it drops pkcs5, scrypt, salsa20, cbc, pbkdf2, and block-padding from the dependency graph.

Part of #1069.
@Xuanwo
Xuanwo merged commit 895a0df into main Nov 25, 2026
15 checks passed
@Xuanwo
Xuanwo deleted the xuanwo/remove-unused-rsa-pkcs5 branch November 25, 2026 17:14
@Xuanwo
Xuanwo restored the xuanwo/remove-unused-rsa-pkcs5 branch November 25, 2026 18:42
@Xuanwo
Xuanwo deleted the xuanwo/remove-unused-rsa-pkcs5 branch November 25, 2026 18:46
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