viff

changeset 1060:81b22c71a13e

Added output methods to PassiveRuntime and PaillierRuntime.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 16 Dec 2008 13:21:28 +0100
parents 476bac16b2d9
children 92705c83533a
files viff/paillier.py viff/passive.py
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/viff/paillier.py	Tue Dec 16 13:21:27 2008 +0100
     1.2 +++ b/viff/paillier.py	Tue Dec 16 13:21:28 2008 +0100
     1.3 @@ -114,6 +114,9 @@
     1.4          else:
     1.5              return results
     1.6  
     1.7 +    def output(self, share, receivers=None):
     1.8 +        return self.open(share, receivers)
     1.9 +
    1.10      @increment_pc
    1.11      def open(self, share, receivers=None):
    1.12          """Open *share* to *receivers* (defaults to both players)."""
     2.1 --- a/viff/passive.py	Tue Dec 16 13:21:27 2008 +0100
     2.2 +++ b/viff/passive.py	Tue Dec 16 13:21:28 2008 +0100
     2.3 @@ -49,6 +49,9 @@
     2.4          """Initialize runtime."""
     2.5          Runtime.__init__(self, player, threshold, options)
     2.6  
     2.7 +    def output(self, share, receivers=None, threshold=None):
     2.8 +        return self.open(share, receivers, threshold)
     2.9 +
    2.10      @increment_pc
    2.11      def open(self, share, receivers=None, threshold=None):
    2.12          """Open a secret sharing.