In several ways, blockchain technology achieves decentralized security and trust. To begin, new blocks are always stored in a linear and chronological order. Each block contains its own hash, as well as the hash of the previous block and the previously mentioned time stamp. A mathematical function converts digital information into a string of numbers and letters to generate hash codes. If that information is changed in any way, the hash code will change as well.
Suppose a hacker, who also operates a node on a blockchain network, wishes to alter a blockchain and steal cryptocurrency from everyone else. If they changed their single copy, it would no longer be in sync with everyone else’s copy. When everyone else compares their copies to each other, this one copy will stand out, and the hacker’s version of the chain will be discarded as illegitimate.