https://github.com/mupq/pqm4
Revision 8c23cf3e4b18f0d02b317b4b7b530e4c0594a373 authored by Matthias J. Kannwischer on 19 October 2020, 08:28:14 UTC, committed by Matthias J. Kannwischer on 19 October 2020, 08:28:14 UTC
1 parent 56417d9
Raw File
Tip revision: 8c23cf3e4b18f0d02b317b4b7b530e4c0594a373 authored by Matthias J. Kannwischer on 19 October 2020, 08:28:14 UTC
Add speed and stack optimized implementations from https://eprint.iacr.org/2020/1278.pdf
Tip revision: 8c23cf3
benchmarks.py
#!/usr/bin/env python3
from mupq import mupq
from interface import M4Settings, M4

import sys

if __name__ == "__main__":
    with M4() as m4:
        if "--nostack" not in sys.argv:
            test = mupq.StackBenchmark(M4Settings(), m4)
            test.test_all(sys.argv[1:])

        if "--nospeed" not in sys.argv:
            test = mupq.SpeedBenchmark(M4Settings(), m4)
            test.test_all(sys.argv[1:])

        if "--nohashing" not in sys.argv:
            test = mupq.HashingBenchmark(M4Settings(), m4)
            test.test_all(sys.argv[1:])

        if "--nosize" not in sys.argv:
            test = mupq.SizeBenchmark(M4Settings(), m4)
            test.test_all(sys.argv[1:])
back to top