viff

changeset 1325:613aa672ba5e

shamir: Optimized by using reflected argument operators.
author Marcel Keller <mkeller@cs.au.dk>
date Thu, 22 Oct 2009 19:38:31 +0200
parents 382f0eb42dca
children f933bd327750
files viff/shamir.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/viff/shamir.py	Thu Oct 22 19:38:16 2009 +0200
     1.2 +++ b/viff/shamir.py	Thu Oct 22 19:38:31 2009 +0200
     1.3 @@ -79,7 +79,7 @@
     1.4          cur_share = coef[threshold]
     1.5          # Go backwards from threshold-1 down to 0
     1.6          for j in range(threshold-1, -1, -1):
     1.7 -            cur_share = coef[j] + cur_point * cur_share
     1.8 +            cur_share = coef[j] + cur_share * cur_point
     1.9  
    1.10          shares.append((cur_point, cur_share))
    1.11