Versions in this module Expand all Collapse all v1 v1.0.3 Nov 23, 2023 v1.0.2 Nov 24, 2022 Changes in this version + const AES128 + const AES256 + const AND + const EQ + const INV + const KBitMod8 + const XOR + var ErrInputBit = errors.New("the bit input is wrong") + var ErrInputSize = errors.New("the size of input is wrong") + var ErrNONIMPLEMENT = errors.New("the gate is not implemented") + var ErrNONSUPPORTGATE = errors.New("the gate is not supportted") + var ErrPARSEFAILURE = errors.New("the parse failures") + var File_github_com_getamis_alice_crypto_circuit_message_proto protoreflect.FileDescriptor + func DecodeBristolFashionOutput(binaryOutput []uint8) (string, error) + func Decrypt(d []int32, Y [][]byte) []uint8 + func SetShaStateBristolInput(state []uint64) ([]uint8, error) + type Circuit struct + func LoadBristol(path string) (*Circuit, error) + func (cir *Circuit) Garbled(kBit int, input []uint8, f EncFunc) (*GarbleCircuit, *GarbleCircuitMessage, error) + type EncFunc func(*GarbleCircuit, []uint8) ([][]byte, error) + func EncryptFunc(startIndex int) EncFunc + type GarbleCircuit struct + E [][]byte + R []byte + func (garcir *GarbleCircuit) Encrypt(startIndex int, input []uint8) [][]byte + func (garcir *GarbleCircuit) EvaluateGarbleCircuit(garbledMsg *GarbleCircuitMessage, input [][]byte) ([][]byte, error) + func (garcir *GarbleCircuit) GenerateGarbleWire(startIndex, endIndex int) ([][]byte, [][]byte) + func (garcir *GarbleCircuit) GetOutputWire() [][][]byte + type GarbleCircuitMessage struct + D []int32 + F []*HalfGateMessage + HOutputWire0 [][]byte + HOutputWire1 [][]byte + StartCount []byte + X [][]byte + func (*GarbleCircuitMessage) Descriptor() ([]byte, []int) + func (*GarbleCircuitMessage) ProtoMessage() + func (x *GarbleCircuitMessage) GetD() []int32 + func (x *GarbleCircuitMessage) GetF() []*HalfGateMessage + func (x *GarbleCircuitMessage) GetHOutputWire0() [][]byte + func (x *GarbleCircuitMessage) GetHOutputWire1() [][]byte + func (x *GarbleCircuitMessage) GetStartCount() []byte + func (x *GarbleCircuitMessage) GetX() [][]byte + func (x *GarbleCircuitMessage) ProtoReflect() protoreflect.Message + func (x *GarbleCircuitMessage) Reset() + func (x *GarbleCircuitMessage) String() string + type Gate string + type HalfGateMessage struct + TE []byte + TG []byte + WireIndex int32 + func (*HalfGateMessage) Descriptor() ([]byte, []int) + func (*HalfGateMessage) ProtoMessage() + func (x *HalfGateMessage) GetTE() []byte + func (x *HalfGateMessage) GetTG() []byte + func (x *HalfGateMessage) GetWireIndex() int32 + func (x *HalfGateMessage) ProtoReflect() protoreflect.Message + func (x *HalfGateMessage) Reset() + func (x *HalfGateMessage) String() string