Versions in this module Expand all Collapse all v0 v0.0.2 Nov 24, 2019 v0.0.1 Nov 19, 2019 Changes in this version + const DigestSize + var SystemRNG = &systemRNG + func MultisigAdd(unisig []MultisigSig, msig *MultisigSig) (err error) + func MultisigVerify(msg Hashable, addr Digest, sig MultisigSig) (verified bool, err error) + func NewHash() hash.Hash + func RandBytes(buf []byte) + func RandUint63() uint64 + func RandUint64() uint64 + func VrfKeygen() (pub VrfPubkey, priv VrfPrivkey) + func VrfKeygenFromSeed(seed [32]byte) (pub VrfPubkey, priv VrfPrivkey) + type Digest [DigestSize]byte + func DigestFromString(str string) (d Digest, err error) + func Hash(data []byte) Digest + func HashObj(h Hashable) Digest + func MultisigAddrGen(version, threshold uint8, pk []PublicKey) (addr Digest, err error) + func MultisigAddrGenWithSubsigs(version uint8, threshold uint8, subsigs []MultisigSubsig) (addr Digest, err error) + func (d Digest) IsZero() bool + func (d Digest) String() string + func (d Digest) TrimUint64() uint64 + type Hashable interface + ToBeHashed func() (protocol.HashID, []byte) + type MasterDerivationKey [masterDerivationKeyLenBytes]byte + type MultisigSig struct + Subsigs []MultisigSubsig + Threshold uint8 + Version uint8 + func MultisigAssemble(unisig []MultisigSig) (msig MultisigSig, err error) + func MultisigMerge(msig1 MultisigSig, msig2 MultisigSig) (msigt MultisigSig, err error) + func MultisigPreimageFromPKs(version, threshold uint8, pks []PublicKey) MultisigSig + func MultisigSign(msg Hashable, addr Digest, version, threshold uint8, pk []PublicKey, ...) (sig MultisigSig, err error) + func (msig MultisigSig) Blank() bool + func (msig MultisigSig) Equal(other MultisigSig) bool + func (msig MultisigSig) Preimage() (version, threshold uint8, pks []PublicKey) + type MultisigSubsig struct + Key PublicKey + Sig Signature + type OneTimeSignature struct + PK ed25519PublicKey + PK1Sig ed25519Signature + PK2 ed25519PublicKey + PK2Sig ed25519Signature + PKSigOld ed25519Signature + Sig ed25519Signature + type OneTimeSignatureIdentifier struct + Batch uint64 + Offset uint64 + func (id OneTimeSignatureIdentifier) BatchBytes() []byte + type OneTimeSignatureSecrets struct + func GenerateOneTimeSignatureSecrets(startBatch uint64, numBatches uint64) *OneTimeSignatureSecrets + func GenerateOneTimeSignatureSecretsRNG(startBatch uint64, numBatches uint64, rng RNG) *OneTimeSignatureSecrets + func (s *OneTimeSignatureSecrets) DeleteBeforeFineGrained(current OneTimeSignatureIdentifier, numKeysPerBatch uint64) + func (s *OneTimeSignatureSecrets) Sign(id OneTimeSignatureIdentifier, message Hashable) OneTimeSignature + func (s *OneTimeSignatureSecrets) Snapshot() OneTimeSignatureSecrets + type OneTimeSignatureSecretsPersistent struct + Batches []ephemeralSubkey + FirstBatch uint64 + FirstOffset uint64 + Offsets []ephemeralSubkey + OffsetsPK2 ed25519PublicKey + OffsetsPK2Sig ed25519Signature + type OneTimeSignatureSubkeyBatchID struct + Batch uint64 + SubKeyPK ed25519PublicKey + func (batch OneTimeSignatureSubkeyBatchID) ToBeHashed() (protocol.HashID, []byte) + type OneTimeSignatureSubkeyOffsetID struct + Batch uint64 + Offset uint64 + SubKeyPK ed25519PublicKey + func (off OneTimeSignatureSubkeyOffsetID) ToBeHashed() (protocol.HashID, []byte) + type OneTimeSignatureVerifier ed25519PublicKey + func (v OneTimeSignatureVerifier) Verify(id OneTimeSignatureIdentifier, message Hashable, sig OneTimeSignature) bool + type OneTimeSigner struct + OptionalKeyDilution uint64 + func (ots OneTimeSigner) KeyDilution(params config.ConsensusParams) uint64 + type PRNG struct + func MakePRNG(seed []byte) *PRNG + func (prng *PRNG) RandBytes(buf []byte) + type PrivateKey ed25519PrivateKey + type PublicKey ed25519PublicKey + func SecretKeyToPublicKey(secret PrivateKey) (PublicKey, error) + type RNG interface + RandBytes func([]byte) + type SecretKey = SignatureSecrets + type Seed ed25519Seed + func SecretKeyToSeed(secret PrivateKey) (Seed, error) + type Signature ed25519Signature + type SignatureSecrets struct + SK ed25519PrivateKey + func GenerateSignatureSecrets(seed Seed) *SignatureSecrets + func SecretKeyToSignatureSecrets(sk PrivateKey) (secrets *SignatureSecrets, err error) + func (s *SignatureSecrets) Sign(message Hashable) Signature + func (s *SignatureSecrets) SignBytes(message []byte) Signature + type SignatureVerifier = PublicKey + func (v SignatureVerifier) Verify(message Hashable, sig Signature) bool + func (v SignatureVerifier) VerifyBytes(message []byte, sig Signature) bool + type VRFProof = VrfProof + type VRFSecrets struct + PK VrfPubkey + SK VrfPrivkey + func GenerateVRFSecrets() *VRFSecrets + type VRFVerifier = VrfPubkey + type VrfOutput [64]uint8 + type VrfPrivkey [64]uint8 + func (sk VrfPrivkey) Prove(message Hashable) (proof VrfProof, ok bool) + func (sk VrfPrivkey) Pubkey() (pk VrfPubkey) + type VrfProof [80]uint8 + func (proof VrfProof) Hash() (hash VrfOutput, ok bool) + type VrfPubkey [32]uint8 + func (pk VrfPubkey) Verify(p VrfProof, message Hashable) (bool, VrfOutput)