elkrem

package
v0.0.0-...-ae0a28a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LeftSha

func LeftSha(in wire.ShaHash) wire.ShaHash

LeftSha ...

func RightSha

func RightSha(in wire.ShaHash) wire.ShaHash

RightSha ...

Types

type Node

type Node struct {
	// contains filtered or unexported fields
}

Node ... You can calculate h from i but I can't figure out how without taking O(i) ops. Feels like there should be a clever O(h) way. 1 byte, whatever.

type Receiver

type Receiver struct {
	// contains filtered or unexported fields
}

Receiver ...

func NewReceiver

func NewReceiver(th uint8) Receiver

NewReceiver creates an Elkrem Receiver from a tree height

func (*Receiver) AddNext

func (e *Receiver) AddNext(sha *wire.ShaHash) error

AddNext ...

func (*Receiver) AtIndex

func (e *Receiver) AtIndex(w uint64) (*wire.ShaHash, error)

AtIndex ...

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

Sender ...

func NewSender

func NewSender(th uint8, r wire.ShaHash) Sender

NewSender creates an Elkrem Sender from a root hash and tree height

func (*Sender) AtIndex

func (e *Sender) AtIndex(w uint64) (*wire.ShaHash, error)

AtIndex ... w is the wanted index, i is the root index

func (*Sender) Next

func (e *Sender) Next() (*wire.ShaHash, error)

Next increments the index to the next hash and outputs it

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL