Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustMarshalUI ¶
Types ¶
type UI ¶
type UI struct { // Unique, monotonic, and sequential counter Counter uint64 // Certificate created by a tamper-proof component of the USIG // that certifies the counter assigned to a particular message Cert []byte }
UI is a unique identifier assigned to a message by a USIG
func MustUnmarshalUI ¶
func (*UI) MarshalBinary ¶
MarshalBinary marshals UI to byte array
func (*UI) UnmarshalBinary ¶
UnmarshalBinary unmarshals byte array to UI
type USIG ¶
type USIG interface { // CreateUI returns a unique identifier for the specified // message. A unique, monotonic, and sequential counter is // incremented on each invocation to produce the UI. The first // assigned counter value should be one. CreateUI(message []byte) (*UI, error) // VerifyUI verifies if the UI is valid for the message and // was generated by the specified USIG identity VerifyUI(message []byte, ui *UI, usigID []byte) error // ID returns the identity of this USIG instance ID() []byte }
USIG (Unique Sequential Identifier Generator) is a tamper-proof component in MinBFT that assigns unique, monotonic, and sequential counter to messages and signs it
Click to show internal directories.
Click to hide internal directories.