mta_ot

package
v0.0.0-...-35ce414 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Receiver

type Receiver struct {
	// contains filtered or unexported fields
}

Receiver is the party that plays the role of Sender in the multiplication protocol (protocol 5 of the paper).

func NewReceiver

func NewReceiver(seedOtResults *simplest.SenderOutput, curve *curves.Curve, uniqueSessionId [simplest.DigestSize]byte) (*Receiver, error)

NewReceiver generates a `MultiplyReceiver` instance, ready to take part in multiplication as the "receiver". You must supply it the _output_ of a seed OT, from the sender's point of view, as well as params and a unique ID. That is, the mult sender must run the base OT as the sender; note the (apparent) reversal of roles.

func (*Receiver) Init

func (receiver *Receiver) Init(beta curves.Scalar) *Round1Output

init Protocol 5., Multiplication, 3). Bob (receiver) encodes beta and initiates the cOT extension

func (*Receiver) Multiply

func (receiver *Receiver) Multiply(round2Output *Round2Output) curves.Scalar

multiply Protocol 5., Multiplication, 3) and 6). Bob finalizes the cOT extension. using that and Alice's multiplication message, Bob completes the multiplication protocol, including checks. At the end, Bob's values tB_j are populated.

type Round1Output

type Round1Output = kos.Round1Output

type Round2Output

type Round2Output struct {
	COTRound2Output *kos.Round2Output
	R               [kos.L]curves.Scalar
	U               curves.Scalar
}

Round2Output is the output of the second round of the multiplication protocol.

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

Sender is the party that plays the role of Sender in the multiplication protocol (protocol 5 of the paper).

func NewSender

func NewSender(seedOtResults *simplest.ReceiverOutput, curve *curves.Curve, uniqueSessionId [simplest.DigestSize]byte) (*Sender, error)

NewSender generates a `MultiplySender` instance, ready to take part in multiplication as the "sender". You must supply it the _output_ of a seed OT, from the receiver's point of view, as well as params and a unique ID. That is, the mult sender must run the base OT as the receiver; note the (apparent) reversal of roles.

func (*Sender) Update

func (sender *Sender) Update(alpha curves.Scalar, round1Output *kos.Round1Output) (curves.Scalar, *Round2Output)

update Protocol 5., steps 3) 5), 7). Alice _responds_ to Bob's initial cOT message, using alpha as input. Doesn't actually send the message yet, only stashes it and moves onto the next steps of the multiplication protocol specifically, Alice can then do step 5) (compute the outputs of the multiplication protocol), also stashes this. Finishes by taking care of 7), after that, Alice is totally done with multiplication and has stashed the outputs.

Jump to

Keyboard shortcuts

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