viff
view viff/bedoza/share.py @ 1574:0d3b99e1e3eb
BeDOZa: Connected zero-knowledge proof to the remaining protocol.
| author | Thomas P Jakobsen <tpj@cs.au.dk> |
|---|---|
| date | Mon Oct 04 21:51:33 2010 +0200 (19 months ago) |
| parents | 54f02cd75714 |
| 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/>.
26 """Protocol for generating partial shares.
28 This protocol corresponds to the "Share" protocol in the document
29 "A new On- and Off-line Phase for MPC".
31 Each party inputs a list of field elements *field_elements*. The
32 values of the field elements are encrypted, the encrypted values
33 are exchanged, and for each player, a zero-knowledge proof is
34 carried out, proving that each player knows the plaintexts
35 corresponding to the ciphertexts, he broadcasts, and that the
36 plaintexts are of limited size.
38 Returns a deferred, which yields a list of PartialShareContents.
40 """
41 # TODO: We should assert that len(field_elements) == s.
43 # TODO: The gatherResults is used several times in this method in
44 # a way that prevents maximal asynchronicity. E.g. all players
45 # wait until all zero-knowledge proofs are completed before they
46 # start constructing partial shares. However, the callback for a
47 # particular partial share could be triggered as soon as the
48 # players have completed the zk proof for that share.
84 # We expect all players to broadcast the same number of
85 # encrypted shares.
