Open epoberezkin opened 10 months ago
Of course!
Unfortunately we've found that the algorithm uses a digest prefix of its own and then again, with a prefix derived from the previous digest. That makes it challenging to make a proper API, like the signDigest
in the other modules, as it would involve callback ping-pong through FFI.
It's possible to make singLazy/verifyLazy, by passing array of chunk pointers to C function, but it won't work well for large number of chunks probably...
We'll park this idea for now.
Currently there are only
sign
/verify
functions that compute sha512 hash of the passed data internally. The problem with that is that it doesn't allow signing/verifying lazy bytestrings.We can split implementation of
crypton_ed25519_sign
/crypton_ed25519_sign_open
(and alsocrypton_decaf_ed448_sign
/crypton_ed448_sign_open
) to two parts to allow passing digests as well, and expose them assingDigest
/verifyDigest
functions in both modules that accept sha 512 hashes (like in other modules).@kazu-yamamoto We will do the PR if it's ok.