Documentation
¶
Index ¶
- Constants
- Variables
- func PublicKeyToCompressedBytes(pk *PublicKey) []byte
- func PublicKeyToUncompressedBytes(key *PublicKey) []byte
- func SecretKeyToBytes(sk *SecretKey) []byte
- func SignatureToBytes(sig *Signature) []byte
- func Verify(pk *PublicKey, sig *Signature, msg []byte) bool
- func VerifyProofOfPossession(pk *PublicKey, sig *Signature, msg []byte) bool
- type Ciphersuite
- type PublicKey
- type SecretKey
- type Signature
- type Signer
Constants ¶
const PublicKeyLen = luxbls.PublicKeyLen
const SignatureLen = luxbls.SignatureLen
Variables ¶
var ( ErrNoPublicKeys = luxbls.ErrNoPublicKeys ErrFailedPublicKeyDecompress = luxbls.ErrFailedPublicKeyDecompress )
var ( ErrNoSignatures = luxbls.ErrNoSignatures ErrFailedSignatureDecompress = luxbls.ErrFailedSignatureDecompress )
Functions ¶
func PublicKeyToCompressedBytes ¶
PublicKeyToCompressedBytes returns the compressed big-endian format of the public key.
func PublicKeyToUncompressedBytes ¶
PublicKeyToUncompressedBytes returns the uncompressed big-endian format of the public key.
func SecretKeyToBytes ¶ added in v1.11.10
SecretKeyToBytes returns the big-endian format of the secret key.
func SignatureToBytes ¶
SignatureToBytes returns the compressed big-endian format of the signature.
Types ¶
type Ciphersuite ¶
type Ciphersuite int
const ( CiphersuiteSignature Ciphersuite = iota CiphersuiteProofOfPossession )
func (Ciphersuite) Bytes ¶
func (c Ciphersuite) Bytes() []byte
func (Ciphersuite) String ¶
func (c Ciphersuite) String() string
type PublicKey ¶
func AggregatePublicKeys ¶
AggregatePublicKeys aggregates a non-zero number of public keys into a single aggregated public key.
func PublicKeyFromCompressedBytes ¶
PublicKeyFromCompressedBytes parses the compressed big-endian format of the public key into a public key.
func PublicKeyFromUncompressedBytes ¶ added in v1.16.56
PublicKeyFromUncompressedBytes parses the uncompressed big-endian format of the public key into a public key.
func PublicKeyFromValidUncompressedBytes ¶
PublicKeyFromValidUncompressedBytes parses the uncompressed big-endian format of the public key into a public key without performing validation. This should only be used when the public key is known to be valid.
type SecretKey ¶ added in v1.11.10
func NewSecretKey ¶ added in v1.11.10
NewSecretKey generates a new secret key
func SecretKeyFromBytes ¶ added in v1.11.10
SecretKeyFromBytes parses a secret key from bytes
type Signature ¶
func AggregateSignatures ¶
AggregateSignatures aggregates a non-zero number of signatures into a single aggregated signature.
func SignatureFromBytes ¶
SignatureFromBytes parses the compressed big-endian format of the signature into a signature.