bellare_micali

package
v0.0.0-...-a01cb7b Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

1-out-of-n Oblivious transfer

Go implementation of Bellare-Micali oblivious transfer scheme based on Diffie-Hellman, supporting 1-out-n scenario

Tests

$ go test .

Reference

Oblivious transfer: https://en.wikipedia.org/wiki/Oblivious_transfer

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultCurveType = elliptic.P256()
)

Functions

func ComputePKs

func ComputePKs(c *big.Int, index int) (*big.Int, *ecdsa.PublicKey, error)

ComputePKs compute public keys based on given c, return random k and PK0 index is the index of target message

func RecoverM

func RecoverM(cs []CipherM, index int, k *big.Int) *big.Int

RecoverM recover message from cs

Types

type CipherM

type CipherM struct {
	RG   *ecdsa.PublicKey
	EncM *big.Int
}

CipherM encrypted message structure

func ComputeCs

func ComputeCs(c *big.Int, pk0 *ecdsa.PublicKey, ms []*big.Int) ([]CipherM, error)

ComputeCs compute cipherMs

Jump to

Keyboard shortcuts

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