Documentation ¶
Overview ¶
Package eckcdsa implements the EC-KCDSA(Korean Certificate-based Digital Signature Algorithm using Elliptic Curves) as defined in TTAK.KO-12.0015/R3
Index ¶
- func Sign(rand io.Reader, priv *PrivateKey, h hash.Hash, data []byte) (r, s *big.Int, err error)
- func SignASN1(randReader io.Reader, priv *PrivateKey, h hash.Hash, data []byte) (sig []byte, err error)
- func Verify(pub *PublicKey, h hash.Hash, data []byte, r, s *big.Int) bool
- func VerifyASN1(pub *PublicKey, h hash.Hash, data, sig []byte) bool
- type PrivateKey
- type PublicKey
- type SignerOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PrivateKey ¶
PrivateKey represents a EC-KCDSA private key.
func FromECDSA ¶ added in v1.3.0
func FromECDSA(dpk *ecdsa.PrivateKey) *PrivateKey
func GenerateKey ¶
Generate the parameters
func (*PrivateKey) Equal ¶ added in v1.3.0
func (priv *PrivateKey) Equal(x crypto.PrivateKey) bool
Equal reports whether priv and x have the same value.
func (*PrivateKey) Public ¶ added in v1.2.2
func (priv *PrivateKey) Public() crypto.PublicKey
Public returns the public key corresponding to priv.
func (*PrivateKey) Sign ¶ added in v1.3.0
func (priv *PrivateKey) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)
crypto.Signer
func (*PrivateKey) ToECDSA ¶ added in v1.3.0
func (kpk *PrivateKey) ToECDSA() *ecdsa.PrivateKey
type SignerOpts ¶ added in v1.3.0
SignerOpts contains options for creating and verifying EC-KCDSA signatures.
func (*SignerOpts) HashFunc ¶ added in v1.3.0
func (opts *SignerOpts) HashFunc() crypto.Hash
HashFunc returns opts.Hash so that SignerOpts implements crypto.SignerOpts.
Click to show internal directories.
Click to hide internal directories.