utils

package
v0.0.0-...-ab61f1e Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ElGamalDecrypt

func ElGamalDecrypt(private kyber.Scalar, egp ElGamalPair) kyber.Point

ElGamalDecrypt performs the ElGamal decryption algorithm.

func GetBLSKeyPair

func GetBLSKeyPair(id *network.ServerIdentity) *key.Pair

func GetCodeHash

func GetCodeHash() []byte

func HashPoint

func HashPoint(p kyber.Point) ([]byte, error)

func HashPoints

func HashPoints(ps []kyber.Point) ([]byte, error)

func HashString

func HashString(val string) []byte

func HashUint64

func HashUint64(val uint64) []byte

func SearchPublicKey

func SearchPublicKey(p *onet.TreeNodeInstance, servID *network.ServerIdentity) int

Types

type ElGamalPair

type ElGamalPair struct {
	K kyber.Point // C1
	C kyber.Point // C2
}

func ElGamalEncrypt

func ElGamalEncrypt(public kyber.Point, message []byte) ElGamalPair

ElGamalEncrypt performs the ElGamal encryption algorithm.

type ElGamalPairs

type ElGamalPairs struct {
	Pairs []ElGamalPair
}

func GenerateMesgs

func GenerateMesgs(count int, m string, key kyber.Point) ([][]byte, ElGamalPairs)

func (*ElGamalPairs) Hash

func (ps *ElGamalPairs) Hash() ([]byte, error)

Jump to

Keyboard shortcuts

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