summaryrefslogtreecommitdiffstats
path: root/doc/man1/openssl-enc.pod.in
diff options
context:
space:
mode:
authorEasySec <easy.sec@free.fr>2021-05-04 00:24:24 +0200
committerMatt Caswell <matt@openssl.org>2021-05-06 12:24:30 +0200
commitb86fa8c55682169c88e14e616170d6caeb208865 (patch)
tree204b3f921e0034a7d38a2ba3e444b4fadfc15d11 /doc/man1/openssl-enc.pod.in
parentchange salt handling, way 1 (diff)
downloadopenssl-b86fa8c55682169c88e14e616170d6caeb208865.tar.xz
openssl-b86fa8c55682169c88e14e616170d6caeb208865.zip
try to document changes in salt handling for the 'enc' command
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4486)
Diffstat (limited to 'doc/man1/openssl-enc.pod.in')
-rw-r--r--doc/man1/openssl-enc.pod.in10
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/man1/openssl-enc.pod.in b/doc/man1/openssl-enc.pod.in
index 8c4812c831..e744c8344b 100644
--- a/doc/man1/openssl-enc.pod.in
+++ b/doc/man1/openssl-enc.pod.in
@@ -143,6 +143,8 @@ encrypting, this is the default.
=item B<-S> I<salt>
The actual salt to use: this must be represented as a string of hex digits.
+If this option is used while encrypting, the same exact value will be needed
+again during decryption.
=item B<-K> I<key>
@@ -230,9 +232,11 @@ OpenSSL.
Without the B<-salt> option it is possible to perform efficient dictionary
attacks on the password and to attack stream cipher encrypted data. The reason
for this is that without the salt the same password always generates the same
-encryption key. When the salt is being used the first eight bytes of the
-encrypted data are reserved for the salt: it is generated at random when
-encrypting a file and read from the encrypted file when it is decrypted.
+encryption key.
+
+When the salt is generated at random (that means when encrypting using a
+passphrase without explicit salt given using B<-S> option), the first bytes
+of the encrypted data are reserved to store the salt for later decrypting.
Some of the ciphers do not have large keys and others have security
implications if not used correctly. A beginner is advised to just use