Homework on Public and Private Keys - Questions

the concept of public and private keys is so that I am able to send private messages to someone with them knowing who sent it only by my public key which is the wallet address.

the 2 use cases for public cryptography is1) encryption making secret messages 2) digital signatures which identify integrity of the message.

1 Like

Hi Mauro,
By a hash of that number I mean that your private key is the result of putting your public key through a hash function no?
You get the public key in many ways but for Bitcoin simply by putting any input into the SHA 256 hash function. People tend to use a specific seed phrase in order to be able to re-generate the public and private key in case they lose it.

1 Like
  1. Public= can be accessed by anyone so you can share with everyone

Private = no one can access it and no one can find it even if they have your public keys

  1. Encryption and digital signitures
1 Like

1.set of data thats either open to public or private. Its and identification tool if u have a pairing of both private and public keys im general you have a btc address

2.encryption
And digital signitures

1 Like

got it… thanks @Mauro for taking time to check my answers… :slight_smile:

1 Like
  1. A public key is for encryption and private keys are for decryption. For instance, if I want to send an encrypted message to my buddy I will take his public key and encrypt the message with it then my buddy will use his private key to decrypt it.

  2. The two use cases for public key cryptography are encryption and digital signatures.

1 Like
homework on public and private keys 1. Describe the concept of public and private key with your own words. - The public key are the entrance for anyone that wants to send data (in this case crypto) to your adress. Anyone can send data, but they can not make your adress send data to another adress based on having the public key. The private key is the key that gives you access to send data from the adress. No one can guess your private key from you public key, but if you have your private key, you can find the public key very easily. 2. What 2 use-cases can public key cryptography be used for? - Encryption and digital signature. Digital signature is the most common one in crypto since that's a secure and transparent way of verifying your ownership of the transaction on the blockchain.
1 Like
  1. The public key is a combination of numbers/letters derived from one’s private key which is available to the public. It is used to confirm transactions by other parties being able to use the public key to determine that a transaction was in fact made by the deriving private key.

The private key is a combination of numbers/letters that is only available to the owner. It is used as the ultimate identification for whoever owns it. The private key is what is responsible for the digital signatures, and allows transactions to be authenticated.

  1. Public key cryptography can be used for:
    a) Transferring messages between two or more parties
    b) Transferring currency between two or more parties.
1 Like
  • Describe the concept of public and private key with your own words.

This is another method of encryption that allows data to flow in an unsecured environment by securing the message or data. In order to have a secure wallet for example hash is created from the private key which is unique to create a public key that can be shared to anyone for communication or for transactions etc.

  • What 2 use-cases can public key cryptography be used for?
  1. To provide a signature with the public key on any exchange of data etc.
  2. Another case is to allow a way to provide a shareable address to either receive information, money etc. Which is secure in an unsecured transmission tunnel.
1 Like

You can’t get a public key by hashing a private key. The short answer is that you get the public key by using an elliptic curve cryptography, and a public address by hashing the public key.

Private Key (Randomly Generated) -> Public Key (Elliptic Curve) -> Public Address (Hashing)

You can find a more technical explanation down below.

A public key is derived from a private key. To derive the public key you need an Elliptic Curve, Bitcoin chose to use secp256k1.

https://en.bitcoin.it/wiki/Elliptic_Curve_Digital_Signature_Algorithm
https://en.bitcoin.it/wiki/Secp256k1

However, a Bitcoin address is a 160-bit hash of the public portion of a public/private ECDSA keypair.

Here is a detailed instruction on how to create a public address.

https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses#How_to_create_Bitcoin_Address

2 Likes

It was my pleasure to help you. Keep up the great work. :smile:

1 Like
  1. The public key and private key are used in cryptography to encrypt and decrypt messages and for digital signatures. Private key is a random number using which a public key is derived using Hash functions. If a person wants to send a message over unsecured network he can encrypt message using a public key published by recipient which is actually derived from the private key. The encrypted message can only be decrypted by the recipient who has the private key.
    Also it can be used to digitally sign a message.

  2. Encryption and Digital signatures are two use cases used in key cryptography.

1 Like

Great answers! Do you think you could explain digital signatures as well? :smile:

1 Like

Don’t forget about encryption. With private and public keys, we can securely send messages even in a public network. :smile:

1 Like
  1. Public key is derived from private key that is used for encryption to keep the private key hidden. You cannot access the private key by having the public key.

  2. Digital signatures allow developers to verify that a message was provided from a trusted identity. The other one is transport-layer security which is an online protocol that authenticates the server, negotiates a shared encryption key, then encrypts normal traffic.

1 Like
  1. Describe the concept of public and private key with your own words.
    A private key is a random number sequence that is only known to the individual that holds it. A public key is generated from that private key and is available publicly to anyone. It is not practically possible to derive a private key from its paired public key, however, a it is possible to check “whose private key” a public key was generated from.

  2. What 2 use-cases can public key cryptography be used for?

  • Encryption (making it impossible to open a message without the private key of its intended recipient)
  • Digital signature (using your private key to “sign” a message so that others can verify it came from you, using your public key)
1 Like

Not really, the owner of the public key can prove that the public key belongs to him. But you can’t just deduct whose private key a public key belongs to :slight_smile:

1 Like

A private key is a random string of bits which is used by an individual in combination with a defined algorithm to encrypt data. A private key is unique to an individual ( or entity) and for the encryption to be at. all secure, the individual who owns it must keep it secret. The private key has a corresponding public key, which is unique to that private key. The public key can be shared and typically is shared publicly.
It can be used with the corresponding decryption algorithm to decrypt messages encrypted with the private key. Provided the message sender has kept his private key secure, the recipient knows by using the public key to decrypt it that the message has come, unaltered, from the particular sender who owns both keys.

One use case for public key cryptography is the encryption of messages in such a way that the recipient knows that the message was sent by a particular user, the user whose public key successfully decrypted it, as I described in the answer above.

The second use case is the use of a digital signature to verify that a particular message came from a particular person or entity. There are a number of ways of doing this. Here is one example.

Bob decides to invite Alice to his punky-reggae party.

He writes him an email, then creates a hash of that email, encypts it with his own private key and then again with Alice’s public key. He adds the encrypted hash to the email and sends it.

Alice receives the email with the hash, apparently from Bob, but he decides to make sure.because there have been some fake invitations going around.
Alice

He decrypts the hash, firstly with his own private key, then with Bob’s public key. He then hashes the rest of the email using the common algorithm, and compares it to the hash he has just decrypted. If it matches, he knows that the message could only have come from Bob, not from Peter Tosh for example. By Alice also decrypting the hash using his own private key, Bob is also assured that nobody else, like Aerosmith, is sure who the message comes from if they intercept. the message en route as an attempt to gatecrash the party. Bob can make doubly sure they can’t do this by also encrypting the message itself using Alice’s public key ( use case 1) so that Aerosmith don’t even know that there is a party…The encrypted hash is what is called a Digital Signature and this adds further verification of who sent the message and who it was intended for.to the recipient. Digital signatures can be used to validate signatures on non-encrypted documents such as contracts as well as encrypted ones.

2 Likes

1 Private key is the one that only you should have access to and from where you can send BTC from and public key is the one everyone can see and you can send BTC to it.
2 Encryption and digital signatures.

1 Like
  1. Public key is an alphanumeric string of characters which can be used to receive bitcoin. Private keys are the alphanumeric string of characters that someone can use to send Bitcoin.

  2. Provide a digital signature (private key) or generate a public address (public key)