Documentation
¶
Overview ¶
Package ecdsa provides internal ECDSA utility functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ASN1Encode ¶
ASN1Encode encodes the given ECDSA signature using ASN.1 encoding.
Types ¶
type Signature ¶
Signature is an ECDSA signature.
func ASN1Decode ¶
ASN1Decode verifies the given ECDSA signature and decodes it if it is valid.
Since asn1.Unmarshal() doesn't do a strict verification on its input, it will accept signatures with trailing data. Thus, we add an additional check to make sure that the input follows strict DER encoding: after unmarshalling the signature bytes, we marshal the obtained signature object again. Since DER encoding is deterministic, we expect that the obtained bytes would be equal to the input.
func IEEEP1363Decode ¶
IEEEP1363Decode decodes the given ECDSA signature using IEEE_P1363 encoding.