Browse Source

fix python2/3 ord issue

master
Michael Hamburg 7 years ago
parent
commit
3acbdaf999
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/generator/curve_data.py

+ 4
- 1
src/generator/curve_data.py View File

@@ -133,8 +133,11 @@ for curve,data in curve_data.items():
data["eddsa_sigma_iso"] = 0
if "rist_base_decoded" not in data:
def xord(x):
if isinstance(x,str): return ord(x)
else: return x
data["rist_base_decoded"] = sum(
ord(b)<<(8*i) for i,b in enumerate(unhexlify(data["rist_base"]))
xord(b)<<(8*i) for i,b in enumerate(unhexlify(data["rist_base"]))
)

if "imagine_twist" not in data:


Loading…
Cancel
Save