0

Let's suppose I want a 2048-bit block encryption.

I take a 512-bit hash funcion (as Blake2b), provide a counter and a key and hash the counter and so XOR the hashed value in a ciphertext block, and repeat this process more times with different counters and keys up to the fourth key (2048/4=512=bits taken by hash function).

Will this method be vulnerable to MITM attacks?

Will this method be vulnerable to quantum attacks, and Groover's algorithm

Will I get 2048-bits of encryption strength?

phantomcraft
  • 887
  • 6
  • 14

2 Answers2

1

While it possible to construct a stream cipher from a hash function. This construction has one very serious flaw.

The largest issue is you have no nonce so if your key is reused it becomes trivial to decrypt both messages since your just xor-ing the plaintext.

What you effectively has is the following per block: Construction

Further, you will not get 2048 bits of encryption here. For instance I could attack the first 512 bits of cipher the text. Which means I only have to find the first key. Same for the second key ect... So for the entire block your only having to find 4 keys. So you effectively only increased the key length by 2 bits. This is because each key is independent of the other so in a brute-force attack changing one does not effect the other keys. So if your goal was 2048 bits of key strength it's even worse than a meet in the middle attack. It's basically only as strong as your starting keys bit length.

Also such a large key is kinda pointless for symmetric ciphers.

The post quantum security of hash functions like BLAKE2b are already quite secure especially with a 512 bit digest.

Keith
  • 123
  • 6
1

Will this method be vulnerable to MITM attacks?

What you describe is ECB mode. If you use the same key more than once, then yes, it is vulnerable to MITM attacks. The MITM can replace some blocks in one message with blocks with the same numbers from another message. The modified message will be perfectly decryptable and there is no way to determine if it was modified.

Your scheme will produce the same result for the same plaintext if the same password is used. Thus, knowing some messages it will be possible to decrypt some other messages: If some blocks with the same number are the same, then also the plain text is the same.

mentallurg
  • 2,661
  • 1
  • 17
  • 24