From e202b0055bcd6d09e927ab001266a40ca9c3240b Mon Sep 17 00:00:00 2001 From: Fabio Scotoni <34964387+fscoto@users.noreply.github.com> Date: Mon, 2 Mar 2020 09:53:09 +0100 Subject: [PATCH] crypto_sign example: sign the *entire* message --- doc/man/man3/crypto_sign.3monocypher | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 */ -- 2.47.3