From: Fabio Scotoni <34964387+fscoto@users.noreply.github.com> Date: Mon, 2 Mar 2020 08:53:09 +0000 (+0100) Subject: crypto_sign example: sign the *entire* message X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=e202b0055bcd6d09e927ab001266a40ca9c3240b;p=Monocypher.git crypto_sign example: sign the *entire* message --- diff --git a/doc/man/man3/crypto_sign.3monocypher b/doc/man/man3/crypto_sign.3monocypher index f9a5cc8..87bc697 100644 --- a/doc/man/man3/crypto_sign.3monocypher +++ b/doc/man/man3/crypto_sign.3monocypher @@ -173,7 +173,7 @@ Sign a message: .Bd -literal -offset indent uint8_t sk [32]; /* Secret key from above */ const uint8_t pk [32]; /* Matching public key */ -const uint8_t message [10] = "Lorem ipsu"; /* Message to sign */ +const uint8_t message [11] = "Lorem ipsu"; /* Message to sign */ uint8_t signature[64]; crypto_sign(signature, sk, pk, message, 10); /* Wipe the secret key if it is no longer needed */ @@ -183,7 +183,7 @@ crypto_wipe(sk, 32); Check the above: .Bd -literal -offset indent const uint8_t pk [32]; /* Their public key */ -const uint8_t message [10] = "Lorem ipsu"; /* Signed message */ +const uint8_t message [11] = "Lorem ipsu"; /* Signed message */ const uint8_t signature[64]; /* Signature to check */ if (crypto_check(signature, pk, message, 10)) { /* Message is corrupted, abort processing */