Libsodium / enacl creates some confusion with its sign_open/2 function verifying a SignedMessage and returning the original Message on successful verification instead of a bool.
This is a bit odd, and we would like to not return the message to have a clearer API in the juvix-anoma-stdlib.
Problem
Libsodium / enacl creates some confusion with its
sign_open/2
function verifying aSignedMessage
and returning the originalMessage
on successful verification instead of abool
. This is a bit odd, and we would like to not return the message to have a clearer API in thejuvix-anoma-stdlib
.This is the current API
Solution
Instead, we would like to have:
Accordingly, the definitions of the compiler
Builtins.hs
have to be changed.Note
This depends also on issue https://github.com/anoma/anoma/issues/569 to change the
verify
implementation to return aMaybe
instead of crashing on failure.