[Libre-soc-bugs] [Bug 1151] Ed25519 demo

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Sep 7 14:11:36 BST 2023


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

--- Comment #3 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #2)
> if you want a known-good library to test against, you can use
> python3-cryptography, which uses openssl internally,

no. absolutely not. that, when added to the unit tests,
becomes *yet another* dependency, including openssl.

cryptography has a de-facto standard way of dealing with this problem for
30+ years: the author of the algorithm *provides a reference implementation*
and in that reference implementation are included some "known examples".

given that the probability of being wrong even when running just one
single example is (2^128-1) / (2^128) for a 128-bit algorithm and
(2^256-1) / (2^256) for a 256-bit one it is an absolute no-brainer
to justify "success" on the basis of passing *even one* of the "known examples"
provided by a c reference implementation.  run two well-known examples
and that becomes a probability of (2^128-1)^2 / (2^128)^2

please *do not* add yet more software dependencies when it is
very simple to just find (and copy verbatim) the source code of
the reference implementation and drop it straight into the
crypto/ directory, exactly as konstantinos has *already done*
with chacha20:

   
https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=crypto/chacha20/src/test.c;hb=HEAD

please let konstantinos get on with this task uninterrupted, and help review
when he has made commits.

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


More information about the libre-soc-bugs mailing list