Package viff :: Module active :: Class TriplesHyperinvertibleMatricesMixin
[hide private]
[frames] | no frames]

Class TriplesHyperinvertibleMatricesMixin

source code

Mixin class which generates multiplication triples using hyperinvertible matrices.
Instance Methods [hide private]
 
single_share_random(self, T, degree, field)
Share a random secret.
source code
 
double_share_random(self, T, d1, d2, field)
Double-share a random secret using two polynomials.
source code
 
get_triple(self, field) source code
 
generate_triples(self, field, quantity=None)
Generate multiplication triples.
source code
Class Variables [hide private]
  _hyper = None
A hyper-invertible matrix.
Method Details [hide private]

single_share_random(self, T, degree, field)

source code 

Share a random secret.

The guarantee is that a number of shares are made and out of those, the T that are returned by this method will be correct sharings of a random number using degree as the polynomial degree.

double_share_random(self, T, d1, d2, field)

source code 

Double-share a random secret using two polynomials.

The guarantee is that a number of shares are made and out of those, the T that are returned by this method will be correct double-sharings of a random number using d1 and d2 as the polynomial degrees.

get_triple(self, field)

source code 
Decorators:
  • @preprocess("generate_triples")

generate_triples(self, field, quantity=None)

source code 

Generate multiplication triples.

These are random numbers a, b, and c such that c = ab. This function can be used in pre-processing.

Returns a tuple with the number of triples generated and a Deferred which will yield a list of 3-tuples.


Class Variable Details [hide private]

_hyper

A hyper-invertible matrix.

It should be suitable for num_players players, but since we don't know the total number of players yet, we set it to None here and update it as necessary.

Value:
None