7 ms·
Are you talking about compressing plain text larger than a block, then encrypting per each block of the compressed output?
by IncRnd 10y ago
Are you talking about compressing plain text larger than a block, then encrypting per each block of the compressed output?
- lisper 10y agoYes, of course. What would be the alternative?
- IncRnd 10y agoThank you. Your comment wasn’t clear for several reasons. Stream ciphers are regularly blocked in TLS, compression can occur per block. Compression may be done per block, not just against a file larger than a single block.
- witty_username 10y ago@lisper Stream ciphers.
- lisper 10y agoWhy would you use a stream cipher to encrypt a document?
- deleted 10y ago[deleted]
- StavrosK 10y agoWhy wouldn't you?
- lisper 10y agohttp://security.stackexchange.com/questions/334/advantages-and-disadvantages-of-stream-versus-block-ciphers http://security.stackexchange.com/questions/334/advantages-a... Not that this really matters. The advantages/disadvantages of compression are the same in both cases.
- s_tec 10y agoThe AES-GCM mode of operation turns the AES block cipher into a stream cipher. Doing this makes it possible to add authentication on top for relatively cheap. The ChaCha20-poly1305 has a similar construction. These are the two most secure and efficient ciphers available in TLS, so they get a lot of use. If you are sending documents over HTTPS, you definitely want them encrypted with one of these two.
- lisper 10y agoFair enough, I concede the point.
- niftich 10y agoIn GCM, the 'C' is for counter, and hence turning AES into a stream cipher. This part is usually known as 'AES-CTR'. The 'G' is Galois for 'Galois field multiplication', which allows for a parallelizable way of computing a MAC. AES-GCM packages AES-CTR (a stream cipher made from a block cipher) and GMAC (the Galois MAC) together into a primitive. This type of scheme, which combines confidentiality, integrity, and authenticity is called 'authenticated encryption with associated data' (AEAD) [1]. A stream cipher is the easiest way of accomplishing that the cipherstream will safely expand to cover all the plaintext. Other famous AEAD schemes are: - CCM (Counter with CBC-MAC), packages AES-CTR and CBC-MAC together in an authenticate-then-encrypt regime - ChaCha20-Poly1305, which packages together the stream cipher ChaCha20 and the MAC Poly1305. [1] https://en.wikipedia.org/wiki/Authenticated_encryption https://en.wikipedia.org/wiki/Authenticated_encryption