viff

changeset 1531:5ac22a4919ec

BeDOZa: Shortened long lines.
author Thomas P Jakobsen <tpj@cs.au.dk>
date Fri, 06 Aug 2010 15:00:46 +0200
parents 408356ca17f4
children efbdd25601b8
files viff/bedoza/add_macs.py viff/bedoza/bedoza.py viff/bedoza/bedoza_triple.py viff/bedoza/modified_paillier.py viff/bedoza/share_generators.py viff/bedoza/shares.py
diffstat 6 files changed, 99 insertions(+), 49 deletions(-) [+]
line diff
     1.1 --- a/viff/bedoza/add_macs.py	Fri Aug 06 11:34:50 2010 +0200
     1.2 +++ b/viff/bedoza/add_macs.py	Fri Aug 06 15:00:46 2010 +0200
     1.3 @@ -65,7 +65,8 @@
     1.4                  # TODO: This is probably not the fastes way to generate
     1.5                  # the betas.
     1.6                  beta = random.randint(0, u_bound)
     1.7 -                # TODO: Outcommented until mod paillier works for negative numbers.
     1.8 +                # TODO: Outcommented until mod paillier works for negative
     1.9 +                #       numbers.
    1.10                  # if rand.choice([True, False]):
    1.11                  #    beta = -beta
    1.12                  enc_beta = paillier.encrypt(beta, player_id = j + 1)
    1.13 @@ -86,7 +87,8 @@
    1.14                      r[inx] += xs
    1.15              return r
    1.16  
    1.17 -        def finish_sharing(recevied_cs, partial_share_contents, lists_of_mac_keys, result_shares):
    1.18 +        def finish_sharing(recevied_cs, partial_share_contents,
    1.19 +                           lists_of_mac_keys, result_shares):
    1.20              recevied_cs = merge(recevied_cs)
    1.21              shares = []               
    1.22              for inx in xrange(0, len(partial_share_contents)):
    1.23 @@ -100,9 +102,9 @@
    1.24                  mac_key_list = BeDOZaKeyList(alpha, mac_keys)
    1.25  
    1.26                  mac_msg_list = BeDOZaMACList(decrypted_cs)
    1.27 -                result_shares[inx].callback(BeDOZaShareContents(partial_share.value,
    1.28 -                                                                mac_key_list,
    1.29 -                                                                mac_msg_list))
    1.30 +                result_shares[inx].callback(
    1.31 +                    BeDOZaShareContents(partial_share.value, mac_key_list,
    1.32 +                                        mac_msg_list))
    1.33              return shares
    1.34  
    1.35          runtime.schedule_callback(gatherResults(received_cs),
    1.36 @@ -112,7 +114,8 @@
    1.37                                    result_shares)
    1.38          return received_cs
    1.39  
    1.40 -    result_shares = [Share(runtime, field) for x in xrange(len(partial_shares))]
    1.41 +    result_shares = [Share(runtime, field)
    1.42 +                     for x in xrange(len(partial_shares))]
    1.43      runtime.schedule_callback(gatherResults(partial_shares),
    1.44                                do_add_macs,
    1.45                                result_shares)
     2.1 --- a/viff/bedoza/bedoza.py	Fri Aug 06 11:34:50 2010 +0200
     2.2 +++ b/viff/bedoza/bedoza.py	Fri Aug 06 15:00:46 2010 +0200
     2.3 @@ -64,7 +64,9 @@
     2.4                  if reduce(lambda x, y: true_str == y, ls):
     2.5                      return x
     2.6                  else:
     2.7 -                    raise BeDOZaException("Wrong commitment. Some player revieved a wrong commitment. My commitments were: %s", isOK)
     2.8 +                    raise BeDOZaException("Wrong commitment. Some player "
     2.9 +                                          "revieved a wrong commitment. My "
    2.10 +                                          "commitments were: %s", isOK)
    2.11  
    2.12              n = len(self.players)
    2.13              alpha = keyLists[0].alpha
    2.14 @@ -84,7 +86,8 @@
    2.15              ds = self.broadcast(self.players.keys(), self.players.keys(),
    2.16                                  str(isOK))
    2.17              ds = gatherResults(ds)
    2.18 -            ds.addCallbacks(check, self.error_handler, callbackArgs=(values, isOK))
    2.19 +            ds.addCallbacks(check, self.error_handler,
    2.20 +                            callbackArgs=(values, isOK))
    2.21              return ds
    2.22          
    2.23          def exchange(ls, receivers):
    2.24 @@ -96,7 +99,8 @@
    2.25                  for inx, beDOZaContents in enumerate(ls):
    2.26                      keyLists.append(beDOZaContents.get_keys())
    2.27                      message_string += "%s:%s;" % \
    2.28 -                           (beDOZaContents.get_value().value, beDOZaContents.get_mac(other_id - 1).value)
    2.29 +                           (beDOZaContents.get_value().value,
    2.30 +                            beDOZaContents.get_mac(other_id - 1).value)
    2.31                  self.protocols[other_id].sendData(pc, TEXT, message_string)
    2.32  
    2.33              if self.id in receivers:
    2.34 @@ -114,7 +118,8 @@
    2.35                      self._expect_data(other_id, TEXT, d)
    2.36                      values[inx] = d
    2.37                  result = gatherResults(values)
    2.38 -                result.addCallbacks(recombine_value, self.error_handler, callbackArgs=(keyLists, len(shares)))
    2.39 +                result.addCallbacks(recombine_value, self.error_handler,
    2.40 +                                    callbackArgs=(keyLists, len(shares)))
    2.41                  return result
    2.42  
    2.43          result = gather_shares(shares)
    2.44 @@ -145,7 +150,9 @@
    2.45                  if reduce(lambda x, y: true_str == y, ls):
    2.46                      return a, b
    2.47                  else:
    2.48 -                    raise BeDOZaException("Wrong commitment. Some player revieved a wrong commitment. My commitments were: %s", isOK)
    2.49 +                    raise BeDOZaException("Wrong commitment. Some player "
    2.50 +                                          "revieved a wrong commitment. My "
    2.51 +                                          "commitments were: %s", isOK)
    2.52  
    2.53              n = len(self.players)
    2.54              alpha_a = keyList_a.alpha
    2.55 @@ -171,7 +178,8 @@
    2.56              ds = self.broadcast(self.players.keys(), self.players.keys(),
    2.57                                  str(isOK))
    2.58              ds = gatherResults(ds)
    2.59 -            ds.addCallbacks(check, self.error_handler, callbackArgs=(a, b, isOK))
    2.60 +            ds.addCallbacks(check, self.error_handler,
    2.61 +                            callbackArgs=(a, b, isOK))
    2.62              return ds
    2.63          
    2.64          def exchange((a, b), receivers):
    2.65 @@ -195,7 +203,8 @@
    2.66                      values_b[inx] =  self._expect_share(other_id, field)
    2.67                      codes_b[inx] = self._expect_share(other_id, field)
    2.68                  result = gatherResults(values_a + codes_a + values_b + codes_b)
    2.69 -                self.schedule_callback(result, recombine_value, a.get_keys(), b.get_keys())
    2.70 +                self.schedule_callback(result, recombine_value, a.get_keys(),
    2.71 +                                       b.get_keys())
    2.72                  return result
    2.73  
    2.74          result = gather_shares([share_a, share_b])
    2.75 @@ -236,7 +245,9 @@
    2.76                  if reduce(lambda x, y: true_str == y, ls):
    2.77                      return x
    2.78                  else:
    2.79 -                    raise BeDOZaException("Wrong commitment. Some player revieved a wrong commitment. My commitments were: %s", isOK)
    2.80 +                    raise BeDOZaException("Wrong commitment. Some player "
    2.81 +                                          "revieved a wrong commitment. My "
    2.82 +                                          "commitments were: %s", isOK)
    2.83                  
    2.84              ds = self.broadcast(self.players.keys(), self.players.keys(),
    2.85                                  str(isOK))
    2.86 @@ -248,8 +259,10 @@
    2.87              # Send share to all receivers.
    2.88              pc = tuple(self.program_counter)
    2.89              for other_id in receivers:
    2.90 -                self.protocols[other_id].sendShare(pc, shareContent.get_value())
    2.91 -                self.protocols[other_id].sendShare(pc, shareContent.get_mac(other_id - 1))
    2.92 +                self.protocols[other_id].sendShare(
    2.93 +                    pc, shareContent.get_value())
    2.94 +                self.protocols[other_id].sendShare(
    2.95 +                    pc, shareContent.get_mac(other_id - 1))
    2.96              if self.id in receivers:
    2.97                  num_players = len(self.players.keys())
    2.98                  values = num_players * [None]
    2.99 @@ -258,7 +271,8 @@
   2.100                      values[inx] =  self._expect_share(other_id, field)
   2.101                      codes[inx] = self._expect_share(other_id, field)
   2.102                  result = gatherResults(values + codes)
   2.103 -                result.addCallbacks(recombine_value, self.error_handler, callbackArgs=(shareContent.get_keys(),))
   2.104 +                result.addCallbacks(recombine_value, self.error_handler,
   2.105 +                                    callbackArgs=(shareContent.get_keys(),))
   2.106                  return result
   2.107  
   2.108          result = share.clone()
   2.109 @@ -273,7 +287,8 @@
   2.110  
   2.111      def _plus_public(self, x, c, field):
   2.112          x = x.add_public(c, self.id)
   2.113 -        return BeDOZaShare(self, field, x.get_value(), x.get_keys(), x.get_macs())
   2.114 +        return BeDOZaShare(self, field, x.get_value(), x.get_keys(),
   2.115 +                           x.get_macs())
   2.116  
   2.117      def _plus(self, (x, y), field):
   2.118          """Addition of share-contents *x* and *y*."""
   2.119 @@ -281,7 +296,8 @@
   2.120  
   2.121      def _minus_public_right(self, x, c, field):
   2.122          z = self._minus_public_right_without_share(x, c, field)
   2.123 -        return BeDOZaShare(self, field, z.get_value(), z.get_keys(), z.get_macs())
   2.124 +        return BeDOZaShare(self, field, z.get_value(), z.get_keys(),
   2.125 +                           z.get_macs())
   2.126  
   2.127      def _minus_public_right_without_share(self, x, c, field):
   2.128          return x.sub_public(c, self.id)
     3.1 --- a/viff/bedoza/bedoza_triple.py	Fri Aug 06 11:34:50 2010 +0200
     3.2 +++ b/viff/bedoza/bedoza_triple.py	Fri Aug 06 15:00:46 2010 +0200
     3.3 @@ -27,7 +27,8 @@
     3.4  from viff.field import FieldElement, GF
     3.5  from viff.constants import TEXT
     3.6  from viff.util import rand
     3.7 -from viff.bedoza.shares import BeDOZaShare, BeDOZaShareContents, PartialShare, PartialShareContents
     3.8 +from viff.bedoza.shares import BeDOZaShare, BeDOZaShareContents, PartialShare
     3.9 +from viff.bedoza.shares import PartialShareContents
    3.10  from viff.bedoza.share_generators import PartialShareGenerator, ShareGenerator
    3.11  from viff.bedoza.keylist import BeDOZaKeyList
    3.12  from viff.bedoza.maclist import BeDOZaMACList
    3.13 @@ -68,7 +69,8 @@
    3.14          # Debug output.
    3.15          #print "n_%d**2:%d" % (runtime.id, self.paillier.pubkey['n_square'])
    3.16          #print "n_%d:%d" % (runtime.id, self.paillier.pubkey['n'])
    3.17 -        #print "n_%d bitlength: %d" % (runtime.id, self._bit_length_of(self.paillier.pubkey['n']))
    3.18 +        #print "n_%d bitlength: %d" % \
    3.19 +        #    (runtime.id, self._bit_length_of(self.paillier.pubkey['n']))
    3.20  
    3.21          #self.Zp = GF(p)
    3.22          #self.Zn2 = GF(self.paillier.pubkey['n_square'])
    3.23 @@ -98,7 +100,8 @@
    3.24          
    3.25          def check(v, a, b, c):
    3.26              if v.value != 0:
    3.27 -                raise Exception("TripleTest failed - The two triples were inconsistent.")
    3.28 +                raise Exception("TripleTest failed - The two triples were "
    3.29 +                                "inconsistent.")
    3.30              return Triple(a, b, c)
    3.31          
    3.32          def compute_value(r, a, b, c, x, y, z):
    3.33 @@ -110,7 +113,8 @@
    3.34              v.addCallback(check, a, b, c)
    3.35              return v
    3.36  
    3.37 -        gen = ShareGenerator(self.Zp, self.runtime, self.random, self.paillier, self.u_bound, self.alpha)
    3.38 +        gen = ShareGenerator(self.Zp, self.runtime, self.random, self.paillier,
    3.39 +                             self.u_bound, self.alpha)
    3.40          
    3.41          random_shares = gen.generate_random_shares(n)
    3.42  
    3.43 @@ -142,15 +146,21 @@
    3.44  
    3.45          self.runtime.increment_pc()
    3.46          
    3.47 -        gen = PartialShareGenerator(self.Zp, self.runtime, self.random, self.paillier)
    3.48 +        gen = PartialShareGenerator(self.Zp, self.runtime, self.random,
    3.49 +                                    self.paillier)
    3.50          partial_shares = []
    3.51          for _ in xrange(2 * n):
    3.52 -             partial_shares.append(gen.generate_share(self.random.randint(0, self.Zp.modulus - 1)))
    3.53 +             partial_shares.append(
    3.54 +                 gen.generate_share(
    3.55 +                     self.random.randint(0, self.Zp.modulus - 1)))
    3.56  
    3.57  
    3.58 -        partial_shares_c = self._full_mul(partial_shares[0:n], partial_shares[n:2*n])
    3.59 +        partial_shares_c = self._full_mul(partial_shares[0:n],
    3.60 +                                          partial_shares[n:2*n])
    3.61  
    3.62 -        full_shares = add_macs(self.runtime, self.Zp, self.u_bound, self.alpha, self.random, self.paillier, partial_shares + partial_shares_c)
    3.63 +        full_shares = add_macs(self.runtime, self.Zp, self.u_bound, self.alpha,
    3.64 +                               self.random, self.paillier,
    3.65 +                               partial_shares + partial_shares_c)
    3.66  
    3.67          return full_shares  
    3.68  
    3.69 @@ -211,7 +221,8 @@
    3.70  
    3.71              for dis in all_dis:
    3.72                  for player_id in self.runtime.players:
    3.73 -                    self.runtime.protocols[player_id].sendData(pc, DiKIND, str(dis))
    3.74 +                    self.runtime.protocols[player_id].sendData(pc, DiKIND,
    3.75 +                                                               str(dis))
    3.76  
    3.77          if self.runtime.id == jnx:
    3.78              all_cs = []
    3.79 @@ -234,7 +245,8 @@
    3.80                      djs.append(self.paillier.encrypt(zj.value, jnx))
    3.81                  for djs in all_djs:
    3.82                      for player_id in self.runtime.players:
    3.83 -                        self.runtime.protocols[player_id].sendData(pc, DjKIND, str(djs))
    3.84 +                        self.runtime.protocols[player_id].sendData(pc, DjKIND,
    3.85 +                                                                   str(djs))
    3.86                  if not zis == []:
    3.87                      return [x + y for x, y in zip(zis, zjs)]
    3.88                  else:
    3.89 @@ -266,15 +278,18 @@
    3.90              djs = reduce(lambda x, y: x + eval(y), djs, [])
    3.91              n_square_i = self.paillier.get_modulus_square(inx)
    3.92              n_square_j = self.paillier.get_modulus_square(jnx)
    3.93 -            N_squared_list = [self.paillier.get_modulus_square(player_id) for player_id in self.runtime.players]
    3.94 +            N_squared_list = [self.paillier.get_modulus_square(player_id)
    3.95 +                              for player_id in self.runtime.players]
    3.96              ps = []
    3.97              
    3.98 -            for v, di, dj in itertools.izip_longest(values, dis, djs, fillvalue=self.Zp(0)):
    3.99 +            for v, di, dj in itertools.izip_longest(values, dis, djs,
   3.100 +                                                    fillvalue=self.Zp(0)):
   3.101                  value = v
   3.102                  enc_shares = len(self.runtime.players) * [1]
   3.103                  enc_shares[inx - 1] = (enc_shares[inx - 1] * di) % n_square_i
   3.104                  enc_shares[jnx - 1] = (enc_shares[jnx - 1] * dj) % n_square_j
   3.105 -                ps.append(PartialShareContents(value, enc_shares, N_squared_list))
   3.106 +                ps.append(PartialShareContents(value, enc_shares,
   3.107 +                                               N_squared_list))
   3.108              return ps
   3.109          r.addCallback(wrap, inx, jnx)
   3.110          return r
   3.111 @@ -296,7 +311,8 @@
   3.112              a_values = [s.value for s in shares[0:len_shares/2]]
   3.113              b_enc_shares = []
   3.114              for inx in self.runtime.players:              
   3.115 -                b_enc_shares.append([s.enc_shares[inx - 1] for s in shares[len_shares/2:]])
   3.116 +                b_enc_shares.append([s.enc_shares[inx - 1]
   3.117 +                                     for s in shares[len_shares/2:]])
   3.118              for inx in xrange(0, len(self.runtime.players)):
   3.119                  for jnx in xrange(0, len(self.runtime.players)):
   3.120                      deferreds.append(self._mul(inx + 1,
     4.1 --- a/viff/bedoza/modified_paillier.py	Fri Aug 06 11:34:50 2010 +0200
     4.2 +++ b/viff/bedoza/modified_paillier.py	Fri Aug 06 15:00:46 2010 +0200
     4.3 @@ -54,15 +54,16 @@
     4.4          Defaults to own public key.
     4.5          """
     4.6          assert isinstance(value, int) or isinstance(value, long), \
     4.7 -            "paillier: encrypts only integers and longs, got %s" % value.__class__
     4.8 +            "paillier: encrypts only integers and longs, got %s" % \
     4.9 +                value.__class__
    4.10          if not player_id:
    4.11              player_id = self.runtime.id
    4.12          n = self.runtime.players[player_id].pubkey['n']
    4.13          min = -(n - 1) / 2
    4.14          max = (n - 1) / 2
    4.15          assert min <= value <= max, \
    4.16 -            "paillier: plaintext %d outside legal range [-(n-1)/2 ; (n-1)/2] = " \
    4.17 -            "[%d ; %d]"  % (value, min, max)
    4.18 +            "paillier: plaintext %d outside legal range [-(n-1)/2 " \
    4.19 +            "; (n-1)/2] = [%d ; %d]"  % (value, min, max)
    4.20          pubkey = self.runtime.players[player_id].pubkey
    4.21          randomness = self.random.randint(1, long(n))
    4.22          return pypaillier.encrypt_r(self._f(value, n), randomness, pubkey)
     5.1 --- a/viff/bedoza/share_generators.py	Fri Aug 06 11:34:50 2010 +0200
     5.2 +++ b/viff/bedoza/share_generators.py	Fri Aug 06 15:00:46 2010 +0200
     5.3 @@ -15,7 +15,8 @@
     5.4  # You should have received a copy of the GNU Lesser General Public
     5.5  # License along with VIFF. If not, see <http://www.gnu.org/licenses/>.
     5.6  
     5.7 -from viff.bedoza.shares import BeDOZaShare, BeDOZaShareContents, PartialShare, PartialShareContents
     5.8 +from viff.bedoza.shares import BeDOZaShare, BeDOZaShareContents, PartialShare
     5.9 +from viff.bedoza.shares import PartialShareContents
    5.10  from viff.bedoza.util import _convolute
    5.11  from viff.bedoza.add_macs import add_macs
    5.12  
    5.13 @@ -30,7 +31,8 @@
    5.14      def generate_share(self, value):
    5.15          self.runtime.increment_pc()
    5.16          
    5.17 -        r = [self.Zp(self.random.randint(0, self.Zp.modulus - 1)) # TODO: Exclusve?
    5.18 +        # TODO: Exclusve?
    5.19 +        r = [self.Zp(self.random.randint(0, self.Zp.modulus - 1))
    5.20               for _ in range(self.runtime.num_players - 1)]
    5.21          if self.runtime.id == 1:
    5.22              share = value - sum(r)
    5.23 @@ -45,7 +47,8 @@
    5.24  
    5.25      def generate_random_shares(self, n):
    5.26          self.runtime.increment_pc()
    5.27 -        N_squared_list = [ self.runtime.players[player_id].pubkey['n_square'] for player_id in self.runtime.players]
    5.28 +        N_squared_list = [self.runtime.players[player_id].pubkey['n_square']
    5.29 +                          for player_id in self.runtime.players]
    5.30          shares = [PartialShare(self.runtime, self.Zp) for _ in xrange(n)]
    5.31          for inx in xrange(n):
    5.32              r = self.random.randint(0, self.Zp.modulus - 1)
    5.33 @@ -53,7 +56,8 @@
    5.34              enc_share = self.paillier.encrypt(ri.value)
    5.35              enc_shares = _convolute(self.runtime, enc_share)
    5.36              def create_partial_share(enc_shares, ri, s, N_squared_list):
    5.37 -                s.callback(PartialShareContents(ri, enc_shares, N_squared_list))
    5.38 +                s.callback(PartialShareContents(ri, enc_shares,
    5.39 +                                                N_squared_list))
    5.40              self.runtime.schedule_callback(enc_shares,
    5.41                                             create_partial_share,
    5.42                                             ri,
     6.1 --- a/viff/bedoza/shares.py	Fri Aug 06 11:34:50 2010 +0200
     6.2 +++ b/viff/bedoza/shares.py	Fri Aug 06 15:00:46 2010 +0200
     6.3 @@ -35,12 +35,14 @@
     6.4          self.N_squared_list = N_squared_list
     6.5  
     6.6      def __str__(self):
     6.7 -        return "PartialShareContents(%d; %s; %s)" % (self.value, self.enc_shares, self.N_squared_list)
     6.8 +        return "PartialShareContents(%d; %s; %s)" % \
     6.9 +            (self.value, self.enc_shares, self.N_squared_list)
    6.10  
    6.11      def __add__(self, other):
    6.12          z = self.value + other.value
    6.13          z_enc_shares = []
    6.14 -        for x, y, N_squared in zip(self.enc_shares, other.enc_shares, self.N_squared_list):
    6.15 +        for x, y, N_squared in zip(self.enc_shares, other.enc_shares,
    6.16 +                                   self.N_squared_list):
    6.17              z_enc_shares.append((x * y) % N_squared)
    6.18          return PartialShareContents(z, z_enc_shares, self.N_squared_list)
    6.19  
    6.20 @@ -53,8 +55,10 @@
    6.21          if value == None and enc_shares == None:
    6.22              Share.__init__(self, runtime, field)
    6.23          else:
    6.24 -            N_squared_list = [ runtime.players[player_id].pubkey['n_square'] for player_id in runtime.players.keys()]
    6.25 -            partial_share_contents = PartialShareContents(value, enc_shares, N_squared_list)
    6.26 +            N_squared_list = [ runtime.players[player_id].pubkey['n_square']
    6.27 +                              for player_id in runtime.players.keys()]
    6.28 +            partial_share_contents = PartialShareContents(value, enc_shares,
    6.29 +                                                          N_squared_list)
    6.30              Share.__init__(self, runtime, field, partial_share_contents)
    6.31  
    6.32  
    6.33 @@ -92,13 +96,15 @@
    6.34      def add_public(self, c, my_id):
    6.35          if my_id == 1:
    6.36              self.value = self.value + c
    6.37 -        self.keyList.set_key(0, self.keyList.get_key(0) - self.keyList.alpha * c)
    6.38 +        self.keyList.set_key(0, self.keyList.get_key(0) -
    6.39 +                             self.keyList.alpha * c)
    6.40          return self
    6.41      
    6.42      def sub_public(self, c, my_id):
    6.43          if my_id == 1:
    6.44              self.value = self.value - c
    6.45 -        self.keyList.set_key(0, self.keyList.get_key(0) + self.keyList.alpha * c)
    6.46 +        self.keyList.set_key(0, self.keyList.get_key(0) +
    6.47 +                             self.keyList.alpha * c)
    6.48          return self
    6.49  
    6.50      def cmul(self, c):
    6.51 @@ -108,7 +114,8 @@
    6.52          return BeDOZaShareContents(zi, zks, zms)
    6.53  
    6.54      def __str__(self):
    6.55 -        return "(%s, %s, %s)" % (str(self.value), str(self.keyList), str(self.macs))
    6.56 +        return "(%s, %s, %s)" % (str(self.value), str(self.keyList),
    6.57 +                                 str(self.macs))
    6.58      
    6.59  class BeDOZaShare(Share):
    6.60      """A share in the BeDOZa runtime.
    6.61 @@ -129,8 +136,11 @@
    6.62      that runtime.
    6.63      """
    6.64  
    6.65 -    def __init__(self, runtime, field, value=None, keyList=None, authentication_codes=None):
    6.66 +    def __init__(self, runtime, field, value=None, keyList=None,
    6.67 +                 authentication_codes=None):
    6.68          if value == None and keyList == None and authentication_codes == None:
    6.69              Share.__init__(self, runtime, field)
    6.70          else:
    6.71 -            Share.__init__(self, runtime, field, BeDOZaShareContents(value, keyList, authentication_codes))
    6.72 +            Share.__init__(self, runtime, field,
    6.73 +                           BeDOZaShareContents(value, keyList,
    6.74 +                                               authentication_codes))