SHA — 256 Algorithm
SHA 256 functions that are used routinely in cryptography for things like Message authentication, Digital Signatures and many more. So they need to be fast, quick both to verify and compute.
A hash function take some string and give output in same format
A one-way hash can be generated from any piece of data, but the data cannot be generated from the hash.
The Sha-256 algorithm is based on the Merkle-Damgard construction method, according to which the initial index is divided into blocks immediately after the change is made, and those, in turn, into 16 words. SHA-256 or other hash algorithms have two different attacks that we should be concerned about collision and pre-attack. The collision is situation where different entries are chopped in the same synthesis value. Finding a collision for a SHA-256 via a raw force attack is possible because it has a limited amount of different hash values that it can produce. There are a total of 2256 results for hashing, so collisions are very unlikely to occur and we are not concerned with such a possibility. On average, a good attacker using the birthday paradox to his advantage is likely to find a collision in “only” 2128 tests for SHA-256 and we need much better to find a collision to consider a broken algorithm. If there is a simpler method for finding collisions than crude forcing because of the cryptanalysis, we consider that there is a defect in the algorithm. In 2005, Chinese cryptographers burst SHA-1: they developed a method to find collisions 2000 times faster than the brute-forcing. Their method has been surpassed by other cryptographic work and the machines have become much more powerful over the last 7 years, but finding a collision would still have a lot of computing resources and luck. If we think theoretically about a cryptographic system similar to Bitcoin but developed before 2005 and using SHA-1 as the main hash algorithm, which could lead to a breakdown of the function to the system 7 years after the first document was published how to find collisions faster than brutal forcing. First of all, Bitcoin would not be theoretically sure if it was using SHA-1, but the attacks would still not be relevant to the practice and the search for holes that could be exploited in a system would not be easy. In Bitcoin hashing is mostly used in extraction and transactions. For transactions, it is necessary to sign the transaction hash to transfer the value of the parts to another user. If someone was able to find a way to create a transaction that would result in the same hash value as the original, that person can add himself as the receiver of the coins so then he is able to steal.
Due to SHA1’s smaller bit size, it has become more susceptible to attacks which therefore led to its deprecation from SSL certificate issuers in January 2016. An example of the difference in size between SHA1 Vs SHA256 can be seen in the following example hashes:
- SHA1 — da39a3ee5e6b4b0d3255bfef95601890afd80709
- SHA256 -e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Ledger — Trust + Cryptography = Crypto currency.
Advantages of using SHA 256
· Block size indicator (byte): 64.
· Maximum allowed message length (bytes): 33.
· Characteristics of the message digest size (bytes): 32.
· The standard word size (bytes): 4.
· Internal position length parameter (bytes): 32.
· The number of iterations in one cycle: 64.
· The speed achieved by the Protocol (MiB/s): approximately 140.
