func (l *Label) SetBytes(data []byte) {
	l.d0 = binary.BigEndian.Uint64(data[0:8])
	l.d1 = binary.BigEndian.Uint64(data[8:16])
}
SetBytes sets the label data from bytes.
package ot
import (
	"crypto/rand"
	"crypto/rsa"
	"encoding/binary"
	"fmt"
	"io"
	"math/big"
	"github.com/markkurossi/mpc/ot/mpint"
	"github.com/markkurossi/mpc/pkcs1"
)
func RandomData(size int) ([]byte, error) {
	m := make([]byte, size)
	_, err := rand.Read(m)
	if err != nil {
		return nil, err
	}
	return m, nil
}
type Label struct {
	d0 uint64
	d1 uint64
}
type LabelData [16]byte
func (l Label) String() string {
	return fmt.Sprintf("%016x%016x", l.d0, l.d1)
}
func (l Label) Equal(o Label) bool {
	return l.d0 == o.d0 && l.d1 == o.d1
}
func NewLabel(rand io.Reader) (Label, error) {
	var buf LabelData
	var label Label
	if _, err := rand.Read(buf[:]); err != nil {
		return label, err
	}
	label.SetData(&buf)
	return label, nil
}
func NewTweak(tweak uint32) Label {
	return Label{
		d1: uint64(tweak),
	}
}
func (l Label) S() bool {
	return (l.d0 & 0x8000000000000000) != 0
}
func (l *Label) SetS(set bool) {
	if set {
		l.d0 |= 0x8000000000000000
	} else {
		l.d0 &= 0x7fffffffffffffff
	}
}
func (l *Label) Mul2() {
	l.d0 <<= 1
	l.d0 |= (l.d1 >> 63)
	l.d1 <<= 1
}
func (l *Label) Mul4() {
	l.d0 <<= 2
	l.d0 |= (l.d1 >> 62)
	l.d1 <<= 2
}
func (l *Label) Xor(o Label) {
	l.d0 ^= o.d0
	l.d1 ^= o.d1
}
func (l Label) GetData(buf *LabelData) {
	binary.BigEndian.PutUint64(buf[0:8], l.d0)
	binary.BigEndian.PutUint64(buf[8:16], l.d1)
}
func (l *Label) SetData(data *LabelData) {
	l.d0 = binary.BigEndian.Uint64((*data)[0:8])
	l.d1 = binary.BigEndian.Uint64((*data)[8:16])
}
func (l Label) Bytes(buf *LabelData) []byte {
	l.GetData(buf)
	return buf[:]
}