Add mult, but it doesn't quite work
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from typing import List
|
||||
import random
|
||||
|
||||
from modulo_theory import friendly_modular_mult, friendly_modulo
|
||||
|
||||
@@ -111,11 +112,19 @@ def test_on_long_string():
|
||||
print(f"{regular_result:x}")
|
||||
print(f"{parallel_result:x}")
|
||||
|
||||
def test_random():
|
||||
r = mask_r(random.randint(0, 2**128-1))
|
||||
s = random.randint(0, 2**128-1)
|
||||
|
||||
msg = random.randbytes(random.randint(16, 1500))
|
||||
|
||||
parallel_poly1305(msg, r, s, 8)
|
||||
|
||||
def main():
|
||||
test_regular()
|
||||
test_parallel()
|
||||
test_on_long_string()
|
||||
test_random()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user