In bitcoin, SHA256 encryption algorithm is adopted, which is a hash based encryption method. HA256 is an Algorithm subdivided under sha-2. SHA is the Secure Hash Algorithm, and its abstract length is 256bits, so it is called SHA256.
The characteristic of SHA256 is that the output value of the same input information through SHA256 is unique. When there is a modification in the information encrypted by SHA256, even a small modification will result in completely different results.
The SHA-256 algorithm used by Bitcoin belongs to the SHA-2 series ，When .Satoshi Nakamoto invented Bitcoin, the SHA256 algorithm was recognized as one of the safest and most advanced algorithms. In addition to the use of the REPID-160 algorithm in the generation of addresses, in the Bitcoin system, wherever there is a need for hash operations, SHA25 is used.
Bitcoin itself is a public book, and each block is a one-page account. Starting from the first page, each page has such a hash value. The hash value of each page is the result of the hash value of the previous page and the remaining information obtained by SHA256. If someone modifies the previous account, then from the next page of his modification, the hash value of each page will be completely different and will be seen by everyone at a glance.
The thus modified book can not be recognized by more than 51% of the people, and can not be written into the block, so the modification is invalid. This design ensures that the distributed book of Bitcoin cannot be modified.
The SHA Secure Encryption Standard is one of the most widely used and secure compression algorithms in the world. Therefore, the security of the SHA-256 algorithm is guaranteed. At least until the popularity of quantum computers, SHA-256 is still the most secure encryption algorithm.