|
||||||
| Programming Theory Discuss programming theory, algorithm efficiency, logic, and other any other category where math and computer science overlap. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
| Sponsored Links |
|
|
|
|||
|
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.// Last edited by G_Morgan; 11-29-2007 at 12:48 PM. |
|
|||||
|
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.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||
|
Quote:
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. |
|
|||||
|
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.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Most Secure Algorithms? | TcM | Programming Theory | 6 | 11-30-2007 01:07 PM |
| Algorithms - The Basics (PART 2) | TcM | Security Tutorials | 0 | 11-24-2007 10:33 AM |
| Algorithms - The Basics (PART 1) | TcM | Security Tutorials | 0 | 11-24-2007 10:24 AM |
| John | ........ | 223.00000 |
| dargueta | ........ | 168.00000 |
| Xav | ........ | 164.00000 |
| LogicKills | ........ | 20.00000 |
| sam | ........ | 20.00000 |
| gaylo565 | ........ | 18.00000 |
| |pH| | ........ | 15.00000 |
| WingedPanther | ........ | 15.00000 |
| Johnnyboy | ........ | 3.00000 |
| navghost | ........ | 1.00000 |
Goal: 100,000 Posts
Complete: 67%