crypto

package
v0.0.0-...-b58972c Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HashSize                   = 32
	BandersnatchSize           = 32
	BandersnatchSerializedSize = 33
	Ed25519PublicSize          = 32
	Ed25519PrivateSize         = 64
	Ed25519SignatureSize       = 64
	BLSSize                    = 144
	BandersnatchRingSize       = 144
	MetadataSize               = 128
	VrfProofSize               = 784
)

Variables

This section is empty.

Functions

func StringToHex

func StringToHex(s string) ([]byte, error)

StringToHex converts a hex string to a byte slice

Types

type BandersnatchOutputHash

type BandersnatchOutputHash [32]byte

type BandersnatchPrivateKey

type BandersnatchPrivateKey [BandersnatchSize]byte

type BandersnatchPublicKey

type BandersnatchPublicKey [BandersnatchSize]byte

func (BandersnatchPublicKey) TicketOrKeyType

func (b BandersnatchPublicKey) TicketOrKeyType()

type BandersnatchSeedKey

type BandersnatchSeedKey [BandersnatchSize]byte

type BandersnatchSignature

type BandersnatchSignature [96]byte

type BlsKey

type BlsKey [BLSSize]byte

type ED25519PublicKeySet

type ED25519PublicKeySet map[[Ed25519PublicSize]byte]struct{}

func (ED25519PublicKeySet) Add

func (set ED25519PublicKeySet) Add(key ed25519.PublicKey)

func (ED25519PublicKeySet) Has

type Ed25519Signature

type Ed25519Signature [Ed25519SignatureSize]byte

type EpochKeys

func (EpochKeys) TicketsOrKeysType

func (e EpochKeys) TicketsOrKeysType()

type Hash

type Hash [HashSize]byte

func HashData

func HashData(data []byte) Hash

func KeccakData

func KeccakData(data []byte) Hash

KeccakData hashes the input data using Keccak-256

type MetadataKey

type MetadataKey [MetadataSize]byte

type RingCommitment

type RingCommitment [BandersnatchRingSize]byte

type RingVrfSignature

type RingVrfSignature [VrfProofSize]byte

type ValidatorKey

type ValidatorKey struct {
	Bandersnatch BandersnatchPublicKey
	Ed25519      ed25519.PublicKey
	Bls          BlsKey
	Metadata     MetadataKey
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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