utils

package
v0.0.0-...-3f3d2ed Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolMessageTypeOK      = "OK"
	ProtocolMessageTypeABORT   = "ABORT"
	ProtocolMessageTypeRESTART = "RESTART"
	ProtocolMessageTypeERROR   = "ERROR"
)

Variables

This section is empty.

Functions

func CommitmentKeys

func CommitmentKeys(ck []byte) (matrix.PolyQMatrix, matrix.PolyQMatrix)

func Hash0

func Hash0(data []byte) poly.PolyQ

func Hash1

func Hash1(data []byte) [32]byte

func Hash2

func Hash2(data []byte) [32]byte

func Hash3

func Hash3(data []byte) [32]byte

func Hash4

func Hash4(data []byte) [32]byte

func Hint

func Hint(r, rPrime vector.PolyVector, alpha int64) (vector.PolyVector, vector.PolyVector)

func OpenCommitment

func OpenCommitment(A1, A2 matrix.PolyQMatrix, c1, c2, m, r vector.PolyQVector) bool

func UseHint

func UseHint(r, h1, h2 vector.PolyVector, alpha int64) vector.PolyVector

Types

type ChanComms

type ChanComms struct {
	ToOtherParty   chan any
	FromOtherParty chan any
}

func (ChanComms) Get

func (c ChanComms) Get() any

func (ChanComms) Send

func (c ChanComms) Send(message any)

type Comms

type Comms interface {
	Send(message any)
	Get() any
}

type ProtocolMessage

type ProtocolMessage struct {
	Message string
}

type TopcoatPrivateKeyShare

type TopcoatPrivateKeyShare struct {
	ASeed           [32]byte
	Ttheirs, S1, S2 vector.PolyQVector
}

type TopcoatPublicKey

type TopcoatPublicKey struct {
	ASeed [32]byte
	T     vector.PolyQVector
}

func (TopcoatPublicKey) Serialize

func (pk TopcoatPublicKey) Serialize() []byte

type TopcoatSignature

type TopcoatSignature struct {
	Z, C1, C2      vector.PolyQVector
	H1, H2         vector.PolyVector
	RSeed1, RSeed2 [32]byte
	Iterations     int //temp
}

func (TopcoatSignature) Serialize

func (sig TopcoatSignature) Serialize() []byte

Jump to

Keyboard shortcuts

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