Cryptography using ring