usig

package
v0.0.0-...-2a45ea8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustMarshalUI

func MustMarshalUI(ui *UI) []byte

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 MustUnmarshalUI(in []byte) *UI

func (*UI) MarshalBinary

func (ui *UI) MarshalBinary() ([]byte, error)

MarshalBinary marshals UI to byte array

func (*UI) UnmarshalBinary

func (ui *UI) UnmarshalBinary(in []byte) error

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

Directories

Path Synopsis
Package mock_usig is a generated GoMock package.
Package mock_usig is a generated GoMock package.
Package sgx provides Go interface to SGX USIG implementation.
Package sgx provides Go interface to SGX USIG implementation.

Jump to

Keyboard shortcuts

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