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:
- 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.
- 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.
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).