Skip to main content
The 2024 Developer Survey results are live! See the results
3 of 5
deleted 34 characters in body
Giacomo1968
  • 56.2k
  • 23
  • 167
  • 214

Issue Decrypting File with OpenSSL: "hex string is too short, padding with zero bytes to length"

I'm encountering an issue while trying to decrypt a file using Open SSL. I have a file named fc382Crypto.bin provided by my instructor, and I need to decrypt it using the blowfish algorithm with CBC mode.

Here's the command I'm using to decrypt the file:

openssl enc -aes-128-cbc -d -in fc382Crypto.bin -out decrypted_output.txt -K 112233445566778899 -iv 0000000000000000

However, I keep getting the following error:

hex string is too short, padding with zero bytes to length
hex string is too short, padding with zero bytes to length
bad decrypt

I've tried adjusting the command by adding the -nopad option, but the issue persists. I've also verified the integrity of the fc382Crypto.bin file to ensure it hasn't been corrupted.

The encryption settings provided by my instructor are as follows:

Algorithm: Blowfish
Mode: CBC
Key: 112233445566778899
IV: 0

I'm not sure why I'm encountering this error or how to resolve it. Can someone please provide guidance on how to decrypt this file correctly using OpenSSL?

enter image description here