News

Meaning, overview and special considerations

Published

on


What is a public key?

On a blockchain, a public key is a hashed version of a cryptocurrency’s private key. Blockchains use public keys in several ways, but generally they are digital signatures used to provide proof of ownership and create a public address.

Learn more about public keys and how they are used on most blockchains.

Key points

  • A public key is a cryptographic code used to create a blockchain address.
  • When a transaction is received, users are issued a private key, which is used to generate the public key.
  • The private key is made available only to its user and authorizes the user to facilitate transactions from their account.
  • The public key is used as a digital signature, which proves ownership of the private key and creates public cryptocurrency addresses.

How a public key is created

A unique key pair is created when a cryptocurrency user receives a cryptographic transaction: a public key and a private key. The private key is randomly generated and sent through a hashing function (usually an elliptic curve function) to create the public key.

How a public key is used

In general, before a transaction is transmitted, it is digitally signed using the hashed private key. The signature proves ownership of the private key, although it does not disclose the details of the private key to anyone. Since the public key is derived from the private key, the user’s public key is used to prove that the digital signature comes from the private key. Once the validity of the transaction is verified, the funds are sent to the recipient’s public address. The recipient’s wallet then generates new private and public keys.

The public key is used to create a public address. When the public key is created, it is a long string of letters and numbers, so it must be compressed and shortened to form the public address. On the Bitcoin blockchain, the public address is sent via another function (two zeros are added and is sent via Base58Check) to be further encoded. Ethereum uses the last 20 bytes of the public key and adds 0x at the beginning for the public address.

Public key and public address

It is common to hear that the public key is the address where your cryptocurrency is located. However, this is misleading because cryptocurrency is not stored anywhere – it is code and bits with assigned ownership. Furthermore, the primary function of the public key (on the blockchain) is to generate a public address, which is what is broadcast to the network.

Although the public key and address are derived from the private key, the reverse case is almost impossible.

So, when two people enter into an agreement where one sends tokens or coins to the other, they reveal their public addresses to each other. The public address is like a bank account number. The sender needs the number to send the funds to the recipient, who can then access them with the private key. The recipient can also verify the sender’s coin batch using their public address, which will be displayed on their screen. The public keys themselves are never exchanged.

Public key considerations

Cryptocurrency networks remain secure by using complicated mathematical functions to ensure that a private key cannot be derived from the public key.

Since it is impossible to regenerate the private key from the public key or address, if a user loses a private key, any bitcoin or altcoin associated with their public address will be inaccessible forever. On the other hand, a user who loses a public key can have it recreated with the private key.

How do you generate a public key in Ethereum?

The public key is automatically generated on Ethereum from a wallet.

How big is Ethereum’s public key?

The Ethereum public key is 64 bytes or 128 characters in hexadecimal format.

How can I find my cryptographic public key?

In cryptocurrencies, public keys in their entirety usually don’t show up anywhere you can find them because they aren’t relevant to users. Generally you will be able to see your private keys and address in your wallet and your public address on a blockchain explorer, but not a public key, which is different from your public address.

The bottom line

On cryptocurrency blockchains, public keys are usually generated from private keys and used to create addresses. Bitcoin uses the public key to create a public key hash and a Bitcoin address, while Ethereum uses part of it to create public addresses. They are also used to digitally sign transactions on both blockchains.

The comments, opinions and analyzes expressed on Investopedia are for online information purposes. Read ours warranty and exclusion of liability for more information.

Fuente

Leave a Reply

Your email address will not be published. Required fields are marked *

Información básica sobre protección de datos Ver más

  • Responsable: Miguel Mamador.
  • Finalidad:  Moderar los comentarios.
  • Legitimación:  Por consentimiento del interesado.
  • Destinatarios y encargados de tratamiento:  No se ceden o comunican datos a terceros para prestar este servicio. El Titular ha contratado los servicios de alojamiento web a Banahosting que actúa como encargado de tratamiento.
  • Derechos: Acceder, rectificar y suprimir los datos.
  • Información Adicional: Puede consultar la información detallada en la Política de Privacidad.

Trending

Exit mobile version