Documentation
¶
Index ¶
- Constants
- type Ciphertext
- func (z *Ciphertext) Add(api frontend.API, x, y *Ciphertext) *Ciphertext
- func (z *Ciphertext) AssertIsEqual(api frontend.API, x *Ciphertext)
- func (z *Ciphertext) Select(api frontend.API, b frontend.Variable, i1 *Ciphertext, i2 *Ciphertext) *Ciphertext
- func (z *Ciphertext) Serialize() []frontend.Variable
- type Ciphertexts
- func (cs *Ciphertexts) Add(api frontend.API, x, y *Ciphertexts) *Ciphertexts
- func (cs *Ciphertexts) AssertIsEqual(api frontend.API, x *Ciphertexts)
- func (cs *Ciphertexts) Select(api frontend.API, b frontend.Variable, i1 *Ciphertexts, i2 *Ciphertexts) *Ciphertexts
- func (cs *Ciphertexts) Serialize() []frontend.Variable
Constants ¶
View Source
const NumCiphertexts = 8
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ciphertext ¶
type Ciphertext struct {
C1, C2 twistededwards.Point
}
func NewCiphertext ¶
func NewCiphertext() *Ciphertext
func (*Ciphertext) Add ¶
func (z *Ciphertext) Add(api frontend.API, x, y *Ciphertext) *Ciphertext
Add sets z to the sum x+y and returns z.
Panics if twistededwards curve init fails.
func (*Ciphertext) AssertIsEqual ¶
func (z *Ciphertext) AssertIsEqual(api frontend.API, x *Ciphertext)
AssertIsEqual fails if any of the fields differ between z and x
func (*Ciphertext) Select ¶
func (z *Ciphertext) Select(api frontend.API, b frontend.Variable, i1 *Ciphertext, i2 *Ciphertext) *Ciphertext
Select if b is true, sets z = i1, else z = i2, and returns z
func (*Ciphertext) Serialize ¶
func (z *Ciphertext) Serialize() []frontend.Variable
Serialize returns a slice with the C1.X, C1.Y, C2.X, C2.Y in order
type Ciphertexts ¶
type Ciphertexts [NumCiphertexts]Ciphertext
func NewCiphertexts ¶
func NewCiphertexts() *Ciphertexts
func (*Ciphertexts) Add ¶
func (cs *Ciphertexts) Add(api frontend.API, x, y *Ciphertexts) *Ciphertexts
Add sets z to the sum x+y and returns z.
Panics if twistededwards curve init fails.
func (*Ciphertexts) AssertIsEqual ¶
func (cs *Ciphertexts) AssertIsEqual(api frontend.API, x *Ciphertexts)
AssertIsEqual fails if any of the fields differ between z and x
func (*Ciphertexts) Select ¶
func (cs *Ciphertexts) Select(api frontend.API, b frontend.Variable, i1 *Ciphertexts, i2 *Ciphertexts) *Ciphertexts
Select if b is true, sets z = i1, else z = i2, and returns z
func (*Ciphertexts) Serialize ¶
func (cs *Ciphertexts) Serialize() []frontend.Variable
Serialize returns a slice with the C1.X, C1.Y, C2.X, C2.Y in order
Click to show internal directories.
Click to hide internal directories.