Commit Graph

6 Commits

Author SHA1 Message Date
Daira Hopwood 391e67f250 hashtocurve.sage: correct a comment.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-31 15:26:20 +00:00
Daira Hopwood 112983e667 hashtocurve: allow use of the sqrt optimization with the Z recommended by the Internet Draft.
This also makes the sqrt and hash-to-curve implementations depend on each other less strongly.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-31 13:45:35 +00:00
Daira Hopwood ef3405dd20 Add an optimization from [WB2019, section 4.2] that saves a square root for each map_to_curve.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-31 03:35:50 +00:00
Daira Hopwood 71afc68f7d hashtocurve.sage: add Jacobian coordinate implementation that avoids two of the three inversions.
Do not base production code on this yet!

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-30 16:09:25 +00:00
Daira Hopwood 7df33f4ce4 hashtocurve.sage: more realistic use of Montgomery's trick.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-29 17:58:50 +00:00
Daira Hopwood 96fd2c794e [WIP] Add a prototype implementation of hash-to-curve. This intends to implement the Internet Draft but has not been checked.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-29 17:58:50 +00:00