Encoding information in prime numbers
29 Nov 2015An interesting part of encryption theory is the ability to encode a message using prime numbers. It’s not the most efficient way to represent a message, but it does exhibit some interesting properties.
Hello
Take the message “HELLO” for instance. Here it is along with the ASCII values for each character.
If we assign each character of our message a prime (as they ascend in sequence):
We can encode this message using these prime numbers like so:
That massive number is our encoded message.
Adjusting the message
You can add a letter to the message, just by multiplying in another value:
Commutatively, we can remove a character from our message just by dividing the encoded message. To remove the E
from our message, we’d divide the encoded message by 3^69
.
The guessing game
As there’s no encryption involved with this process, it’s purely encoding; all someone needs to do is factor out your message. From there they can gain the ASCII codes and positions to be able to read your message.