Hacker News new | ask | show | jobs
by taterbase 3836 days ago
I wasn't aware of CBC at the time of writing this comment, thanks for pointing it out to me.

It seems if you lose any 32 bytes though you've lost the trail of encryption as you can't decrypt any subsequent pieces.

After reading other comments I think the only reliable solution is chacha20 where each packet can be encrypted/decrypted independently of others.

1 comments

https://upload.wikimedia.org/wikipedia/commons/2/2a/CBC_decr...

Let's assume CBC with AES. It encrypts in 16 byte blocks. If you slightly corrupt one block, you will fail to decrypt it entirely, and it will slightly corrupt the block after, but everything else will be fine.

There are modes of encryption where losing one bit will corrupt all subsequent bits.

There are also modes like GCM or stream ciphers like ChaCha20 where one corrupted bit will not corrupt any other bits at all.

In short: There are many options, and half of them are suitable for this.