Documentation ¶
Index ¶
- func New() *crypto.Crypto
- func NewCertificate(keyring crypto.Keyring) crypto.Certificate
- func NewCollectiveSignature(signature crypto.Signature) crypto.CollectiveSignature
- func NewDataEncryption() crypto.DataEncryption
- func NewKeyring() crypto.Keyring
- func NewMessage(keyring crypto.Keyring) crypto.Message
- func NewRNG() crypto.RNG
- func NewSignature(keyring crypto.Keyring, cert crypto.Certificate) crypto.Signature
- type DataEncryption
- type PGPCertificate
- func (c *PGPCertificate) Merge(target node.Node, sub node.Node) error
- func (c *PGPCertificate) Parse(pkt []byte) ([]node.Node, error)
- func (c *PGPCertificate) ParseStream(r io.Reader) ([]node.Node, error)
- func (c *PGPCertificate) Sign(signee node.Node) error
- func (c *PGPCertificate) Signers(signee node.Node) []node.Node
- type PGPCertificateInstance
- func (c *PGPCertificateInstance) Active() bool
- func (c *PGPCertificateInstance) Address() string
- func (c *PGPCertificateInstance) Id() uint64
- func (c *PGPCertificateInstance) Instance() interface{}
- func (c *PGPCertificateInstance) Name() string
- func (c *PGPCertificateInstance) Serialize() ([]byte, error)
- func (c *PGPCertificateInstance) SetActive(active bool)
- func (c *PGPCertificateInstance) Signers() []uint64
- func (c *PGPCertificateInstance) UId() string
- type PGPCollectiveSignature
- func (cs *PGPCollectiveSignature) Combine(ss *packet.SignaturePacket, s *packet.SignaturePacket, q quorum.Quorum) bool
- func (cs *PGPCollectiveSignature) Sign(tbs []byte) (partialSignature *packet.SignaturePacket, err error)
- func (cs *PGPCollectiveSignature) Signers(ss *packet.SignaturePacket) []node.Node
- func (cs *PGPCollectiveSignature) Verify(tbs []byte, ss *packet.SignaturePacket, q quorum.Quorum) error
- type PGPKeyring
- type PGPMessage
- func (msg *PGPMessage) Decrypt(body io.Reader) (plain []byte, nonce []byte, peer node.Node, err error)
- func (msg *PGPMessage) Encrypt(peers []node.Node, plain []byte, nonce []byte) ([]byte, error)
- func (msg *PGPMessage) EncryptStream(w io.Writer, peerId uint64, nonce []byte) (plainWriter io.WriteCloser, err error)
- type PGPRng
- type PGPSignature
- func (s *PGPSignature) Certs(sig *packet.SignaturePacket) ([]node.Node, error)
- func (s *PGPSignature) Issuer(sig *packet.SignaturePacket) node.Node
- func (s *PGPSignature) Sign(tbs []byte) (*packet.SignaturePacket, error)
- func (s *PGPSignature) Signers(sig *packet.SignaturePacket) []node.Node
- func (s *PGPSignature) Verify(tbs []byte, sig *packet.SignaturePacket) error
- func (s *PGPSignature) VerifyWithCertificate(tbs []byte, sig *packet.SignaturePacket, cert node.Node) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCertificate ¶
func NewCertificate(keyring crypto.Keyring) crypto.Certificate
func NewCollectiveSignature ¶
func NewCollectiveSignature(signature crypto.Signature) crypto.CollectiveSignature
func NewDataEncryption ¶
func NewDataEncryption() crypto.DataEncryption
func NewKeyring ¶
func NewSignature ¶
Types ¶
type DataEncryption ¶
type DataEncryption struct { }
type PGPCertificate ¶
type PGPCertificate struct {
// contains filtered or unexported fields
}
Certificate
func (*PGPCertificate) ParseStream ¶
type PGPCertificateInstance ¶
type PGPCertificateInstance struct {
// contains filtered or unexported fields
}
Certificate Instance
func (*PGPCertificateInstance) Active ¶
func (c *PGPCertificateInstance) Active() bool
func (*PGPCertificateInstance) Address ¶
func (c *PGPCertificateInstance) Address() string
func (*PGPCertificateInstance) Id ¶
func (c *PGPCertificateInstance) Id() uint64
func (*PGPCertificateInstance) Instance ¶
func (c *PGPCertificateInstance) Instance() interface{}
func (*PGPCertificateInstance) Name ¶
func (c *PGPCertificateInstance) Name() string
func (*PGPCertificateInstance) Serialize ¶
func (c *PGPCertificateInstance) Serialize() ([]byte, error)
func (*PGPCertificateInstance) SetActive ¶
func (c *PGPCertificateInstance) SetActive(active bool)
func (*PGPCertificateInstance) Signers ¶
func (c *PGPCertificateInstance) Signers() []uint64
func (*PGPCertificateInstance) UId ¶
func (c *PGPCertificateInstance) UId() string
type PGPCollectiveSignature ¶
type PGPCollectiveSignature struct {
// contains filtered or unexported fields
}
func (*PGPCollectiveSignature) Combine ¶
func (cs *PGPCollectiveSignature) Combine(ss *packet.SignaturePacket, s *packet.SignaturePacket, q quorum.Quorum) bool
func (*PGPCollectiveSignature) Sign ¶
func (cs *PGPCollectiveSignature) Sign(tbs []byte) (partialSignature *packet.SignaturePacket, err error)
func (*PGPCollectiveSignature) Signers ¶
func (cs *PGPCollectiveSignature) Signers(ss *packet.SignaturePacket) []node.Node
func (*PGPCollectiveSignature) Verify ¶
func (cs *PGPCollectiveSignature) Verify(tbs []byte, ss *packet.SignaturePacket, q quorum.Quorum) error
type PGPKeyring ¶
type PGPKeyring struct {
// contains filtered or unexported fields
}
Keyring
func (*PGPKeyring) GetCertById ¶
func (k *PGPKeyring) GetCertById(id uint64) node.Node
func (*PGPKeyring) GetKeyring ¶
func (k *PGPKeyring) GetKeyring() []node.Node
func (*PGPKeyring) Remove ¶
func (k *PGPKeyring) Remove(nodes []node.Node)
type PGPMessage ¶
type PGPMessage struct {
// contains filtered or unexported fields
}
message stream
func (*PGPMessage) EncryptStream ¶
func (msg *PGPMessage) EncryptStream(w io.Writer, peerId uint64, nonce []byte) (plainWriter io.WriteCloser, err error)
type PGPSignature ¶
type PGPSignature struct {
// contains filtered or unexported fields
}
Signature
func (*PGPSignature) Certs ¶
func (s *PGPSignature) Certs(sig *packet.SignaturePacket) ([]node.Node, error)
func (*PGPSignature) Issuer ¶
func (s *PGPSignature) Issuer(sig *packet.SignaturePacket) node.Node
func (*PGPSignature) Sign ¶
func (s *PGPSignature) Sign(tbs []byte) (*packet.SignaturePacket, error)
func (*PGPSignature) Signers ¶
func (s *PGPSignature) Signers(sig *packet.SignaturePacket) []node.Node
func (*PGPSignature) Verify ¶
func (s *PGPSignature) Verify(tbs []byte, sig *packet.SignaturePacket) error
func (*PGPSignature) VerifyWithCertificate ¶
func (s *PGPSignature) VerifyWithCertificate(tbs []byte, sig *packet.SignaturePacket, cert node.Node) error
Click to show internal directories.
Click to hide internal directories.