๐
SHA-256 Cryptographic Hash Algorithm

- SHA-256 is a very important part of Bitcoin network and it
ensuresbothmining processandsecurity of the network. - Producing the information about the previous block requires its header to pass through the SHA-256 algorithm
two times, which is called double-SHA-256. This is how the formula looks likePrevious Block Hash = SHA-256(SHA-256(Block Header))
- A
cryptographic hash(digest) is a kind ofsignaturefor a text or a data file. - A hash is not
encryptionbecause it cannot be decrypted back to the original text - A
one-way cryptographic function - A
fixed sizefor any size of source text - Used to compared
hashedversions of texts- hash tables
- integrity verification
- challenge handshake authentication: avoids transmissing passwords in clear
- digital signatures
SHA-256 generates an almost-unique 256-bit(32-byte) signature for a text.
js
sha256("abc") = "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad";
