Complex multiplication in cryptography