try to document changes in salt handling for the 'enc' command
authorEasySec <easy.sec@free.fr>
Mon, 3 May 2021 22:24:24 +0000 (00:24 +0200)
committerMatt Caswell <matt@openssl.org>
Thu, 6 May 2021 10:24:30 +0000 (11:24 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4486)

doc/man1/openssl-enc.pod.in

index 8c4812c831e09429bc01bb49903055c83a722566..e744c8344bd2ed4a7cd2fae8ae4590cb357e95e6 100644 (file)
@@ -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