crypto

package
v1.5.29 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BLS

type BLS interface {
	VerifyBLS(key []byte, msg []byte, sig []byte) error
}

BLS defines the functionality of a component able to verify BLS signatures

type Ed25519

type Ed25519 interface {
	VerifyEd25519(key []byte, msg []byte, sig []byte) error
}

Ed25519 defines the functionality of a component able to verify Ed25519 signatures

type Hasher

type Hasher interface {
	Sha256(data []byte) ([]byte, error)
	Keccak256(data []byte) ([]byte, error)
	Ripemd160(data []byte) ([]byte, error)
}

Hasher defines the functionality of a component able to generate hashes

type Secp256k1

type Secp256k1 interface {
	VerifySecp256k1(key []byte, msg []byte, sig []byte, hashType uint8) error
	EncodeSecp256k1DERSignature(r, s []byte) []byte
}

Secp256k1 defines the functionality of a component able to verify and encode Secp256k1 signatures

type VMCrypto

type VMCrypto interface {
	Hasher
	Ed25519
	BLS
	Secp256k1
}

VMCrypto will provide the interface to the main crypto functionalities of the vm

Directories

Path Synopsis
bls

Jump to

Keyboard shortcuts

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