Conics and elliptic curves in number theory and cryptography