viff
view viff/bedoza/add_macs.py @ 1535:b4451e4ac76d
BeDOZa: Use gmpy for modular exponentiation.
| author | Thomas P Jakobsen <tpj@cs.au.dk> |
|---|---|
| date | Tue Aug 10 16:03:54 2010 +0200 (21 months ago) |
| parents | 4e8c0035e894 |
| children |
line source
1 # Copyright 2010 VIFF Development Team.
2 #
3 # This file is part of VIFF, the Virtual Ideal Functionality Framework.
4 #
5 # VIFF is free software: you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License (LGPL) as
7 # published by the Free Software Foundation, either version 3 of the
8 # License, or (at your option) any later version.
9 #
10 # VIFF is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
13 # Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with VIFF. If not, see <http://www.gnu.org/licenses/>.
31 """Adds macs to the set of PartialBeDOZaShares.
33 Returns a deferred which yields a list of full shares, e.g.
34 including macs. (the full shares are deferreds of type
35 BeDOZaShare.)
36 """
37 # TODO: Would be nice with a class ShareContents like the class
38 # PartialShareContents used here.
43 """The transmission_restraint_constant is the number of
44 encrypted shares we can safely transmit in one call to
45 sendData. The sendData method can only transmit up to
46 65536 bytes.
47 The constant has been imperically determined by running
48 TripleGenerator.generate_triples.
49 TODO: How can we allow a user of the runtime to adjust this
50 constraint at a higher level of abstraction?
51 """
65 # TODO: This is probably not the fastes way to generate
66 # the betas.
