]> git.codecow.com Git - Monocypher.git/commitdiff
Removed redundant explanation
authorLoup Vaillant <loup@loup-vaillant.fr>
Wed, 14 Feb 2018 19:32:53 +0000 (20:32 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Wed, 14 Feb 2018 19:32:53 +0000 (20:32 +0100)
Pointing to RFC 7539 was enough.

doc/man/man3/crypto_lock.3monocypher

index c476b9ee77a1a3e8fae2e3fe538fc7b46fbe7ff1..8b8c93d078250a7e17d9df17ae88266df0304eb4 100644 (file)
@@ -259,41 +259,3 @@ These functions implement RFC 7539, with XChacha20 instead of Chacha20.
 XChacha20 derives from Chacha20 the same way XSalsa20 derives from
 Salsa20, and benefits from the same security reduction (proven secure
 as long as Chacha20 itself is secure).
-.Pp
-Authenticated encryption is equivalent to the following:
-.Bl -bullet
-.It
-Generate an XChacha20 random stream as long as the message, plus 64
-bytes.
-The parameters are the session key and the message nonce.
-.It
-Use the first 32 bytes of the stream as the authentication key.
-.It
-Discard the next 32 bytes of the stream.
-.It
-Xor the rest of the stream (starting at byte 64) with the message to
-encrypt it.
-.It
-Encode the length of the additional data and the encrypted message as 64
-bits little endian unsigned integers.
-.It
-Pad the additional data with zeroes, up to the next multiple of 16
-bytes.
-Padding length ranges from 0 to 15 bytes.
-.It
-Pad the encrypted message with zeroes, up to the next multiple of 16
-bytes.
-Padding length ranges from 0 to 15 bytes.
-.It
-Concatenate the padded additional data, the padded encrypted message,
-the encoded length of the additional data, and the encoded length of the
-encrypted message, in that order.
-Authenticate the result with Poly1305, with the authentication key
-generated above.
-This will produce a 16 byte message authentication code.
-.It
-The nonce, encrypted message, and message authentication code can now be
-sent or archived.
-Recovering the message and assessing its integrity will require the
-session key.
-.El