py_ecc
py_ecc copied to clipboard
Optimisations for Hash to Curve
What is wrong?
Currently we use a 'constant' time hash to curve function.
It is possible to significantly increase speeds by removing the constant time requirements.
How can it be fixed
The two key areas where speeds could be made are in py_ecc/optimized_bls12_381/optimized_swu.py:
- Returning when a solution is found in
sqrt_division_FQ2() - Stopping the loop in
optimized_swu_G2()when eithersuccessorsuccess_2is true.