Known-plaintext attack
en.wikipedia.org
en.wikipedia.org
Does anyone know if TLS/HTTPS does padding or tries to alter the length of ciphertext? I ask because a specific length for a specific request that is known to be a certain Wikipedia page (for example: https://en.wikipedia.org/wiki/Islamic_State_of_Iraq_and_the_...) means certain encrypted request's plaintext are known to an adversary. Is each encrypted network request's ciphertext different or padded to a new size?
RSA encryption was popular for SSL/TLS but because it does provide forward secrecy it was deprecated. These days RSA is only used in digital signatures (which are not encryption) while key exchange is done using Diffie Hellman (specifically ECDHE).
CBC mode cipher suites used to add up to 8 bytes of padding (for deprecated 3DES) and up to 16 bytes of padding for AES, but the mac-then-encrypt TLS construction turned out to be very hard to implement correctly, so TLS 1.3 only allows modes based on CTR (AES GCM, CCM and ChaCha20-Poly1305) so not even minimal padding is done.
s/does/doesn't/ there.
AFAIK digital signatures are created by encrypting the hash of the plaintext (be it content ofthe certificate or a message or whatnot). But yeah, RSA isn't really used for key exchanges due to it lacking forward secrecy. There are exceptions to this unfortunately, such as Apple's iMessage which is decades behind in cryptographic innovation.
If you want to point out the difference between "public key operation" (encrypt, verify) and "private key operation" (decrypt, sign), use those terms. That makes sense and the distinction is important.
People end up with basically misinformation in their heads and other people on stackoverflow (and IRL) spend lots of time trying to sort them out. You just made the problem a little worse. Please don't do that.
Here is an actual cryptographer explaining: https://security.stackexchange.com/a/87373/70830
While you are right in principle (generally: all encryption schemes explicitly exclude message length from their confidentiality claims), in practice, some parts are user-specific (such as the username if you are logged in, and which compression algorithm is selected).
That said, the ideal encryption tunnel is one which is always running, transmitting a random stream that is likely encrypting a sequence of zeroes most of the time. The energy consumption may be problematic however.
[1]: https://datatracker.ietf.org/doc/html/rfc8446#section-5.4
So if you want to be protected agains this side-channel problem you can use Connection: Keep-Alive header along with Range header to split each request into a few Range requests.
As TLS pads data to the block size you can introduce uncertainty of 0-8 bytes per chunk. Put some random delays between chunks and while it will be slower and with a bit higher overhead passive attacker won't tell if you're requesting one article in chunks or a few other.
And all this can be implemented client-side.
The presentation has detail of analysis of the different cipher in use at the time. Also fascinating historical details of the technical work done, for example:
- Some of the breakthroughs in cryptanalysis were only possible because one day, one of the German Engima machine operators had to resend the same message twice, due to a transmission error. However he/she forgot to rotate the encoding mechanism.
- Colossus was considered so secret that after the war it was destroyed on purpose.
- The creator of Colossus managed to cross the border and escape the German army just by a 3 hours difference.