Remove trailing spaces, and make orchard_iso_pallas.py and orchard_sinsemilla.py executable.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
816cfa0059
commit
9184c78c0f
|
@ -13,7 +13,7 @@ from binascii import hexlify
|
||||||
from bitstring import BitArray
|
from bitstring import BitArray
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/2612720/how-to-do-bitwise-exclusive-or-of-two-strings-in-python
|
# https://stackoverflow.com/questions/2612720/how-to-do-bitwise-exclusive-or-of-two-strings-in-python
|
||||||
def sxor(s1,s2):
|
def sxor(s1,s2):
|
||||||
return bytes([a ^ b for a,b in zip(s1,s2)])
|
return bytes([a ^ b for a,b in zip(s1,s2)])
|
||||||
|
|
||||||
def expand_message_xmd(msg, dst, len_in_bytes):
|
def expand_message_xmd(msg, dst, len_in_bytes):
|
||||||
|
@ -75,7 +75,7 @@ def hash_to_field(msg, dst):
|
||||||
elm_offset = L * (j + i * m)
|
elm_offset = L * (j + i * m)
|
||||||
tv = uniform_bytes[elm_offset:elm_offset+L]
|
tv = uniform_bytes[elm_offset:elm_offset+L]
|
||||||
elements.append(Fp(beos2ip(tv), False))
|
elements.append(Fp(beos2ip(tv), False))
|
||||||
|
|
||||||
assert len(elements) == count
|
assert len(elements) == count
|
||||||
|
|
||||||
return elements
|
return elements
|
||||||
|
@ -148,7 +148,7 @@ def pad(n, m):
|
||||||
lebs2ip(m[i*SINSEMILLA_K:i*(SINSEMILLA_K + 1)])
|
lebs2ip(m[i*SINSEMILLA_K:i*(SINSEMILLA_K + 1)])
|
||||||
)
|
)
|
||||||
|
|
||||||
return pieces
|
return pieces
|
||||||
|
|
||||||
def sinsemilla_hash_to_point(d, m):
|
def sinsemilla_hash_to_point(d, m):
|
||||||
n = cldiv(m.len, SINSEMILLA_K)
|
n = cldiv(m.len, SINSEMILLA_K)
|
||||||
|
|
Loading…
Reference in New Issue