Lost Password?

Go Back   CodeCall Programming Forum > Software Development > General Programming > Programming Theory

Vote on your favorite hash algorithm here!

Programming Theory Discuss programming theory, algorithm efficiency, logic, and other any other category where math and computer science overlap.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-29-2007, 11:35 AM
TcM's Avatar   
TcM TcM is offline
Moderator
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,323
Credits: 0
Rep Power: 74
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default One way algorithms?

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 11-29-2007, 12:39 PM
G_Morgan G_Morgan is offline
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 443
Last Blog:
Just over the next hil...
Credits: 45
Rep Power: 8
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-29-2007, 04:25 PM
TcM's Avatar   
TcM TcM is offline
Moderator
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,323
Credits: 0
Rep Power: 74
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default

Yeah man, you are right. Thanks for the explanation.. I was thinking this was something way more complicated!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-30-2007, 11:37 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 2,535
Last Blog:
wxWidgets is NOT code ...
Credits: 919
Rep Power: 28
WingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the rough
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-30-2007, 01:08 PM
TcM's Avatar   
TcM TcM is offline
Moderator
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,323
Credits: 0
Rep Power: 74
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default

So if you encrypt some text with a many-to-one algorithm, you cannot get your original text back.. right?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 11-30-2007, 01:21 PM
G_Morgan G_Morgan is offline
Guru
 
Join Date: Oct 2007
Age: 24
Posts: 443
Last Blog:
Just over the next hil...
Credits: 45
Rep Power: 8
G_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura aboutG_Morgan has a spectacular aura about
Default

Quote:
Originally Posted by TheComputerMaster View Post
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 12-03-2007, 10:57 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 2,535
Last Blog:
wxWidgets is NOT code ...
Credits: 919
Rep Power: 28
WingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the rough
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT -5. The time now is 10:17 PM.

Contest Stats

Xav ........ 1357.94
MeTh0Dz|Reb0rn ........ 1077.71
WingedPanther ........ 919.18
marwex89 ........ 906.86
morefood2001 ........ 900.18
John ........ 890.77
Brandon W ........ 770.65
chili5 ........ 312.39
Steve.L ........ 264.99
dcs ........ 232.34

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 83%

Ads