[Libre-soc-bugs] [Bug 1159] poly1305 unit tests
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Fri Sep 22 21:43:39 BST 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1159
--- Comment #4 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Sadoon Albader from comment #3)
> (In reply to Luke Kenneth Casson Leighton from comment #2)
> > (In reply to Sadoon Albader from comment #1)
> > 1. python Poly1305 class instance
> > 2. python Poly1305Donna class instance
> > 3. SVP64 assembler (in test_caller_xxxyyy.py)
>
> 1. and 2. are simple enough, I've already added some known-working values
> from the original poly1305-donna project and they do work fine.
git push! always always always push immediately. this is a key project
workflow procedure.
> Importantly,
> they are *not* multiples of 16-bytes and not less than 16-bytes which should
> put any implementation through its paces.
>
> But for a proper unit test I think at least 10 vectors with different sizes
> and different keys should be added, which I will do before attempting
> anything else.
push the existing ones first. you'll see in HDL_workflow the
rule is 5-15 lines of code per commit (with exceptions of course)
> I've been reading https://libre-soc.org/docs/firststeps/ to better
> understand how test_caller_* works, is there any other relevant
> documentation to help steer me in a good direction? Not necessary as I feel
> I already understand 80% of how it works, but nice to have if available.
not really... there are however hundreds of unit tests, they are all the
same. i just cut/paste an existing one, test_caller_svp64_chacha20.py
is your best bet.
> EDIT: forgot one more thing: in addition to the 10 vectors, I'd also add a
> function that generates random data of random sizes and random keys and
> tests using all 3 implementations.
awesome.
and that puts the work you're about to commit right now at way above the
limit for commits? :) that's 3 separate commits you should have made,
just in the past hour alone!
this is how we can do review.
nobody else can see your screen nor what is on your local hard drive.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list