Ok so last night I was thinking... if in encryption we use random integers.. won't it be safer?
I'm just going to show a simple thing.. just so people can understand..so:
Let's encrypt:
A -> (ASCII*66)+random number
I know what you are thinking.. is it's random.. it's useless, not an encryption.. NO keep on reading....
So let's transform that into numbers
(65*66)+125=4415
Now what if we store that random number, 125, into the 4415 it's self for example inserting in the 1st,3rd and last digits, like this:
1454152
The bold numbers will be the stored random number I know it's 1,5,2 and then we swap the 2nd with the 3rd to bring it back to 125
And then we just reverse the algorithm
4415-125 = 4290/66 = 65->A
Of course we can make it more secure by for example adding a fixed number to the random number and store it... there are many.. many methods..
But what I mean is that in this way every encrypted string will be unique and it will have endless possibilities because for example A can be 4415 or maybe it can be 4790 (if the random number is 500) and of course we just insert the random number. so the same string.. will be different each time.
What do you think? Is this practical? Are there any algorithms that already use this? Is this safer?
Thanks for your comments.
At that point, you put the key directly into the encrypted message, making it relatively easy to decrypt. You are better off using random numbers to "bulk" the message with non-sense data that can be scrubbed out.
What do you mean?
Your method seems similar to be getting at Public Key Encryption, but a poor implementation.
Hmm what is a Public Key Encryption exactly? And As I said.. this was just a simple example.. of course it can be much improved.
If your Random Number is 125, and your cipher text (by other means) is 'abcdef' make new cipher text '1ab2cd5ef' with the 125 as garbage data.
So you encrypt and then just insert nonsense numbers and stuff.. right? but that nonsense does not a make a part of the algorithm as in my example.
Right. Unfortunately, I have yet to see a method of including random data in the encryption algorithm without exposing that data, reducing the value of having random data in the first place.
With public key encryption there are two "keys." A public key and a private key. The public key that is know to everyone, and is usually a large *prime* number which is used to encrypt the data.
Then there is a private key that is mathematically related to the public key, but is cannot be practically derived from the public key which is used to decrypted the message.
To create a poor analogy, in your example, the random number may be the public key, and 66 may be the private key.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks