py_ecc icon indicating copy to clipboard operation
py_ecc copied to clipboard

Optimisations for Hash to Curve

Open kirk-baird opened this issue 6 years ago • 0 comments

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 either success or success_2 is true.

kirk-baird avatar Nov 21 '19 00:11 kirk-baird