Endomorphism ring of an elliptic curve