Documentation ¶
Overview ¶
Package ed25519 implements the ed25519 signature algorithm for OpenPGP as defined in the Open PGP crypto refresh.
Index ¶
- Constants
- func ReadSignature(reader io.Reader) ([]byte, error)
- func Sign(priv *PrivateKey, message []byte) ([]byte, error)
- func Validate(priv *PrivateKey) error
- func Verify(pub *PublicKey, message []byte, signature []byte) bool
- func WriteSignature(writer io.Writer, signature []byte) error
- type PrivateKey
- type PublicKey
Constants ¶
View Source
const PointSize = 32
View Source
const PrivateKeySize = 64
View Source
const SignatureSize = 64
Variables ¶
This section is empty.
Functions ¶
func Sign ¶
func Sign(priv *PrivateKey, message []byte) ([]byte, error)
Sign signs a message with the ed25519 algorithm.
func Validate ¶
func Validate(priv *PrivateKey) error
Validate checks if the ed25519 private key is valid
Types ¶
type PrivateKey ¶
func GenerateKey ¶
func GenerateKey(rand io.Reader) (*PrivateKey, error)
func NewPrivateKey ¶
func NewPrivateKey(key PublicKey) *PrivateKey
func (*PrivateKey) MarshalByteSecret ¶
func (pk *PrivateKey) MarshalByteSecret() []byte
MarshalByteSecret returns the underlying 32 byte seed of the private key
func (*PrivateKey) Seed ¶
func (pk *PrivateKey) Seed() []byte
func (*PrivateKey) UnmarshalByteSecret ¶
func (sk *PrivateKey) UnmarshalByteSecret(seed []byte) error
UnmarshalByteSecret computes the private key from the secret seed and stores it in the private key object.
Click to show internal directories.
Click to hide internal directories.