Why are different headlines compressed and uncompressed. Different titles
As we immerse ourselves deeper into the Ethereum world, two types of public keys become relevant: tablets and uncompressed. In this article, we examine why these different forms of public keys create different titles.
The Elliptic Curve -Based Public Cheia
In the first days of Ethereum, the public keys of the users were depicted as coordinated on an elliptical curve (CE). Each coordinate consisted of two numbers: x and y. These coordinates can be considered as a punctual position on the elliptical curve in a 2D space.
To produce the Ethereum public key, it would first choose a random number between -2^256 and 2^256 (inclusive) to represent x and another random number between -2^256 and 2^256 to represent y. The resulting numbers were then used with the help of the SHA-256 to produce a compact public key.
Public key compressed
The compressed public key is a value of 32 -Byte (384 bits) representing the coordinates of the elliptical curve. This value was created by creating X and Y with Sha-256 and some additional data. The resulting hash is then truncated to 32 bytes.
Here is an example of how to represent a compressed public key for a particular user:
`Hex
0x ... a9b6d8c4f5e3cc1 ... B41 ...
`
Public key ponded
In contrast, the uncompressed public key is simply the original coordinates (X and Y), extract or compression. Uncompressed public keys are used for cryptographic purposes and can be more efficient than compacted.
Ethereum would choose two random numbers between -2^256 and 2^256 to produce x and Y. These values were then used by the SH -256 to produce the uncompressed public key.
vs. blank compressed titles
Now that I have explained why compressed and uncompressed public keys are different titles, submerged in the generation mode:
- Not famous titles: Each Ethereum title is presented as 40 bytes (512 bits), which contains two random numbers (X and Y), followed by some additional data, such as network hash and block number. The resulting hash value is used to produce the uncompressed public key.
- Compressed titles: Similarly, the compressed titles are generated by truncating the uncompressed public key with the SHA-256 and 32 fixed bytes.
Why different titles?
The reason for this difference is how the Ethereum’s public keys were designed:
- The uncompressed titles are more effective, as it does not require additional data, such as network hash or block number. This is more suitable for uses when you need fast and easy transactions.
- However, compressed titles ensure the balance between efficiency and security. They are still safe against most attacks, but compressed titles can be faster to generate and control.
In summary, choosing compressed or uncompressed public keys depends on the specific use. The uncompressed securities are more effective for cryptographic purposes, while the compressed titles offer better performance in transactions, where quick and easy answers are needed.