oblivious_transfer

package
v0.0.0-...-ebe581b Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	IndexOne = iota
	IndexTwo
)

message index

Variables

View Source
var (
	IndexError = errors.New("chosenIndex is invalid. Must be 0 or 1")
)

Functions

func ReceiverChoose

func ReceiverChoose(receiverPrivateKey *ecdsa.PrivateKey, senderPublicKey *ecdsa.PublicKey, chosenIndex int) (*ecdsa.PublicKey, error)

ReceiverChoose 接收方Bob选择需要哪份数据,也就是做1 of 2选择

func ReceiverRetrieveMsg

func ReceiverRetrieveMsg(receiverPrivateKey *ecdsa.PrivateKey, senderPublicKey *ecdsa.PublicKey, cts []string, chosenIndex int) (string, error)

ReceiverRetrieveMsg Bob根据之前的选择结果,解密并获取自己需要的数据

func SenderEncryptMsg

func SenderEncryptMsg(senderPrivateKey *ecdsa.PrivateKey, receiverPublicKey *ecdsa.PublicKey, msgs []string) ([]string, error)

SenderEncryptMsg 发送方Alice根据接收方Bob发来的公钥,做进一步计算

Types

This section is empty.

Jump to

Keyboard shortcuts

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