Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCertificateNotFound = bftkv.NewError("crypto: certifiate not found") ErrKeyNotFound = bftkv.NewError("crypto: key not found") ErrInvalidTransportSecurityData = bftkv.NewError("crypto: invalid transport security data") ErrInsufficientNumberOfSignatures = bftkv.NewError("crypto: insufficient number of signatures") ErrInvalidSignature = bftkv.NewError("crypto: invalid signature") ErrSigningFailed = bftkv.NewError("crypto: failed to sign") ErrEncryptionFailed = bftkv.NewError("crypto: failed to encrypt") ErrDecryptionFailed = bftkv.NewError("crypto: failed to decrypt") ErrInsufficientNumberOfSecrets = bftkv.NewError("crypto: insufficient number of secrets") ErrInvalidInput = bftkv.NewError("crypto: invalid input") ErrNoAuthenticationData = bftkv.NewError("crypto: no authentication data") ErrAuthTooManyAttempts = bftkv.NewError("crypto: too many attempts") ErrUnsupported = bftkv.NewError("crypto: unsupported algorithm") ErrInsufficientNumberOfThresholdSignatures = bftkv.NewError("crypto: insufficient number of threshold signatures") ErrContinue = bftkv.NewError("crypto: continue") // not an error but to tell the client the threshold process continues )
Functions ¶
This section is empty.
Types ¶
type Certificate ¶
type CollectiveSignature ¶
type CollectiveSignature interface { Verify(tbs []byte, ss *packet.SignaturePacket, q quorum.Quorum) error Sign(tbs []byte) (partialSignature *packet.SignaturePacket, err error) Combine(ss *packet.SignaturePacket, s *packet.SignaturePacket, q quorum.Quorum) bool Signers(ss *packet.SignaturePacket) []node.Node }
type Crypto ¶
type Crypto struct { Keyring Keyring Certificate Certificate Signature Signature Message Message CollectiveSignature CollectiveSignature DataEncryption DataEncryption RNG RNG }
type DataEncryption ¶
type Signature ¶
type Signature interface { // signature includes the signers (IDs or certificates) Verify(tbs []byte, sig *packet.SignaturePacket) error VerifyWithCertificate(tbs []byte, sig *packet.SignaturePacket, cert node.Node) error Sign(tbs []byte) (*packet.SignaturePacket, error) Signers(sig *packet.SignaturePacket) []node.Node // return only nodes that have been verified Issuer(sig *packet.SignaturePacket) node.Node Certs(sig *packet.SignaturePacket) ([]node.Node, error) }
type ThresholdAlgo ¶
type ThresholdAlgo byte
const ( TH_UNKNOWN ThresholdAlgo = iota TH_RSA TH_DSA TH_ECDSA )
Click to show internal directories.
Click to hide internal directories.