Skip to content

Blowfish OFB Block Cipher Mode Support#2892

Merged
justsmth merged 5 commits intoaws:mainfrom
skmcgrail:blowfish-ocb
Dec 11, 2025
Merged

Blowfish OFB Block Cipher Mode Support#2892
justsmth merged 5 commits intoaws:mainfrom
skmcgrail:blowfish-ocb

Conversation

@skmcgrail
Copy link
Copy Markdown
Member

@skmcgrail skmcgrail commented Dec 8, 2025

Description of changes:

  • Users of PyCA cryptography are not able to use Blowfish for their legacy use cases, as we forgot to remove the OPENSSL_NO_BF define when we re-added support for these decrepit algorithms.
  • Blowfish was missing the OFB block cipher mode implementation that was present in OpenSSL. I have brought this implementation over and updated the types and function signatures. Which is also a mode support by PyCA cryptography.

Testing:

There doesn't really appear to be much extensive OFB KATs available, so I've extended the current test data using the OpenSSL 1.1.1 APIs:

$ echo -n "plaintextHexStr" | xxd -p -r > plaintext.txt
$ openssl enc -bf-ofb -in plaintext.txt -out ciphertext -K <keyHex>  -iv  <ivHex>
$ xxd -i < ciphertext

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@skmcgrail skmcgrail requested a review from a team as a code owner December 8, 2025 23:51
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@skmcgrail skmcgrail force-pushed the blowfish-ocb branch 4 times, most recently from ce1cdd7 to c449e22 Compare December 9, 2025 00:16
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.26%. Comparing base (f5e4585) to head (38374c3).
⚠️ Report is 44 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2892      +/-   ##
==========================================
+ Coverage   78.22%   78.26%   +0.04%     
==========================================
  Files         683      683              
  Lines      117491   117604     +113     
  Branches    16510    16516       +6     
==========================================
+ Hits        91909    92045     +136     
+ Misses      24694    24674      -20     
+ Partials      888      885       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

justsmth
justsmth previously approved these changes Dec 10, 2025
@justsmth justsmth merged commit 04b2db3 into aws:main Dec 11, 2025
466 of 473 checks passed
justsmth pushed a commit that referenced this pull request Dec 12, 2025
## What's Changed
* Add encap/decapKeyCheck support in ACVP by @samuel40791765 in
#2872
* Clarify comments and API behaviour for equal-preference for TLS 1.3 by
@torben-hansen in #2873
* Add support for external contexts in ML-DSA ACVP by @samuel40791765 in
#2880
* Route ML-DSA ACVP to the right APIs by @samuel40791765 in
#2884
* Add sha1 CLI by @nhatnghiho in #2885
* Fix openssl comparison tests by @justsmth in
#2888
* tool-openssl: pkcs8 error output on decrypt by @justsmth in
#2883
* Add RSA_X931_PADDING to rsa.h by @justsmth in
#2889
* Bump urllib3 from 2.5.0 to 2.6.0 in /tests/ci by @dependabot[bot] in
#2886
* Run ACCP integration tests on aarch64 by @WillChilds-Klein in
#2894
* Blowfish OFB Block Cipher Mode Support by @skmcgrail in
#2892

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC 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.

4 participants