mta

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInconsistentAlphaAndBeta is returned if the number of alpha and beta are inconsistent
	ErrInconsistentAlphaAndBeta = errors.New("inconsistent alpha and beta")
)

Functions

func NewMta

func NewMta(fieldOrder *big.Int, homoCrypto homo.Crypto) (*mta, error)

Types

type Mta

type Mta interface {
	OverrideA(newA *big.Int) (Mta, error)
	GetEncK() []byte
	GetAG(curve elliptic.Curve) *pt.ECPoint
	GetAProof(curve elliptic.Curve) (*zkproof.SchnorrProofMessage, error)
	GetAK() *big.Int
	GetProductWithK(v *big.Int) *big.Int
	Decrypt(c *big.Int) (*big.Int, error)
	Compute(publicKey homo.Pubkey, encMessage []byte) (*big.Int, *big.Int, error)
	GetProofWithCheck(curve elliptic.Curve, beta *big.Int) ([]byte, error)
	VerifyProofWithCheck(proof []byte, curve elliptic.Curve, alpha *big.Int) (*pt.ECPoint, error)
	GetResult(alphas []*big.Int, betas []*big.Int) (*big.Int, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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