Open arnauorriols opened 2 years ago
That makes sense, ed25519 public key must always be valid thus compressed y coordinate must always decompress.
@arnauorriols what is your status on this one, is it still relevant?
If that is the case, could you open the PR adding an infallible From
?
Description
Is there a particular case where the conversion would fail? Particularly, the current implementation implies there might be a case where decompressing the ed25519 public key as a
CompressedEdwardsY
might fail. However, a comment also states that in the happy path of the conversion "pk
is a valided25519::PublicKey
". This is however already an invariant of the conversion (as we are converting from aed25519::PublicKey
), making one think the conversion is infallible in practice:Motivation
If the conversion is in fact infallible, the trait should be
From
instead ofTryFrom
. Currently https://github.com/iotaledger/streams relies on this conversion being infallible. If it in fact isn't, I'd appreciate some clarification so that we can adjust our error handling.Are you planning to do it yourself in a pull request?
Yes (upon confirmation)