viff

changeset 1259:547e9bc99d12

Adapted preprocessing program counters.
author Marcel Keller <mkeller@cs.au.dk>
date Wed, 30 Sep 2009 14:34:49 +0200
parents bd8cf1987411
children 824ae3770456
files apps/aes.py
diffstat 1 files changed, 13 insertions(+), 15 deletions(-) [+]
line diff
     1.1 --- a/apps/aes.py	Tue Sep 29 14:56:57 2009 +0200
     1.2 +++ b/apps/aes.py	Wed Sep 30 14:34:49 2009 +0200
     1.3 @@ -125,36 +125,34 @@
     1.4  
     1.5      if options.active:
     1.6          if options.exponentiation is False:
     1.7 -            max = 301
     1.8 -            js = [3 + i * 15 + j for i in range(20) for j in range(7) + [8]]
     1.9 -        elif options.exponentiation == 0:
    1.10 -            max = 321
    1.11 -            js = [2 + i * 16 + j for i in range(20) for j in range(13)]
    1.12 +            max = 461
    1.13 +            js = [3 + i * 23 + j for i in range(20)
    1.14 +                  for j in range(0, 14, 2) + [15]]
    1.15 +        elif options.exponentiation == 0 or options.exponentiation == 3:
    1.16 +            max = 561
    1.17 +            js = [1 + i * 28 + j * 2 for i in range(20) for j in range(13)]
    1.18          elif options.exponentiation == 1 or options.exponentiation == 2:
    1.19 -            max = 261
    1.20 -            js = [1 + i * 13 + j for i in range(20) for j in range(11)]
    1.21 -        elif options.exponentiation == 3:
    1.22 -            max = 301
    1.23 -            js = [1 + i * 15 + j for i in range(20) for j in range(13)]
    1.24 +            max = 481
    1.25 +            js = [1 + i * 24 + j * 2 for i in range(20) for j in range(11)]
    1.26  
    1.27          if options.exponentiation == 4:
    1.28 -            pcs = [(1, 2 + 130 * options.count + 141 * i + j, 1, 0)
    1.29 +            pcs = [(2, 1 + i, 2 + 2 * j)
    1.30                     for i in range(10 * options.count)
    1.31                     for j in range(140)] + \
    1.32 -                  [(2, 18, k) + (81,) * i + (2 + 4 * j, 3, l, 1, 0)
    1.33 +                  [(3, 17, k) + (81,) * i + (2 + 4 * j, 3, 1 + 2 * l)
    1.34                     for k in range(1, options.count + 1)
    1.35                     for i in range(10)
    1.36                     for j in range(20)
    1.37 -                   for l in range(1, 7)]
    1.38 +                   for l in range(6)]
    1.39          else:
    1.40 -            pcs = [(2, 18, k) + (max,) * i + (j, 1, 0)
    1.41 +            pcs = [(2, 17, k) + (max,) * i + (j,)
    1.42                     for k in range(1, options.count + 1)
    1.43                     for i in range(10)
    1.44                     for j in js]
    1.45          program_desc[("generate_triples", (GF256,))] = pcs
    1.46  
    1.47      if options.exponentiation == 4:
    1.48 -        pcs = [(2, 18, k) + (81,) * i + (1 + j * 4, 0)
    1.49 +        pcs = [(3, 17, k) + (81,) * i + (1 + j * 4,)
    1.50                 for k in range(1, options.count + 1)
    1.51                 for i in range(10)
    1.52                 for j in range(20)]