RustCrypto / block-ciphers

Collection of block cipher algorithms written in pure Rust
677 stars 130 forks source link

Support for Keys Longer Than 56 Bytes in the Blowfish Implementation #450

Closed AHK66 closed 2 months ago

AHK66 commented 2 months ago

Is there any possibility that the Blowfish implementation might support keys longer than 56 bytes in some way in the future? Unfortunately, I’m in a situation where I have to work with a 64-byte key due to historical reasons. Thank you for any feedback.

Best wishes, AHK66

tarcieri commented 2 months ago

448-bits is the maximum Blowfish key size.

My understanding is that any other key material would be unused for larger sizes. You may be able to achieve compatibility with whatever other implementation supports misuse with a larger key by truncating the key to 448-bits.

That said, I don’t think this makes sense for us to support.