Versions in this module Expand all Collapse all v0 v0.0.2 Aug 19, 2020 v0.0.1 Aug 19, 2020 Changes in this version + const HashAlgorithm + var ErrorRevoked = errors.New("revoked") + var Logger *logrus.Logger + var Parameters = struct{ ... } + func NewProofRandomizer() *big.Int + type Accumulator struct + EventHash Hash + Index uint64 + Nu *big.Int + Time int64 + func (acc *Accumulator) Remove(sk *PrivateKey, e *big.Int, parent *Event) (*Accumulator, *Event, error) + func (acc *Accumulator) Sign(sk *PrivateKey) (*SignedAccumulator, error) + type Event struct + E *big.Int + Index uint64 + ParentHash Hash + type EventList struct + ComputeProduct bool + Events []*Event + func FlattenEventLists(eventslist []*EventList) (*EventList, error) + func NewEventList(events ...*Event) *EventList + func (el *EventList) MarshalCBOR() ([]byte, error) + func (el *EventList) MarshalJSON() ([]byte, error) + func (el *EventList) UnmarshalCBOR(bts []byte) error + func (el *EventList) UnmarshalJSON(bts []byte) error + func (el *EventList) Verify(acc *Accumulator) error + type Hash multihash.Multihash + func (hash *Hash) UnmarshalJSON(b []byte) error + func (hash Hash) Algorithm() (uint64, error) + func (hash Hash) Equal(other Hash) bool + func (hash Hash) MarshalJSON() ([]byte, error) + func (hash Hash) String() string + type PrivateKey struct + Counter uint + ECDSA *ecdsa.PrivateKey + N *big.Int + P *big.Int + Q *big.Int + type Proof struct + Challenge *big.Int + Cr *big.Int + Cu *big.Int + Nu *big.Int + Responses map[string]*big.Int + SignedAccumulator *SignedAccumulator + func (p *Proof) ChallengeContributions(grp *QrGroup) []*big.Int + func (p *Proof) SetExpected(pk *PublicKey, challenge, response *big.Int) error + func (p *Proof) VerifyWithChallenge(pk *PublicKey, reconstructedChallenge *big.Int) bool + type ProofCommit struct + func NewProofCommit(grp *QrGroup, witn *Witness, randomizer *big.Int) ([]*big.Int, *ProofCommit, error) + func (c *ProofCommit) BuildProof(challenge *big.Int) *Proof + func (c *ProofCommit) Update(commitments []*big.Int, witness *Witness) + type PublicKey struct + Counter uint + ECDSA *ecdsa.PublicKey + Group *QrGroup + type QrGroup struct + G *big.Int + H *big.Int + N *big.Int + func NewQrGroup(modulus *big.Int) QrGroup + type SignedAccumulator struct + Accumulator *Accumulator + Data signed.Message + PKCounter uint + func (s *SignedAccumulator) UnmarshalVerify(pk *PublicKey) (*Accumulator, error) + type Update struct + Events []*Event + SignedAccumulator *SignedAccumulator + func NewAccumulator(sk *PrivateKey) (*Update, error) + func NewUpdate(sk *PrivateKey, acc *Accumulator, events []*Event) (*Update, error) + func (update *Update) MarshalCBOR() ([]byte, error) + func (update *Update) MarshalJSON() ([]byte, error) + func (update *Update) Prepend(eventlist *EventList) error + func (update *Update) Product(from uint64) *big.Int + func (update *Update) UnmarshalCBOR(data []byte) error + func (update *Update) UnmarshalJSON(bts []byte) error + func (update *Update) Verify(pk *PublicKey) (*Accumulator, error) + type Witness struct + E *big.Int + SignedAccumulator *SignedAccumulator + U *big.Int + Updated time.Time + func RandomWitness(sk *PrivateKey, acc *Accumulator) (*Witness, error) + func (w *Witness) Update(pk *PublicKey, update *Update) error + func (w *Witness) Verify(pk *PublicKey) error