I'm a high school student doing a project about blockchain. I'm trying to figure out why hashing algorithms are crucial for the existence of blockchain and other types of cryptography wouldn't work. However I've learned about pseudo random number generators and they seem to do the job. Any reason why these would not be qualified?

One key difference between cryptographic hash functions and PRGs is this:

  1. Pseudorandom generators (PRGs) are secret key algorithms. A PRG's user needs to provide it with some random input that must be kept secret from any adversary. If there is no such input or it's not secret, the adversary can predict the output.
  2. Cryptographic hash functions are (usually) unkeyed algorithms. They are designed to work in certain scenarios where there is no secret information at all. It should be hard for example for an adversary to find any input that produces some known output (preimage resistance), or a second input that produces the same output as a known input (second preimage resistance).

If you can grasp this and its implications for your topic you will be well ahead. A key observation is that blockchain is a public ledger.

  • Thank you for your comment. So with PRGs if the input is not secret, then you can predict the output. However, to me this doesn't make any difference because hash functions are the same in that way: if you know the input, you can also predict (compute) the output. – j. loper Nov 13 at 22:04

More often than not PRNG's are build using hash function or hash function techniques. They are build to create a stream of random bits given relatively few bits of random input. They are not build to hash possibly large amounts of data to a constant size output.

The latter is required for signature generation, and signatures are a fundamental part of the blockchain technology. So the data is hashed and verified using an efficient hash function. Hash functions are generally more performant than PRNG's.

Furthermore hash functions are often used for the proof of work which is often required to mine cryptocurrency. For instance, BitCoin uses a double SHA-256 call to perform the proof of work. Miners however only return BitCoin's, so the hash function is not directly accessible from the outside of hardware miners. Not all block chain technology relies on mining though (and for most cryptocurrency it is very much the question what they rely on in the first place).

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.