]> git.codecow.com Git - Monocypher.git/commit
Added Elligator2 SAGE script
authorLoup Vaillant <loup@loup-vaillant.fr>
Sun, 16 Feb 2020 23:25:24 +0000 (00:25 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sun, 16 Feb 2020 23:36:14 +0000 (00:36 +0100)
commitb4d398bec36625da29dcb5af885e40107af6c665
treebe10ed6e276e548830f7f87e1dad75d55b00d90e
parentd36944946ecda0a48c885702fc4b0b20618ecd16
Added Elligator2 SAGE script

That script prints test vectors to the standard output, in the following
order:

- private key
- public key (X coordinate)
- public key (Y coordinate, never exposed by Monocypher)
- Boolean (0 if we can't convert, 1 if we can)
- hash of the public key (or zero if we couldn't convert)

I could use that script to generate the test vectors automatically, but
I hesitate to introduce a hard dependency on SAGE.

The alternative is to put the test vectors themselves under version
control.  We could add a target to the makefile that checks whether the
test vectors and the script are in sync, but that would break if we end
up adding vectors manually (which typically happens whenever project
Whycheproof publishes new vectors).
tests/gen/elligator.sage [new file with mode: 0755]