Private Key

in #wiki6 months ago (edited)

What is a Private Key

A Private Key is one part of a cryptographic key pair, used in public key cryptography, also known as asymmetric cryptography |Reference: https://www.cloudflare.com/learning/ssl/how-does-public-key-encryption-work/, an important technology not only used to secure blockchain-transactions but more broadly used for Internet security.
The other part is the Public Key. The private key is the part that you must keep secret and not reveal to anyone, while the public key you can share with the world like a bank account number, without compromising security. It is called asymmetric cryptography because from the private key one can deduct via mathematical algorithms (termed one-way-functions) the public key, but not the other way round.

How to use a Public and Private Key

As an example let's say that A wants to send B a secret message on the Hive blockchain, i.e. A wants to make sure that only B can read it.

  • First, A needs to get hold of Bs public key
  • Then A writes the message
  • A encrypts the message with Bs public key and sends it
  • Only B can decrypt the message using Bs private key

In reality users typically have installed software like Keychain that are able to safely store the keys and do the encryption/decryption steps in the background.
On Hive users can send encrypted message to each other also directly, as micro-transactions if they have their memo key.

Private Key Security

Since the holder of the private key can not only decode any secret message like in the example but also validate any kind of transactions (depending on the setup), it is of utmost importance that the private key is safely stored and never shared, especially not on the internet. Scammers and thiefs are very creative in faking all kind of user interfaces (e.g. by promising air drops and are requesting the entry of private keys. Never ever enter your private key on a web interface!

Keys On Hive

On Hive the private posting key is used to sign posting, upvoting and commenting transactions. The private active key is used to sign financial transactions, and the private memo key to send encrypted messages. In addition, there is the private owner key which is able to change all the other keys and which is used for recovery of an account.