committee

package
v0.0.0-...-4e644ab Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(encryptedBytes []byte, privateKey *rsa.PrivateKey) []byte

func Encrypt

func Encrypt(message string, publicKey *rsa.PublicKey) []byte

func ExportRSAPrivateKey

func ExportRSAPrivateKey(privkey *rsa.PrivateKey) string

func ExportRSAPublicKey

func ExportRSAPublicKey(pubkey *rsa.PublicKey) string

func GenerateRSAKeyPair

func GenerateRSAKeyPair() (*rsa.PrivateKey, *rsa.PublicKey)

func GenerateVRFKeys

func GenerateVRFKeys() ([]byte, []byte, error)

func GetKey

func GetKey(key string) (string, error)

func GetKeyBytes

func GetKeyBytes(key string) ([]byte, error)

func GetMagicSeed

func GetMagicSeed() ([]byte, error)

func GetPeers

func GetPeers() ([]peerpb.Peer, error)

func HashSHA256

func HashSHA256(content string) [32]byte

func ParseRSAPrivateKey

func ParseRSAPrivateKey(privPEM string) (*rsa.PrivateKey, error)

func ParseRSAPublicKey

func ParseRSAPublicKey(pubPEM string) (*rsa.PublicKey, error)

func Prove

func Prove(message []byte) ([]byte, []byte, error)

func SaveKey

func SaveKey(content string, key string) (bool, error)

func SaveKeyBytes

func SaveKeyBytes(content []byte, key string) (bool, error)

func SavePeer

func SavePeer(peer peerpb.Peer) (bool, error)

func Sign

func Sign(message string, privateKey rsa.PrivateKey) (string, string)

func Verify

func Verify(checksum string, signature string, publicKey *rsa.PublicKey) bool

func VerifyVRF

func VerifyVRF(message []byte, proof []byte) (bool, error)

func WriteToFile

func WriteToFile(content string, filename string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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