# Encrypting full word using Paillier Scheme

I am using Paillier scheme to encrypt a message however, I have divided the words into alphabets and then convert each alphabet to ASCII code encrypting the final result. It works fine, but I want to encrypt each word. It this possible?

As by encrypting each alphabet the size of encrypted file increases 10 times.

• Think about how SSL/TLS encrypt whole session. Jun 30 at 5:21

## 1 Answer

In the most common variant of Paillier encryption with public modulus $$n$$, any plaintext in $$[0,n)$$ can be encrypted and decrypted (though sometime the interval is slightly reduced, or centered on zero). To be secure, Pailler encryption needs $$n$$ to have unknown factorization. That means like at least 1024-bit $$n$$ (with 2048-bit or more highly recommendable). That allows encrypting 127 (or 255) bytes. That's more than enough for UTF-8 encoding of any word in an English or French dictionary (I have no idea for others).

If encrypting character by character with Paillier encryption increases size by 10 only, then $$n$$ is at most 40-bit, and the encryption is thus not secure.

It's unusual to use Paillier encryption on text: it's primarily used when it's homomorphic property is useful. For text, practice is hybrid encryption, which allows arbitrary large plaintext.

• Longest French word is quite short, 36, and interestingly ( for me ) French has not long words compared to others, English on the other end have some strange results like protein titin is the longest. Apart from 2 chemical name and a fictional name, all falls in below 46. German is out of the league and Turkish is strange on this subject; recursive suffixes :) Jul 4 at 20:18