This repository is designed to help understand elliptic curves and cryptosystems at a basic level. It includes implementations of elliptic curves, ElGamal encryption, elliptic curve ElGamal encryption, and the baby-step giant-step algorithm for attacks. Most of the code is available for both real numbers and finite fields.
The El-Gamal cryptosystem provides a secure encryption and decryption cryptosystem based on the fundamental principles of the Diffie-Hellman key exchange protocol.
Main code is el_gamal_ec_pointmsg.py. This code demonstrates how the El-Gamal encryption system is applied on an elliptic curve. When selecting the elliptic curve, only the finite field F_p is used instead of the extended field F_p^n (different methods are used for the p^n case). It operates with large prime numbers used in El-Gamal encryption, but may experience a loss of performance with very large prime numbers.
An
where
The elliptic curves of the above form are called
1: Elliptic Curve points and graph
2: Addition
3: Scalar multiplication
4: Scalar multiplication with double and add algorithm
5: Order of an element and its graph