[Libre-soc-bugs] [Bug 1157] Implement poly1305

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Sep 17 19:52:53 BST 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1157

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

> so, line 176
> https://github.com/floodyberry/poly1305-donna/blob/
> e6ad6e091d30d7f4ec2d4f978be1fcfcbce72781/poly1305-donna-64.h#L176
> 
>         c = 0 # makes the pattern regular
> 	h1 += c      c = (h1 >> 44); h1 &= 0xfffffffffff;

okaaay nooow we have poly1305-donna-64bit.h converted to python,
*now* it is possible/convenient to morph towards a version that
"illustrates" how REMAP/Indexed would be dropped in, easily

https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=d8ae5d7fa

this is *very deliberately* slow-and-steady work, sadoon: you have to
keep the unit test working *at all times*, never allowing not even one
single micro-morph-step to produce a wrong result nor deviate along the
"i think i will just start writing some massive amounts of untested code from 
 scratch with no way to test it except after about 2 months daunting work"
path.

in that way, you know:

* where you are
* what the goal is
* you can work from both ends to meet in the middle
* and you always have the unit test to tell you if your changes still work

with that one illustration there, you should be able to do the exact same
conversion trick (look for the common pattern, "break out" the indices/consts
into lists) and once all done it will be near-ridiculously-trivial to convert
each section to SVP64 assembler, and once all fragments are converted,
it becomes just as ridiculously-trivial to stitch them all together into
a single algorithm.

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


More information about the libre-soc-bugs mailing list