[Libre-soc-bugs] [Bug 1159] poly1305 unit tests

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Tue Oct 3 16:40:09 BST 2023


--- Comment #15 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Sadoon Albader from comment #14)

> Just had the chance to look at this, brilliant.

bit of a hack but the context manager helps a lot

also perhaps useful (at some point) is to capture the *instance*
arguments so that those link back to the input that *caused*
whatever intermediary variables to have their values, such that
you can create a *top level* unit test that happens to reproduce
those exact intermediaries.

> I'll try to start and finish the test suite that generates random messages
> and keys and tests against the poly1305-donna C implementation tonight.

ah it is much simpler (like... 2 minutes vs 1 hour simpler) to test
against the *python* poly1305.py

the advantage is that the python poly1305.py uses arbitrary-length
precision math and is therefore bloody obvious not to have any carry
rollover errors.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list