The use of Sha-1 in Ethereum: a detailed aspect
As the second largest cryptocurrency after market capitalization according to Bitcoin, Ethereum has considerably observed the developers and security experts. An aspect that can be unknown to some of them is also known as an Etherum option code in Bitcoin’s script language. In this article we will deal with the history of SHA-1 in Bitcoin and examine its importance in Ethereum.
THE BIRTH OF BITCOIN
Bitcoin was developed by an anonymous person or group with the pseudonym “Laszlo Hanject” and was first introduced into a white paper in 2008. The first design focused on creating a decentralized digital currency, which would be safe, transparent and decentralized. One aspect of this design was the use of cryptographic primitive, including SHA-1.
The acceptance of Sha-1
Initially, Bitcoin developers decided to use SHA-256 (hash-algorithm 256) as standard encryption algorithm. This choice was changed later in 2015 when developers introduced SHA-256 instead of SHA-1 for an important derivation and digital signatures. According to reports, the decision to use SHA-1 was taken due to its simplicity, efficiency and inverse compatibility.
Use of Ethereum of Sha-1
In Ethereum, the command sequence language is based on a variant of the script bitcoin language called script (SPL). While SPS has undergone significant changes since its introduction, one of its operating codes remains the same: op_sha1
. This operation code refers to the SHA 1-Hash function, which is used to sign transactions and perform scripts.
Standard scripts
To put this in the right light, let’s take a look at how a simple script can be defined in Ethereum with the code op_sha1 ‘:
`SOLIDITY
Pragma solidity ^0.8.0;
Hire myscript {
MYFUNCTION FUNCTION () PUBLIC Too payable {
// Make a transaction here
Require (msg.value> = 10 ether);
Payable.call (address (0x ...), 10 ether); // Sign at the hash Sha-1 to the MSG.sender address
}
}
As you can see, this script uses theop_sha1opcode to sign transactions and perform functions using a 1-Hash Hash function.
Diploma
Although Ethereum does not use the same operation codeop_sha1` as Bitcoin for his script language, it was an important part of Bitcoins design. The introduction of SHA-1 in Bitcoin reflects the early focus of cryptocurrency in simplicity, efficiency and backward compatibility. In Ethereum, the reuse of this operation code serves as a reminder that cryptographic primitive are often reused on several blockchain platforms.
Note : As with any technical topic, it is important to verify information about serious sources to guarantee precision. The use of SHA-1 in Ethereum is less outstanding compared to Bitcoin due to its broad acceptance and continuous development, but understanding the origin and development of these protocols can help deepen their knowledge of blockchain technology.