How can it be that an algorithm is not reversable? Something like having a formula outputting a number for example 123456 and taking only the 1,3,5,6 (result would be 1356) would make it one way?
or what?
Thanks.
One way algorithms?
Started by TcM, Nov 29 2007 09:35 AM
6 replies to this topic
#1
Posted 29 November 2007 - 09:35 AM
|
|
|
#2
Posted 29 November 2007 - 10:39 AM
Some algorithms are reversible, others aren't.
Take a list. A reverse function is clearly reversible. (1 2 3) => (3 2 1) => (1 2 3). On the other hand the sum of a list isn't (1 2 3) => 6 => ???
//edit - the issue is - does the algorithm destroy data. Often the algorithm destroys some sort of data in the way it processes in order to more explicitly produce more useful information. In the second example, the value 6 is implicit in the list (1 2 3) given the plus operation. After the operation the value 6 is made explicit but the list is lost. Of course all relevant languages allow you to pass in copies so that both are maintained.//
Take a list. A reverse function is clearly reversible. (1 2 3) => (3 2 1) => (1 2 3). On the other hand the sum of a list isn't (1 2 3) => 6 => ???
//edit - the issue is - does the algorithm destroy data. Often the algorithm destroys some sort of data in the way it processes in order to more explicitly produce more useful information. In the second example, the value 6 is implicit in the list (1 2 3) given the plus operation. After the operation the value 6 is made explicit but the list is lost. Of course all relevant languages allow you to pass in copies so that both are maintained.//
#3
Posted 29 November 2007 - 02:25 PM
Yeah man, you are right. Thanks for the explanation.. I was thinking this was something way more complicated!
#4
Posted 30 November 2007 - 09:37 AM
Getting a little more technical:
Every algorithm is, in essence, a function. If it is a one-to-one function, then it has an inverse which can be used to go from the output to the input. If it is a many-to-one function, then it does not have an inverse, and you can not reconstruct the input from the output.
Encryption is one-to-one (given a key).
Hashes are many-to-one.
Every algorithm is, in essence, a function. If it is a one-to-one function, then it has an inverse which can be used to go from the output to the input. If it is a many-to-one function, then it does not have an inverse, and you can not reconstruct the input from the output.
Encryption is one-to-one (given a key).
Hashes are many-to-one.
#5
Posted 30 November 2007 - 11:08 AM
So if you encrypt some text with a many-to-one algorithm, you cannot get your original text back.. right?
#6
Posted 30 November 2007 - 11:21 AM
TheComputerMaster said:
So if you encrypt some text with a many-to-one algorithm, you cannot get your original text back.. right?
Aye because you've destroyed information in the process.
It gets more complicated. Some algorithms are simple reversals, Enigma worked like this. Encryption tends to focus more on asynchronous encryption these days where differing keys and algorithms are used to encrypt and decrypt.
#7
Posted 03 December 2007 - 08:57 AM
Correct,
Many-to-one algorithms are generally called 'hash functions'. MD5 and CRC are examples of these.
Dual key encryption uses some sneaky number theory results on prime powers to work.
Many-to-one algorithms are generally called 'hash functions'. MD5 and CRC are examples of these.
Dual key encryption uses some sneaky number theory results on prime powers to work.


Sign In
Create Account


Back to top









