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 it looks like I'm directly manipulating each individual bit in your terminal, but really I'm just redrawing your screen.
I'd like to do something more practical in future, but for this I just did what I needed to do to get an animation working. Still, every bit you are seeing is correct.
Thanks! I detected a few flashes in some lines that weren't active but I didn't believe you could clear and reprint the entire screen that fast. Very cool!
md5/sha1 is useful because they're still used in UUID (rfc 4122) generation. obv not from a crypto standpoint but more from a unique (non-exploited) approach.
I 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, the Sigma functions promote diffusion of bits to help prevent collisions, and Choice/Majority/Addition help to make it a one-way function, but I'm not entirely sure. I'd be interested in learning more about the design if anyone has experience in this field.
There's nothing particularly special about the constants. They needed a set of n constants to work with and the "cube root of first n primes, truncated" scheme is a "nothing up my sleeve"[0] construction. If they'd used magic numbers with no obvious generation scheme, you'd be left wondering if that was done as a way to put a back door in place.
Without any doubt I do not properly understand anything I can't explain to someone else.
An exercise I go through constantly is figuring out how to explain a thing I think I know to a curious person with no relevant training. Often in the process I discover I need to go do more research or actually test things because I did not understand them as well as I'd maybe thought.
Mostly this is just an exercise. But every so often I actually get to use this in anger. A non-technical friend who works in a Computer Science department asked me on Facebook to explain a joke she'd seen which involved localhost addressing, and I was very pleased to be able to provide a concise explanation using analogies that I know hold up to scrutiny. Obviously a joke isn't very funny if you need it explained, and I can't fix that, but I can avoid the discomfort of her not understanding a joke other people are laughing at in her place of work.
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 elaborating on parts that they don't understand.
Given the content of knowledge sharing sessions that I sit through and the convoluted nature of some of them, I wish that people recognized that presenting information is not all that is required to teach. You can understand something perfectly, but teach it horribly.
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.
It's possible that's a distortion/misquote. I found where he said "I would simply say, ‘Listen, buddy, if I could tell you in a minute what I did, it wouldn’t be worth the Nobel Prize", which is about time, not intellectual ability.
I guess previous posters "If you can't teach it, then you don't understand something perfectly" can be replaced with "Process of teaching someone will make you notice all the holes in your own understanding"
Or even without replacement. Teaching someone doesn't imply a successful result.
Somewhere I had the idea concrete math was a combination of continuous and discrete, but I seem to be mistaken.
"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.)"
A friend of mine stretched her ears and went to Dr. Evil to have them sown up. He did a great job, and it cost £200. This is not available on the NHS and probably would have cost thousands (for someone with less experience in the same procedure).
I've been using Neo4j to store the bitcoin blockchain. Bitcoin transactions have a graph structure, and so by storing the entire blockchain in a graph database you can easily query for connections between different bitcoin addresses.
My experience with Neo4j has been a good one. The database is currently around 1TB and runs continuously without a problem. It's fast enough to use it as a public blockchain explorer, whilst simultaneously keeping up with importing all the latest transactions and blocks on the network.
It took some time to get the hang of the Cypher query language to get it to do what I want, but the browser it comes with is handy for learning via trial and error. I found the people on the Neo4j slack channel to be incredibly helpful with my questions.
Probably because Blockchain got also used outside cryptocurrencies and furthermore because there are now cryptocurrencies that are not Blockchain-based?
You wouldn't be allowed to do this unfortunately.