Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow extended keys in BlowfishEngine for interoperability #519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpboivin
Copy link

@jpboivin jpboivin commented Feb 9, 2024

As discussed in #407, this is a proposal to support non-standard key sizes in the BlowfishEngine, for interoperability with other cryptographic libraries like OpenSSL and Nettle.

I want with an approach were by default, the key is still validated to be standard, but using the new BlowfishParameters, it is possible to lift the check for the engine to handle extended keys. If a key exceeds 576 bits, only the first 576 bits of the data will be used to compute the P box. This is in line with the OpenSSL and Nettle implementations.

I've generated test vectors using OpenSSL and Nettle. I couldn't find any online (even these libs do not seem to test larger keys):
test_vectors.cpp.txt

@jpboivin jpboivin force-pushed the dev/blowfish_interoperability branch from dd78574 to 48fa32e Compare February 9, 2024 02:44
@cipherboy cipherboy self-requested a review February 9, 2024 02:46
@cipherboy cipherboy self-assigned this Apr 11, 2024
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.

None yet

2 participants