News for hackers. Stuff that matters.
Re:“Should you encrypt or compress first?” by lisper on Tuesday June 28, 2016 @12:29PM (#11995109)
Why would you use a stream cipher to encrypt a document?
Re:“Should you encrypt or compress first?” by niftich on Tuesday June 28, 2016 @03:13PM (#11996625)
In 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

Re:“Should you encrypt or compress first?” by s_tec on Tuesday June 28, 2016 @02:51PM (#11996416)
The 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.
Re:“Should you encrypt or compress first?” by lisper on Tuesday June 28, 2016 @03:08PM (#11996583)
Fair enough, I concede the point.
Re:“Should you encrypt or compress first?” by StavrosK on Tuesday June 28, 2016 @01:21PM (#11995590)
Why wouldn't you?
Re:“Should you encrypt or compress first?” by lisper on Tuesday June 28, 2016 @01:49PM (#11995849)
http://security.stackexchange.com/questions/334/advantages-a...

Not that this really matters. The advantages/disadvantages of compression are the same in both cases.