Browse Source

Ed25519/gnunet-go status report.

Bernd Fix 2 years ago
1 changed files with 18 additions and 0 deletions
  1. +18

+ 18
- 0
doc/reports/2019-09-07_Ed25519.txt View File

@ -0,0 +1,18 @@
After running more and longer tests I noticed that about every 16th ECDHE key exchanged failed (shared secret mimatch). The investigation lead to a problem in the copied and re-used package source from The interal scalar multiplication for a point returns the wrong result if the scalar has a bitlen <= 248 (that is, has the most significant byte of its binary representation set to zero).
This bug does not "disturb" the EdDSA key generation (the private scalar is always large enough, because it is generated that way). Even the EdDSA signing and verification algos work OK with it.
I filed an issue with the Golang people (, but I consider it unlikely that the "bug" will be fixed at all - I even believe that it is on purpose (optimization).
So I wrote a functional, but less performant Ed25519 implementation by re-using the ECC stuff I did for the bitcoin package in the Gospel library. The new code is now also part of it (
I am using that package in gnunet-go for now; all unit tests pass but I am certain there will be a few minor glitches when it comes to actually using it in processing GNUnet messages.
Therefore I would appreciate feedback (and bug reports); anyone playing around with gnunet-go needs to update:
$ go get -u
$ cd gnunet-go
$ git pull
Cheers, Bernd.