EC El Gamal Tools

The following are tools to perform an Elliptic Curve El Gamal encryption.

Converting Letters to Numbers

Use ASCII: Boxentrique Letter to Number Converter and Number to Letter Converter.

Find a prime number

How to generate an elliptic curve in Sage over your prime field

The list is a list of coefficients: [0,a,0,b,c] for y^2 = x^3 + ax^2 + bx + c.
You can put the field of definition in the first spot, e.g. GF(7) or RR or QQ

Efficiently find a square root mod p when p is 3 mod 4

To efficiently find a square root, you’ll want to use the method taught in class.
From the info output below you should be able to apply the method.

Choose a point and give it a name

Determine the multiplicative order of your point

Random Number Generator

randint(a,b) gives an integer between a and b inclusive

Take a multiple of a point