simot

package
v1.3.71 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: BSD-3-Clause Imports: 8 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 {
	A group.Element // The random group element from the sender

	B group.Element // B = [b]G if c == 0, B = A+[b]G if c == 1
	// contains filtered or unexported fields
}

func (*Receiver) Returnmc

func (receiver *Receiver) Returnmc() []byte

func (*Receiver) Round1Receiver

func (receiver *Receiver) Round1Receiver(myGroup group.Group, choice int, index int, A group.Element) group.Element

Input: myGroup, the group we operate in Input: choice, the receiver choice bit Input: index, the index of this SimOT Input: A, from sender Output: B = [b]G if c == 0, B = A+[b]G if c == 1 (Implementation in constant time). b, the receiver randomness

func (*Receiver) Round3Receiver

func (receiver *Receiver) Round3Receiver(e0, e1 []byte, choice int) error

Input: e0, e1: encryption of m0 and m1 from the sender Input: choice, choice bit of receiver Choose e0 or e1 based on choice bit in constant time

type Sender

type Sender struct {
	A group.Element // [a]G
	B group.Element // The random group element from the receiver
	// contains filtered or unexported fields
}

func (*Sender) InitSender

func (sender *Sender) InitSender(myGroup group.Group, m0, m1 []byte, index int) group.Element

Input: myGroup, the group we operate in Input: m0, m1 the 2 message of the sender Input: index, the index of this SimOT Output: A = [a]G, a the sender randomness

func (*Sender) Returne0e1

func (sender *Sender) Returne0e1() ([]byte, []byte)

func (*Sender) Returnm0m1

func (sender *Sender) Returnm0m1() ([]byte, []byte)

func (*Sender) Round2Sender

func (sender *Sender) Round2Sender(B group.Element) ([]byte, []byte)

Input: B from the receiver Output: e0, e1, encryption of m0 and m1 under key k0, k1

Jump to

Keyboard shortcuts

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