]> git.codecow.com Git - Monocypher.git/commitdiff
Added Kleshni/Elligator-2 test vectors
authorLoup Vaillant <loup@loup-vaillant.fr>
Sun, 28 Jun 2020 22:40:50 +0000 (00:40 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sun, 28 Jun 2020 22:58:29 +0000 (00:58 +0200)
An auditor recently told me about the following repository on GitHub:

  https://github.com/Kleshni/Elligator-2/

I was able to steal a couple test vectors from them.  Not all of them
unfortunately:

- Some representative exceed 2^254, and Monocypher do not decode
  negative representatives.  Instead, it assumes it has a positive
  representative, and clears the two most significant bits before
  decoding.

- It is not clear yet what encoding does, and some points in the (few)
  test vectors have their most significant bit set. Monocypher ignores
  the most significant bit of curve point, basically assumes they are
  all below 2^255 - 19.  Adding those points will require tweaking
  similar to the tweaking applied to the Hash to Curve RFC draft test
  vectors.

tests/gen/vectors/elligator_dir

index a2d4a07c58fd90870181b6aff0afa046db2a4117..c0f34914e12c71f6648323a2a8b66b6ed2d6042e 100644 (file)
@@ -69,3 +69,20 @@ b1acbbf9410113a467ae0d3731894cc67a131208af70e2f16758a4be0bb6706c:
 
 7a48adebb692fdb8e5a2176389f3f0bcbdc1956b0d57acac4a8eda87b577e618:
 22997bed0e3c6023e73fb371e6d3c5c3661a87c6f3f787ba6054e699aef5aa64:
+
+
+
+e73507d38bae63992b3f57aac48c0abc14509589288457995a2b4ca3490aa207:
+1e8afffed6bf53fe271ad572473262ded8faec68e5e67ef45ebb82eeba52604f:
+
+95a16019041dbefed9832048ede11928d90365f24a38aa7aef1b97e23954101b:
+794f05ba3e3a72958022468c88981e0be5782be1e1145ce2c3c6fde16ded5363:
+
+f6ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3f:
+9cdb525555555555555555555555555555555555555555555555555555555555:
+
+f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3f:
+9cdb525555555555555555555555555555555555555555555555555555555555:
+
+0000000000000000000000000000000000000000000000000000000000000000:
+0000000000000000000000000000000000000000000000000000000000000000: