@@ -38,8 +38,8 @@ def removeprefix(s, prefix):
38
38
saturatedsolinasprimes = dict (
39
39
curve25519_solinas = ('2^255 - 19' ))
40
40
41
- dettmanprimes = dict ( # last limb width, limbs, prime
42
- secp256k1_dettman = ('48' , '5' , '2^256 - 4294968273' ))
41
+ dettmanprimes = dict ( # last limb width, limbs, last reduction, prime
42
+ secp256k1_dettman = ('48' , '5' , '2' , '2 ^256 - 4294968273' ))
43
43
44
44
output_makefile = ('--makefile' in sys .argv [1 :])
45
45
directories = tuple (i for i in sys .argv [1 :] if i not in ('--makefile' ,))
@@ -60,7 +60,7 @@ def asm_op_names_key(val):
60
60
61
61
if name in dettmanprimes .keys ():
62
62
kind = 0
63
- limbwidth , n , prime = dettmanprimes [name ]
63
+ limbwidth , n , last_reduction , prime = dettmanprimes [name ]
64
64
65
65
elif name in saturatedsolinasprimes .keys ():
66
66
kind = 1
@@ -113,8 +113,8 @@ def is_small(val):
113
113
if kind == 0 :
114
114
binary = 'src/ExtractionOCaml/dettman_multiplication'
115
115
binary_descr = 'Dettman Multiplication'
116
- limbwidth , _n , _prime = dettmanprimes [name ]
117
- invocation = ' ' .join ([binary , name , '64' , n , limbwidth , shlex .quote (prime ), op , '--no-wide-int' , '--shiftr-avoid-uint1' ] + [item for fname in fnames for item in ('--hints-file' , shlex .quote (fname ))])
116
+ limbwidth , _n , last_reduction , _prime = dettmanprimes [name ]
117
+ invocation = ' ' .join ([binary , name , '64' , n , limbwidth , last_reduction , shlex .quote (prime ), op , '--no-wide-int' , '--shiftr-avoid-uint1' ] + [item for fname in fnames for item in ('--hints-file' , shlex .quote (fname ))])
118
118
elif kind == 1 :
119
119
binary = 'src/ExtractionOCaml/solinas_reduction'
120
120
binary_descr = 'Saturated Solinas'
0 commit comments