You're looking at Less Wrong's discussion board. This includes all posts, including those that haven't been promoted to the front page yet. For more information, see About Less Wrong.

gjm comments on Stupid Questions March 2015 - Less Wrong Discussion

5 Post author: Gondolinian 03 March 2015 11:37PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (199)

You are viewing a single comment's thread. Show more comments above.

Comment author: sixes_and_sevens 05 March 2015 09:53:34AM *  7 points [-]

Let's make sure we're talking about cryptographic hashing functions.

Let's say I make a prediction that Barack Obama is a werewolf. I don't want anyone to know I've made this prediction, because otherwise the Secret Werewolf Police will come and eat me, but I do want to lord it over everyone after the fact.

I take the string "Barack Obama is a werewolf" and I put it through a hashing function, (for purposes of this example, the hashing function MD5). This produces the output 37ecb0a3164e6422bedc0f8db82e45ec. The original string about Barack Obama is not recoverable from this output, because MD5 is a lossy function, but anyone else putting that string through the MD5 hashing function will get the same output. The hash output is like a fingerprint for the original string.

So if I put 37ecb0a3164e6422bedc0f8db82e45ec in a public place a year before Barack Obama transforms into a werewolf on live television, after the fact I can give people the original string and they can verify it for themselves against the hash output.

I use a Chrome plugin for most tasks that involve basic encoding of text values. (If I'm honest, I mostly use it for rot13, and more exotic uses aren't that common). There are also online hash generators for different hashing functions. Some popular hashing functions for this purpose are MD5 and SHA1.

Does this answer your question?

Comment author: gjm 05 March 2015 10:38:13AM 6 points [-]

MD5 is a poor choice, though it's probably OK for this sort of very short plain-text prediction. SHA-1 is looking fairly sha-ky too these days, but again is probably fine for this purpose. If you're picking a hash function for actual cryptographic purposes, SHA-256 would be a better choice.

Comment author: sixes_and_sevens 05 March 2015 11:26:37AM *  0 points [-]

"Barack Obama is a werewolf, and on an unrelated note, here is my favourite block of nonsense text: bVcDvX2JLDLthTNhOeOvBXiETMysmBR5LuuPrgM6nCOIGx i8zomRQXH5RMQjqTtSj8vWDCXIyBH7NrQu96bozpaGo5g7k JeTUeigwK7YBvFJxCIcbmMaAT213sbi8l4TfWmU3BUFNQaM nAudBqKc0vPEBYRIl1TsQYTCLk0jT2EhP8Qx9wOZcxJ1o30w"

(ETA: this is for entertainment purposes only, and is not intended as any kind of counterpoint to gjm's entirely sound and valuable comment)