You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to simply pass my pre-hashed message that is a [u8; 64]. I had to open the source code to realize currently, .finalize() is called on the MsgDigest to exctract it, making this function needlessly hard to use if I don't have Digest implementation.
Could you consider simply changing the prehashed_message to be of type [u8; 64]?
It's somewhat complicated by the nature of Ed25519, which does two passes over the input message rather than one, as a mechanism for preventing collisions in the underlying hash function from breaking the construction.
If you're looking for an API similar to signature algorithms like RSASSA or ECDSA which simply accept a message hash to compute a signature over, Ed25519 simply doesn't work that way. There's a related construction, Ed25519ph, which does, however it's a separate construction and you can't verify an Ed25519ph signature using Ed25519.
https://docs.rs/ed25519-dalek/latest/ed25519_dalek/hazmat/fn.raw_sign_prehashed.html
I want to simply pass my pre-hashed message that is a
[u8; 64]
. I had to open the source code to realize currently,.finalize()
is called on theMsgDigest
to exctract it, making this function needlessly hard to use if I don't have Digest implementation.Could you consider simply changing the
prehashed_message
to be of type[u8; 64]
?Or use the more narrow trait
FixedOutput
instead ofDigest
: https://docs.rs/digest/latest/digest/trait.FixedOutput.htmlThe text was updated successfully, but these errors were encountered: