crypto

package
v1.5.15 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: GPL-3.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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