Skip to content

Document RSA-OAEP default padding in PKCS#11 provider - #681

Open
olszomal wants to merge 1 commit into
OpenSC:masterfrom
olszomal:rsa_padding_mode
Open

Document RSA-OAEP default padding in PKCS#11 provider#681
olszomal wants to merge 1 commit into
OpenSC:masterfrom
olszomal:rsa_padding_mode

Conversation

@olszomal

@olszomal olszomal commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Type

  • Bug fix
  • New feature
  • Code style / formatting / renaming
  • Refactoring (no functional or API changes)
  • Build / CI related changes
  • Documentation
  • Other (please describe):

Related Issue

Close #680

Current Behavior

The PKCS#11 provider uses RSA-OAEP padding by default for RSA encryption and decryption, but this behavior is not documented.

Users decrypting ciphertext created with PKCS#1 v1.5 padding may therefore see decryption failures unless the padding mode is selected explicitly.

New Behavior

The README documents RSA-OAEP as the default padding mode and shows how to:

  • select PKCS#1 v1.5 padding for existing ciphertexts;
  • explicitly configure RSA-OAEP with SHA-256.

RSA-OAEP is used by default because OpenSSL recommends it for new applications, while PKCS#1 v1.5 padding has known security limitations, including padding oracle attacks.

Scope of Changes

Update the README and NEWS documentation only.
No provider behavior is changed.

Testing

  • Existing tests
  • New tests added
  • Manual testing

Documentation-only change.

Additional Notes

License Declaration

  • I hereby agree to license my contribution under the project's license.

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.

pkcs11prov Public Key operation error on >= 0.4.19 with OpenSSL 3.6.4

1 participant