Thread: Safedisc
View Single Post
  #21  
Old 25-05-2007, 14:38
caki caki is offline
Registered User
 
Join Date: Dec 2004
Location: UK
Posts: 899
Thanks: 0
Thanked 0 Times in 0 Posts
caki is on a distinguished road
While I am not a crypto guy, and have almost no knowledge of how crypto works, wouldn't it be possible, in the age of modern computing, to make an ubreakable code with something based off of a one-time pad?

Consider this:

Lets say we want to protect a text with letters A-Z and " " in it. Okay, thats 27 characters we need to worry about. Now generate all the numbers in between 1 and 27000. To each of the characters we want to protect, assign a 1000 random numbers from the collection of numbers in between 1 and 27000, so:

A = 47, 51, 26999...
B = 21, 407, 1096...
etc

Write all of this into a file, and this is your key. Now, when you encrypt a string, you take the character you are encrypting, for example "A", and then replace it with one of the 1000 random numbers assigned to it.

Heres an example:

String to encrypt:
HELLO WORLD

H - 34, 59...
E - 99, 127...
L - 89, 56, 949...
O - 23, 77...
W - 909, 230...
R - 654, 767...
D - 378, 3...
" " - 21, 90...

So encrypted one time, it could be:
34 99 89 949 77 21 909 23 654 56 3

Encrypted another time, it could be:
59 127 56 949 23 90 230 23 767 56 3

Its different every time, but decrypt to the same thing with the correct key, there are a 1000 numbers to each letter, so even if there are duplicates they would be hard to correlate... it would be pretty hard to break small messages encrypted this way, providing the key is never found... for larger messages just increase the key size. If you keep the key size/encrypted file size at a certain ratio, change the keys often enough and/or use large enough keys, and have a good random number generator, wouldn't this be pretty secure?

These are just random musings that I had during math class a year ago, but I'm interested in seeing what other people think.
__________________
Sanity is for the weak.