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

Class TriplesPRSSMixin

source code


Mixin class for generating multiplication triples using PRSS.
Instance Methods [hide private]
 
get_triple(self, field) source code
 
generate_triples(self, field, quantity=20)
Generate quantity multiplication triples using PRSS.
source code
Method Details [hide private]

get_triple(self, field)

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

generate_triples(self, field, quantity=20)

source code 

Generate quantity multiplication triples using PRSS.

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 singleton-list with a 3-tuple.