Encryption/decryption implementation for PKCS1