T
T
Taras252020-09-27 19:47:46
Cryptography
Taras25, 2020-09-27 19:47:46

Is it possible to find out the initialization vector for blowfish in CBC mode if the plaintext and ciphertext are known?

There is a ciphertext and a known plaintext.
The encryption key is unknown.
The algorithm is probably blowfish, the encryption mode is CBC.
To run a brute-force key (suppose there is a 32-bit key, what if you really get lucky?), I still need an IV.
Can I compute it from ciphertext and plaintext?
It seems like for this I just need to do an XOR between the second 64-bit ciphertext block and the first 64-bit plaintext block, but the experiment shows that the initialization vector is not the one that was set (well, I just encrypted the string with a certain key and vector, after which " restored" it, but it did not match the real one).
Is it even possible to get the initialization vector knowing the plaintext and the ciphertext?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Taras25, 2020-09-27
@Taras25

In short, I thought about it a little, and realized that no, the initial initialization vector (IV) cannot be found out in this way. Because ("IV" XOR "first block of plaintext") is encrypted with a key.
But you can discard the first 8-byte block of plaintext, and for the remaining block of initialization will be the first block of ciphertext.
Thus, we can brute force (at least try) using the first 8 bytes of the ciphertext as the initialization vector, while using the original ciphertext without the first 8 bytes as the ciphertext, and compare the resulting value
with the plaintext without the first 8 bytes at each decryption iteration. 8 bytes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question