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

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Sep 18 21:05:46 BST 2023


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

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

> If we load h[] and r[] to our SVSHAPEs, we can use the clear pattern of
> 
> 0,0  1,2  2,1
> 0,1  1,0  2,2
> 0,2  1,1  2,0

ta-daaa.  that is *exactly* the pattern that jacob is organising
for the bigint REMAP.

> The leftmost number is n where n = 0..2, the rightmost number is n where n =
> 0..2 in the first case, n = 2,0,1 in the second case (overflowing 2 to 0)
> and n
> = 1,2,0 (again starting from 1, overflowing from 2 to 0)

  x, (x+y)%MAXVL

> We multiply all the numbers first in parallel, then add the first 3 additions
> in parallel, then the second addition. Seems doable in 3 instructions after
> register preparation at least for this part?

absolutely.  utterly ridiculously easy, isn't it?
now write it out in python - in poly1305-donna.py - to make
absolutely sure you got it right.

but first *write that unit test i said twice already is essential*.
please do not make me repeat things more than once.

comment #14
comment #18

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


More information about the libre-soc-bugs mailing list