Documentation ¶
Overview ¶
package crypto provides lowest-level crypto types and primitives used by sigsum
Index ¶
Constants ¶
View Source
const ( HashSize = sha256.Size SignatureSize = ed25519.SignatureSize PublicKeySize = ed25519.PublicKeySize PrivateKeySize = ed25519.SeedSize )
Variables ¶
This section is empty.
Functions ¶
func NewKeyPair ¶ added in v0.1.5
func NewKeyPair() (PublicKey, *Ed25519Signer, error)
Types ¶
type Ed25519Signer ¶ added in v0.1.16
type Ed25519Signer struct {
// contains filtered or unexported fields
}
func NewEd25519Signer ¶ added in v0.1.5
func NewEd25519Signer(key *PrivateKey) *Ed25519Signer
func SignerFromHex ¶ added in v0.1.5
func SignerFromHex(s string) (*Ed25519Signer, error)
func (*Ed25519Signer) Private ¶ added in v0.1.16
func (s *Ed25519Signer) Private() (ret PrivateKey)
func (*Ed25519Signer) Public ¶ added in v0.1.16
func (s *Ed25519Signer) Public() (ret PublicKey)
func (*Ed25519Signer) Sign ¶ added in v0.1.16
func (s *Ed25519Signer) Sign(msg []byte) (Signature, error)
type Hash ¶
type PrivateKey ¶ added in v0.1.5
type PrivateKey [PrivateKeySize]byte
type PublicKey ¶
type PublicKey [PublicKeySize]byte
type Signature ¶
type Signature [SignatureSize]byte
Click to show internal directories.
Click to hide internal directories.