Skip to content

Conversation

@reaperhulk
Copy link
Member

@reaperhulk reaperhulk commented May 1, 2025

This resolves the changes the OpenSSL 3.5 FIPS provider made:

  • PSS salt length must match digest length
  • OAEP decryptions will reject ciphertext if it's not in the range of 1 < ct < (n - 1)
  • For PSS inner MGF1 hash must match outer hash.

This also updates an X509 PSS cert test vector to replace the max salt length with a digest salt length.

Depends on C2SP/wycheproof#145 (at which point I can update the wycheproof hash in this PR and remove the workaround)

alex and others added 5 commits April 30, 2025 07:15
This replaces the rsa_pss_cert.pem with a new one that uses a salt
length matching the digest length (previously it was max length)
@alex
Copy link
Member

alex commented May 1, 2025

Ok, looks good pending wycheproof merging the changes

@reaperhulk reaperhulk marked this pull request as ready for review May 2, 2025 14:30
@alex alex merged commit b326c3c into pyca:main May 2, 2025
67 checks passed
@reaperhulk reaperhulk deleted the fips-fixes branch May 2, 2025 14:32
alex added a commit to alex/cryptography that referenced this pull request May 2, 2025
* attempt to fix wycheproof in CI on centos stream9

skip RSA PSS with SHA224

* Update test_rsa.py

* Update backend.py

* fix

* make OpenSSL 3.5 FIPS work

This replaces the rsa_pss_cert.pem with a new one that uses a salt
length matching the digest length (previously it was max length)

* simplify

* comment

* fix

* update with new wycheproof

---------

Co-authored-by: Alex Gaynor <[email protected]>
reaperhulk added a commit that referenced this pull request May 2, 2025
* FIPS fixes (#12839)

* attempt to fix wycheproof in CI on centos stream9

skip RSA PSS with SHA224

* Update test_rsa.py

* Update backend.py

* fix

* make OpenSSL 3.5 FIPS work

This replaces the rsa_pss_cert.pem with a new one that uses a salt
length matching the digest length (previously it was max length)

* simplify

* comment

* fix

* update with new wycheproof

---------

Co-authored-by: Alex Gaynor <[email protected]>

* chore(deps): bump openssl-sys from 0.9.107 to 0.9.108 (#12832)

Bumps [openssl-sys](https://github.com/sfackler/rust-openssl) from 0.9.107 to 0.9.108.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](rust-openssl/rust-openssl@openssl-sys-v0.9.107...openssl-sys-v0.9.108)

---
updated-dependencies:
- dependency-name: openssl-sys
  dependency-version: 0.9.108
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test on libressl 4.1.0 (#12845)

* 44.0.3 release

* Make wycheproof x25519 and x448 tests more flexible (#12676)

* Update test_x448.py

* Update test_x25519.py

* Update test_x25519.py

* Update test_x448.py

* fix mitmproxy downstream tests (#12776)

* clippy nightly fixes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Paul Kehrer <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants