diff --git a/ot/co.go b/ot/co.go index 3ca6942b..03c6db44 100644 --- a/ot/co.go +++ b/ot/co.go @@ -290,17 +290,22 @@ func (co *CO) Send(wires []Wire) error { AaInvx := big.NewInt(0).Set(Aax) AaInvy := big.NewInt(0).Sub(curveParams.P, Aay) + BxRaw := big.NewInt(0) + ByRaw := big.NewInt(0) + for i := 0; i < len(wires); i++ { - Bx, err := ReceiveBigInt(co.io) + data, err := co.io.ReceiveData() if err != nil { return err } - By, err := ReceiveBigInt(co.io) + BxRaw.SetBytes(data) + data, err = co.io.ReceiveData() if err != nil { return err } + ByRaw.SetBytes(data) - Bx, By = co.curve.ScalarMult(Bx, By, aBytes) + Bx, By := co.curve.ScalarMult(BxRaw, ByRaw, aBytes) Bax, Bay := co.curve.Add(Bx, By, AaInvx, AaInvy) var labelData LabelData