Documentation ¶
Index ¶
- func BreakCorrelation(rows [][]byte) []byte
- func Clmul128(a, b []byte) []byte
- type OTReceiver
- func (o *OTReceiver) CreateRequest(choiceBits []int) []byte
- func (o *OTReceiver) Init(otCount int)
- func (o *OTReceiver) ParseResponse(choiceBits []int, encodedOT []byte) []byte
- func (o *OTReceiver) SetupStep1() ([]byte, []byte)
- func (o *OTReceiver) SetupStep2(allBsBlob, senderSeedShare []byte) ([]byte, []byte, []byte, []byte)
- type OTSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BreakCorrelation ¶
Types ¶
type OTReceiver ¶
type OTReceiver struct { T0 [][]byte T1 [][]byte A *ristretto.Point RT0 []byte // contains filtered or unexported fields }
func (*OTReceiver) CreateRequest ¶
func (o *OTReceiver) CreateRequest(choiceBits []int) []byte
CreateRequest creates a request for OT for the choice bits.
func (*OTReceiver) Init ¶
func (o *OTReceiver) Init(otCount int)
func (*OTReceiver) ParseResponse ¶
func (o *OTReceiver) ParseResponse(choiceBits []int, encodedOT []byte) []byte
ParseResponse parses (i.e. decodes) the OT response from the OT sender and returns the plaintext result of OT. For every choice bit, it unmasks one of the two 16-byte messages.
func (*OTReceiver) SetupStep1 ¶
func (o *OTReceiver) SetupStep1() ([]byte, []byte)
func (*OTReceiver) SetupStep2 ¶
type OTSender ¶
type OTSender struct { TotalOT int // contains filtered or unexported fields }
OTSender implements the sender of the Oblivious Transfer acc.to. the KOS15 protocol
func (*OTSender) ProcessRequest ¶
ProcessRequest processes a request for OT from the OT receiver. otRequest contains bits which need to be flipped acc.to the Beaver derandomiation method. The Sender has two 16-byte messages for 1-of-2 OT and two random masks (from the KOS15 protocol) r0 and r1. If the bit to flip is 0, the Sender sends (m0 xor r0) and (m1 xor r1). If the bit to flip is 1, the Sender sends (m0 xor r1) and (m1 xor r0). Returns an OT response.