Hacker News new | ask | show | jobs
by thewisedude 4816 days ago
I think I can come up with a simpler explanation of one way function to start with. Lets say the word I want to apply one way function is 'america'. Lets say I assign a number to each character in the password and the number that I assign is equal to the position of that character in English alphabet. For eg: 'a' would get the value 1, 'b' would get 2, 'c' would get '3' and so on.

My one way function adds the values of each character, in case I apply it to 'america', it would be 1+13+5+18+9+3+1 => 50.

So, if somebody had to find the word from only from resultant sum or value, it would take time to come up with all the possible words.

Some of the possible candidates also include aameric, cmeriaa etc. Clearly in this case there are many possible words that map to a particular value or sum, in the good one way function there are not going to be as many words that map to one value, also a good one way function is more complicated(for a computer too or computer takes non polynomial time) than the one I chose!