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
Currently the ecdsa.Sign method returns the r and s values. However, there is a struct for the signature
typeecdsaSignaturestruct {
R, S*big.Int
}
Verification of a signature also requires these two values. However, signatures are usually communicated as byte strings, being the ASN.1 encoded form of both these values in a SEQUENCE. This is exactly what the ecdsaSignature struct provides.
So it would be a lot more convenient to have this struct provided by the library instead of individual implementations having to define this struct themselves, making their structs incompatible with other people's code.
So, the suggestion I put forward is expose the struct as EcdsaSignature and alter the ecdsa.Sign and ecdsa.Verify methods to not take r and s as arguments, but an EcdsaSignature.
The text was updated successfully, but these errors were encountered:
Currently the
ecdsa.Sign
method returns the r and s values. However, there is a struct for the signatureVerification of a signature also requires these two values. However, signatures are usually communicated as byte strings, being the ASN.1 encoded form of both these values in a SEQUENCE. This is exactly what the
ecdsaSignature
struct provides.So it would be a lot more convenient to have this struct provided by the library instead of individual implementations having to define this struct themselves, making their structs incompatible with other people's code.
So, the suggestion I put forward is expose the struct as
EcdsaSignature
and alter theecdsa.Sign
andecdsa.Verify
methods to not take r and s as arguments, but anEcdsaSignature
.The text was updated successfully, but these errors were encountered: