package ed25519
import "crypto/internal/fips140/ed25519"
Index ¶
- func Sign(priv *PrivateKey, message []byte) []byte
- func SignCtx(priv *PrivateKey, message []byte, context string) ([]byte, error)
- func SignPH(priv *PrivateKey, message []byte, context string) ([]byte, error)
- func Verify(pub *PublicKey, message, sig []byte) error
- func VerifyCtx(pub *PublicKey, message []byte, sig []byte, context string) error
- func VerifyPH(pub *PublicKey, message []byte, sig []byte, context string) error
- type PrivateKey
- func GenerateKey() (*PrivateKey, error)
- func NewPrivateKey(priv []byte) (*PrivateKey, error)
- func NewPrivateKeyFromSeed(seed []byte) (*PrivateKey, error)
- func (priv *PrivateKey) Bytes() []byte
- func (priv *PrivateKey) PublicKey() []byte
- func (priv *PrivateKey) Seed() []byte
- type PublicKey
Functions ¶
func Sign ¶
func Sign(priv *PrivateKey, message []byte) []byte
func SignCtx ¶
func SignCtx(priv *PrivateKey, message []byte, context string) ([]byte, error)
func SignPH ¶
func SignPH(priv *PrivateKey, message []byte, context string) ([]byte, error)
func Verify ¶
func VerifyCtx ¶
func VerifyPH ¶
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
func GenerateKey ¶
func GenerateKey() (*PrivateKey, error)
GenerateKey generates a new Ed25519 private key pair.
func NewPrivateKey ¶
func NewPrivateKey(priv []byte) (*PrivateKey, error)
func NewPrivateKeyFromSeed ¶
func NewPrivateKeyFromSeed(seed []byte) (*PrivateKey, error)
func (*PrivateKey) Bytes ¶
func (priv *PrivateKey) Bytes() []byte
func (*PrivateKey) PublicKey ¶
func (priv *PrivateKey) PublicKey() []byte
func (*PrivateKey) Seed ¶
func (priv *PrivateKey) Seed() []byte
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func NewPublicKey ¶
func (*PublicKey) Bytes ¶
Source Files ¶
- Version
- v1.24.0 (latest)
- Published
- Feb 10, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 2 minutes ago –
Tools for package owners.