Documentation
¶
Index ¶
- Constants
- Variables
- type Attestation
- type Curve25519
- type DH
- type Ed25519
- func (e *Ed25519) CryptoToPublicKey(pub crypto.PublicKey) error
- func (e *Ed25519) CryptoToSecretKey(sec crypto.PrivateKey) error
- func (e *Ed25519) Generate() error
- func (e *Ed25519) GenerateFromSeed(seed []byte) error
- func (e *Ed25519) GetEncoder() generic.Encoder
- func (e *Ed25519) GetPublicKey() []byte
- func (e *Ed25519) GetPublicKeyString() string
- func (e *Ed25519) GetSecretKey() []byte
- func (e *Ed25519) GetSecretKeyString() string
- func (e *Ed25519) SetEncoder(encoder generic.Encoder)
- func (e *Ed25519) Sign(msg []byte) string
- func (e *Ed25519) StringToPublicKey(public string) (err error)
- func (e *Ed25519) StringToSecretKey(secret string) (err error)
- func (e *Ed25519) Verify(msg []byte, sig string) (bool, error)
- type Ed448
- func (e *Ed448) CryptoToPublicKey(pub crypto.PublicKey) error
- func (e *Ed448) CryptoToSecretKey(sec crypto.PrivateKey) error
- func (e *Ed448) Generate() error
- func (e *Ed448) GenerateFromSeed(seed []byte) error
- func (e *Ed448) GetEncoder() generic.Encoder
- func (e *Ed448) GetPublicKey() []byte
- func (e *Ed448) GetPublicKeyString() string
- func (e *Ed448) GetSecretKey() []byte
- func (e *Ed448) GetSecretKeyString() string
- func (e *Ed448) SetEncoder(encoder generic.Encoder)
- func (e *Ed448) Sign(msg []byte) string
- func (e *Ed448) StringToPublicKey(public string) (err error)
- func (e *Ed448) StringToSecretKey(secret string) (err error)
- func (e *Ed448) Verify(msg []byte, sig string) (bool, error)
- type KnownPadding
- type KnownSeparator
- type Minimalistic
- type Serializers
- type Signing
Constants ¶
View Source
const (
Ed25519PrivateKeySize = 32
)
Variables ¶
View Source
var ErrInvalidPublicKeySize = errors.New("invalid public key size")
View Source
var ErrInvalidSecretKeySize = errors.New("invalid secret key size")
View Source
var ErrPublicKeyAssert = errors.New("public key type assertion error")
View Source
var ErrSecretKeyAssert = errors.New("secret key type assertion error")
View Source
var ErrTestSigning = errors.New("test signing failed, incorrect private key")
Functions ¶
This section is empty.
Types ¶
type Attestation ¶ added in v0.0.2
type Curve25519 ¶
func (*Curve25519) GenerateKeypair ¶
func (c *Curve25519) GenerateKeypair() error
func (*Curve25519) GenerateSharedSecret ¶
func (c *Curve25519) GenerateSharedSecret(recipientPublicKey []byte) ([]byte, error)
type Ed25519 ¶
type Ed25519 struct { Encoder generic.Encoder SecretKey ed25519.PrivateKey PublicKey ed25519.PublicKey }
func (*Ed25519) CryptoToPublicKey ¶ added in v0.1.1
func (*Ed25519) CryptoToSecretKey ¶ added in v0.1.1
func (e *Ed25519) CryptoToSecretKey(sec crypto.PrivateKey) error
func (*Ed25519) GenerateFromSeed ¶
func (*Ed25519) GetEncoder ¶ added in v0.0.2
func (*Ed25519) GetPublicKey ¶ added in v0.0.2
func (*Ed25519) GetPublicKeyString ¶ added in v0.1.1
func (*Ed25519) GetSecretKey ¶ added in v0.0.2
func (*Ed25519) GetSecretKeyString ¶ added in v0.1.1
func (*Ed25519) SetEncoder ¶ added in v0.1.1
func (*Ed25519) StringToPublicKey ¶ added in v0.1.1
func (*Ed25519) StringToSecretKey ¶ added in v0.1.1
type Ed448 ¶
type Ed448 struct { Encoder generic.Encoder Context string SecretKey ed448.PrivateKey PublicKey ed448.PublicKey }
func (*Ed448) CryptoToPublicKey ¶ added in v0.1.1
func (*Ed448) CryptoToSecretKey ¶ added in v0.1.1
func (e *Ed448) CryptoToSecretKey(sec crypto.PrivateKey) error
func (*Ed448) GenerateFromSeed ¶
func (*Ed448) GetEncoder ¶ added in v0.0.2
func (*Ed448) GetPublicKey ¶ added in v0.0.2
func (*Ed448) GetPublicKeyString ¶ added in v0.1.1
func (*Ed448) GetSecretKey ¶ added in v0.0.2
func (*Ed448) GetSecretKeyString ¶ added in v0.1.1
func (*Ed448) SetEncoder ¶ added in v0.1.1
func (*Ed448) StringToPublicKey ¶ added in v0.1.1
func (*Ed448) StringToSecretKey ¶ added in v0.1.1
type KnownPadding ¶ added in v0.0.2
type KnownPadding struct {
Padding int
}
func (*KnownPadding) Deserializer ¶ added in v0.0.2
func (k *KnownPadding) Deserializer(data string) (string, string, error)
func (*KnownPadding) Serializer ¶ added in v0.0.2
func (k *KnownPadding) Serializer(payload string, signature string) (string, error)
type KnownSeparator ¶ added in v0.0.2
func (*KnownSeparator) Deserializer ¶ added in v0.0.2
func (k *KnownSeparator) Deserializer(data string) (string, string, error)
func (*KnownSeparator) Serializer ¶ added in v0.0.2
func (k *KnownSeparator) Serializer(payload string, signature string) (string, error)
type Minimalistic ¶ added in v0.0.2
type Minimalistic struct { Suite Signing Hasher hash.Algorithms Serialization Serializers Encoder generic.Encoder }
func (*Minimalistic) Parse ¶ added in v0.0.2
func (m *Minimalistic) Parse(token string) (string, error)
type Serializers ¶ added in v0.0.2
type Signing ¶
type Signing interface { Generate() error GenerateFromSeed([]byte) error Sign([]byte) string Verify([]byte, string) (bool, error) GetSecretKey() []byte GetSecretKeyString() string GetPublicKey() []byte GetPublicKeyString() string GetEncoder() generic.Encoder SetEncoder(generic.Encoder) CryptoToPublicKey(crypto.PublicKey) error CryptoToSecretKey(crypto.PrivateKey) error StringToPublicKey(string) error StringToSecretKey(string) error }
Click to show internal directories.
Click to hide internal directories.