Hacker News new | ask | show | jobs
by norcimo5 3281 days ago
To encrypt: tar cz foo | openssl aes-256-cbc -salt -out foo.enc

To decrypt: openssl aes-256-cbc -d -in foo.enc | tar xz

(foo can be a file or directory)

1 comments

This does not contain a MAC though, does it? Also why CBC? Why not CTR/GCM instead? And why AES256 instead of Chacha20-Poly1305 or some other modern AEAD?
What are the advantages of GCM over CBC? And whats wrong with AES256?
- GCM unlike CBC is an AEAD mode (has a MAC build-in)

- CBC needs padding, which when misused can lead to padding oracle attacks

- GCM allows for parallel encryption

> And whats wrong with AES256?

There are more modern, faster and better ciphers that are designed to not be vulnerable against many side-channel attacks that AES is difficult to protect against.