- Fix typo in crypto_sign_init_first_pass_custom_hash(3monocypher)
- Wipe sk in crypto_sign_init_first_pass_custom_hash(3monocypher);
while it is just a test program, it is arguably good form to do so
in any case, especially in documentation code that people might be
copying and pasting.
- Note that HMACs can be safely truncated.
.Fa final
members.
.It Fa init
-Function that initialises the hash context an outer signing context.
+Function that initialises the hash context of an outer signing context.
.It Fa update
Function that updates the hash context of an outer signing context.
It must be able to handle message sizes of at least 32 bytes.
struct outer_ctx ctx;
crypto_sign_init_first_pass_custom_hash((void*)&ctx,
sk, NULL, &my_vtable);
+ crypto_wipe(sk, sizeof(sk));
crypto_sign_update( (void*)&ctx, msg, sizeof(msg));
crypto_sign_init_second_pass((void*)&ctx);
crypto_sign_update( (void*)&ctx, msg, sizeof(msg));
and
.Fn crypto_hmac_sha512_final .
.Pp
-Use
-.Xr crypto_verify64 3monocypher
-to compare MACs.
+MACs may be truncated safely down to at most 16 bytes;
+the
+.Xr crypto_verify64 3monocypher ,
+.Xr crypto_verify32 3monocypher ,
+and
+.Xr crypto_verify16 3monocypher .
+functions can be used to to compare (possibly truncated) MACs.
.Sh RETURN VALUES
These functions return nothing.
.Sh EXAMPLES