cmallery99 / Encrypter2

0 stars 0 forks source link

Ciphertext leaks information on plaintext #2

Open celic opened 3 years ago

celic commented 3 years ago

A large ciphertext value (around 20,000+) indicates the plaintext is towards the end of the alphabet. Same for a small ciphertext value (around 1000) indicated the plaintext is towards the beginning of the alphabet.

Also, "a" is always encrypted to 0... it will never be a different value.

celic commented 3 years ago

You could fix this with some "domain parameters". Allow a user to specify a starting letter value, and a random large integer as a pair (f, r).

f would become the value for "a" and the rest of the letters would increment past this.

r would become the largest random value for the key applied to the plaintext.