Earlier quoted context omitted.
I'm sorry, could you please elaborate? I was always under the assumption that hash functions have to be deterministic, and thus, that "every input has a unique output" was a correct statement. AFAIK the contrary is invalid, so that "not every output is the result of one and only one input".
A function being deterministic means that any input will have a single output. But it is not unique for any hash function, SHA-256 included. The definition of a hash function is any function which takes an arbitrary length input and outputs an n-bit output for some fixed value of n. By virtue of the fact that you have infinite inputs and finite outputs, the outputs cannot be unique. Generally when people make this cl…
Show HN: SHA-256 Animation
91–100 of 105 posts
Re: Show HN: SHA-256 Animation
#92Earlier quoted context omitted.
I realize it's not what you're saying, but I don't like the idea that if you can't teach something to others, you don't understand it yourself. Teaching is a skill and it's something that I am aware that I struggle with. I can explain something in great detail to a captive audience and understand it myself personally, but teaching is about getting others to engage with the ideas you're presenting and identifying and…
If you can't teach it, then you don't understand something perfectly. Perfect is a word par excellence. Teaching is indeed a skill but don't confuse it with presenting. A wise guy once said, "if you can’t explain something in simple terms, you don’t understand it". I'm sure OP stands by it and that itself is very admirable.
Ideas take time to digest and it's not accurate to say that if someone leaves a room not understanding what you've just shown them, you don't understand it yourself.
Re: Show HN: SHA-256 Animation
#93I wanted to understand how SHA-256 works, so I made a terminal animation that shows the bitwise operations at each step. I wrote a text guide in the README.md to explain what's going on. I think my technical terminology is okay. I'm new to hash functions though, so I don't yet know why SHA-256 has been designed in the way it has (e.g. why exact numbers were chosen in the bitwise rotations). As far as I understand, th…
Re: Show HN: SHA-256 Animation
#94Love the animations but they go by too fast. It would be nice if you could add a single step capability so the user could follow along at human pace. Also, I wanted to see how you updated the bit strings in place and was surprised not to find anything special. It looks like you use nothing but puts statements, which, as I understand it, simply add a carriage return at the end of a string but how then does the cursor…
If you add the third optional argument of "enter" when running the sha256.rb script you can use your keyboard to step through. I haven't set this up for the individual animations though. ruby sha256.rb sizzzzlerz enter I didn't do anything special for the terminal animation. I just work out the current state of the hash function at each step, clear the terminal, and print the entire state back to the screen. I know i…
Re: Show HN: SHA-256 Animation
#95I wanted to understand how SHA-256 works, so I made a terminal animation that shows the bitwise operations at each step. I wrote a text guide in the README.md to explain what's going on. I think my technical terminology is okay. I'm new to hash functions though, so I don't yet know why SHA-256 has been designed in the way it has (e.g. why exact numbers were chosen in the bitwise rotations). As far as I understand, th…
This is fantastic - and your YouTube video is also impressive. Thank you for doing this.
Re: Show HN: SHA-256 Animation
#96Earlier quoted context omitted.
at 1:08 in the video, that is exactly what he claims: "So every piece of data in the world has its own unique hash digest." This is false for the reasons apeescape describes: every piece of data in the world has its own hash digest, but these hash digests are not unique.
Yes that sentence is technically incorrect, but practically correct. We've never found a collision and though we expect it to be theoretically possible, even common if you consider "all possible inputs" and the pigeonhole principle, for practical purposes hash outputs are unique because nobody considers "all possible inputs" when evaluating probabilities. I'm saying that for a layman explanation, it's reasonable to s…
You could have said exactly the same thing about MD5 right up until you couldn't. Then you could have said "oh yeah well MD5 is broken, but it's safe to assume you'll never find one for SHA-1", right up until we did. So if you say "oh yeah well SHA-1 is broken, but it's safe to assume you'll never find one for SHA-256", I disagree.
It would be one thing if collisions in hash functions were found by just repeatedly hashing things until you find a collision. If that were the case, then yes, I'd agree with you on those 1-in-2^256 odds, at least for a while. But by and large, that's not what happens. Over time, weaknesses are found in algorithms which allow you shrink the search space, which significantly changes your odds.
Re: Show HN: SHA-256 Animation
#97Earlier quoted context omitted.
If you can't teach it, then you don't understand something perfectly. Perfect is a word par excellence. Teaching is indeed a skill but don't confuse it with presenting. A wise guy once said, "if you can’t explain something in simple terms, you don’t understand it". I'm sure OP stands by it and that itself is very admirable.
Feynman also said: "Hell, if I could explain it to the average person, it wouldn't have been worth the Nobel prize." Ideas take time to digest and it's not accurate to say that if someone leaves a room not understanding what you've just shown them, you don't understand it yourself.
Or even without replacement. Teaching someone doesn't imply a successful result.
Re: Show HN: SHA-256 Animation
#98Earlier quoted context omitted.
If you can't teach it, then you don't understand something perfectly. Perfect is a word par excellence. Teaching is indeed a skill but don't confuse it with presenting. A wise guy once said, "if you can’t explain something in simple terms, you don’t understand it". I'm sure OP stands by it and that itself is very admirable.
Feynman also said: "Hell, if I could explain it to the average person, it wouldn't have been worth the Nobel prize." Ideas take time to digest and it's not accurate to say that if someone leaves a room not understanding what you've just shown them, you don't understand it yourself.
[https://www.aip.org/history-programs/niels-bohr-library/oral...]
Re: Show HN: SHA-256 Animation
#99Earlier quoted context omitted.
This is a great idea of showing something that is at first very complex. Could be used in Discreet Mathematics to teach students!
Indiscreet mathematics?
"When DEK taught Concrete Mathematics at Stanford for the first time, he explained the somewhat strange title by saying that it was his attempt to teach a math course that was hard instead of soft. He announced that, contrary to the expectations of some of his colleagues, he was not going to teach the Theory of Aggregates, nor Stone's Embedding Theorem, nor even the Stone-Cech compactification. (Several students from the civil engineering department got up and quietly left the room.)"
Re: Show HN: SHA-256 Animation
#100I once heard about a meeting where someone did a presentation for the best part of an hour to a room full of Japanese people. They all nodded along, smiling as the presentation progressed. It wasn’t until the end that the presenter asked them what they thought. They all just kept smiling, but no answer. Someone at the front turned and talked to the room (in Japanese) then turned to the presented and said “they do not…
> “they do not speak any English, but they are sure from this presentation that you are very, very intelligent” I kind of hope there's some nuance to this story and it didn't quite happened in the way you described. If they think it's "polite" to let a person talk for an hour without understanding a word of it ( while nodding and smiling ), and then have the nerve to call it "intelligent", that's an insult to both th…