changeset 607:626cd75d75fb

Really fix Issue 24: Use base-2 logarithm.
author Martin Geisler <mg@daimi.au.dk>
date Tue, 25 Mar 2008 19:18:11 +0100
parents ab8ab275dbd2
children c4c1544e9b7b
files viff/comparison.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/viff/comparison.py	Tue Mar 25 15:08:22 2008 +0100
+++ b/viff/comparison.py	Tue Mar 25 19:18:11 2008 +0100
@@ -157,7 +157,7 @@
     @increment_pc
     def convert_bit_share(self, share, dst_field):
         """Convert a 0/1 share into dst_field."""
-        l = self.options.security_parameter + math.log(dst_field.modulus)
+        l = self.options.security_parameter + math.log(dst_field.modulus, 2)
         # TODO assert field sizes are OK...
 
         this_mask = rand.randint(0, (2**l) -1)