homo

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto

type Crypto interface {
	Pubkey
	Decrypt(c []byte) ([]byte, error)
	GetMtaProof(curve elliptic.Curve, beta *big.Int, a *big.Int) ([]byte, error)
	VerifyMtaProof(msg []byte, curve elliptic.Curve, alpha *big.Int, k *big.Int) (*pt.ECPoint, error)
	GetPubKey() Pubkey
	NewPubKeyFromBytes([]byte) (Pubkey, error)
}

type Pubkey

type Pubkey interface {
	GetMessageRange(fieldOrder *big.Int) *big.Int
	Encrypt(m []byte) ([]byte, error)
	Add(c1 []byte, c2 []byte) ([]byte, error)
	MulConst(c []byte, scalar *big.Int) ([]byte, error)
	VerifyEnc([]byte) error
	ToPubKeyBytes() []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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