A lot of my coworkers are feeling pressure from “blockchain” hype. Before throwing a blockchain at a problem, let's review some cryptography basics. There's a good chance a simpler cryptography technique will be more appropriate for whatever application someone wants to hit with the blockchain-hammer.
From building-blocks to blockchain:
“Encryption is something you go around, not through” -I forgot who said this but it's true (common avenues: implementation backdoors, broken algorithms)
First consider when NOT to use cryptography. It's like Black Panther's suit:
It will stop bullets, but it doesn't make you invincible on its own.
Always keep in mind:
This is where catastrophic problems usually come from. People get tunnel-vision on the encryption methods and forget to consider the context and environment it's playing around in.
So before jumping into blockchain, consider:
The basic building block of encryption. A cryptographic hash is considered “cryptographically secure”, which means it is mathematically-really-hard to invert the function. You effectively can't brute-force or guess what input created the output.
Cryptographic hashing is also quite versatile. This makes it such a powerful tool.
Closest to what we typically think of as “passwords”. Symmetric-key methods use a shared secret (a.k.a. “cipher”) to encrypt and decrypt data back and forth symmetrically. They're relatively cheap on computing resources.
Examples:
A pair of hashing functions R and U are created together. R is “pRivate” and U is “pUblic”. They behave in a way that U can verify if some output came from R.
$$ R(x) \rightarrow y $$ $$ U(\{Y\}) \rightarrow \text{something sane} $$ $$ U(\neg \{Y\}) \rightarrow \text{error} $$
Common technology used is RSA. Used in e.g. SSH and Secure Signing.
A blockchain combines a cryptographic hash chain with distributed data storage. Most blockchain issues reduce to distributed storage problems parity and replication efficiency.
Recall that cryptographic hash functions can take variable input and produce a fixed-length hash. Each “block” contains a previous block's hash and data, which are all used to compute that block's hash. This is shared across a distributed data storage network.
Replication methods are required to manage data parity across the network (see bittorrent or database clusters for other replication examples).