Converting text to point in ECC

I’m now building some simple codes for converting plain text character to a point on an elliptic curve.

Here’s how I’m gonna do it, based on Mike Rosing’s hints:

  1. Take the data, and treat it as an x value
  2. If x value fit on the curve, then find y. Each x value has two y values associated with it.
  3. If x value does not fit on the curve, add extra bits to the data (but make sure not to mess with the raw data)
  4. Check again
  5. Repeat until the combination of the raw data and extra bits does fit on the curve.

To get the x value back, just mask off the extra bits to recover the raw data.