]> git.codecow.com Git - Monocypher.git/commitdiff
Mentinned the Double Ratchet Algorithm
authorLoup Vaillant <loup@loup-vaillant.fr>
Sun, 10 Dec 2017 20:00:45 +0000 (21:00 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sun, 10 Dec 2017 20:45:56 +0000 (21:45 +0100)
This is better than the half assed explanation about authenticating keys
with `crypto_lock`

doc/man/man3/crypto_key_exchange.3monocypher
doc/man/man3/crypto_x25519.3monocypher

index 11d7d9de1086c6ef5dbd56073d56667a1765e0d2..3c686dd6887f9528fc88e35130b480d5a7171a35 100644 (file)
@@ -31,7 +31,6 @@ See
 .Xr intro 3monocypher
 for advice about generating random bytes (use the operating system's
 random number generator).
-.Pp
 .Sh RETURN VALUES
 Some public keys force the shared key to a known constant.
 .Fn crypto_key_exchange
@@ -77,8 +76,5 @@ uses HChacha20 as well.
 .Sh SECURITY CONSIDERATIONS
 If either of the long term secret keys leaks, it may compromise
 .Em all past messages .
-Users who want forward secrecy need to generate temporary public keys,
-send them to one another, (use
-.Xr crypto_lock 3monocypher
-to authenticate them), and compute a shared secret with those
-temporary keys.
+This can be avoided by using protocols that provide forward secrecy,
+such as the Double Ratchet Algorithm.
index edc6374eb09e242cdd8ece54a3eb219e3e65a950..d05ee8f4d666443b564cbe53727d74e2fa81ac9e 100644 (file)
@@ -23,7 +23,7 @@ Do not use it directly as a session key.
 Hash it with
 .Xr crypto_chacha20_H 3monocypher
 or
-.Xr crypto_blake2b 3monocypher 
+.Xr crypto_blake2b 3monocypher
 first.
 .Pp
 .Fn crypto_x25519
@@ -57,7 +57,8 @@ uint8_t *key_1 = shared_keys;      /* Shared key 1             */
 uint8_t *key_2 = shared_keys + 32; /* Shared key 2             */
 crypto_blake2b(shared_keys, shared_secret, 32);
 /* Wipe the secret /
-crypto_wipe(shared_secret, 32);    
+crypto_wipe(shared_secret, 32);
+.Ed
 .Sh SEE ALSO
 .Xr crypto_key_exchange 3monocypher ,
 .Xr intro 3monocypher
@@ -66,11 +67,8 @@ This function implements X25519, described in RFC 7748.
 .Sh SECURITY CONSIDERATIONS
 If either of the long term secret keys leaks, it may compromise
 .Em all past messages .
-Users who want forward secrecy need to generate temporary public keys,
-send them to one another, (use
-.Xr crypto_lock 3monocypher
-to authenticate them), and compute a shared secret with those
-temporary keys.
+This can be avoided by using protocols that provide forward secrecy,
+such as the Double Ratchet Algorithm.
 .Sh IMPLEMENTATION DETAILS
 The most significant bit of the public key is systematically ignored.
 It is not needed because every public key should be smaller than