implement PKE for encrypt/decryptDoc