encrypt and decryption by rotation