package ecdsa
import "github.com/ProtonMail/go-crypto/openpgp/ecdsa"
Package ecdsa implements ECDSA signature, suitable for OpenPGP, as specified in RFC 6637, section 5.
Index ¶
- func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err error)
- func Validate(priv *PrivateKey) error
- func Verify(pub *PublicKey, hash []byte, r, s *big.Int) bool
- type PrivateKey
- func GenerateKey(rand io.Reader, c ecc.ECDSACurve) (priv *PrivateKey, err error)
- func NewPrivateKey(key PublicKey) *PrivateKey
- func (sk *PrivateKey) MarshalIntegerSecret() []byte
- func (sk *PrivateKey) UnmarshalIntegerSecret(d []byte) error
- type PublicKey
Functions ¶
func Sign ¶
func Validate ¶
func Validate(priv *PrivateKey) error
func Verify ¶
Types ¶
type PrivateKey ¶
func GenerateKey ¶
func GenerateKey(rand io.Reader, c ecc.ECDSACurve) (priv *PrivateKey, err error)
func NewPrivateKey ¶
func NewPrivateKey(key PublicKey) *PrivateKey
func (*PrivateKey) MarshalIntegerSecret ¶
func (sk *PrivateKey) MarshalIntegerSecret() []byte
func (*PrivateKey) UnmarshalIntegerSecret ¶
func (sk *PrivateKey) UnmarshalIntegerSecret(d []byte) error
type PublicKey ¶
func NewPublicKey ¶
func NewPublicKey(curve ecc.ECDSACurve) *PublicKey
func (*PublicKey) GetCurve ¶
func (pk *PublicKey) GetCurve() ecc.ECDSACurve
func (*PublicKey) MarshalPoint ¶
func (*PublicKey) UnmarshalPoint ¶
Source Files ¶
- Version
- v1.3.0 (latest)
- Published
- May 22, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 2 days ago –
Tools for package owners.