Homework on Public and Private Keys - Questions

1.A private key is a random key generated to be unique and used to decrypt messsages, or to sign something.
A public key is a key generated from my private key, that leads to me and only me. If anywant wants to communicate in a secure way with me, just needsto use my public key to encrypt: everybody maybe can get the encrypted message, but only me will be able to decrypt with my private key

  1. For encrypt messages and to create the bitcoin address. Well there’s something weird on that, but it seems Ivan explain this at minute 15.30. I see other students wrote “to sign the transaction” but I understood at minute 16.40 that i need to sign the transaction with my private key. So i’m a bit confused
1 Like

You sign a message (transaction) with the private key that others can verify using the public key and someone can encrypt a message with your public key that you can decrypt using your private key. :slight_smile:

1- It’s a way to securely exchange information in an asymmetric way
2- Used in Bitcoin address, send emails with a digital signature

1 Like
  1. Private key is any random key generated by your computer and public key is generated through a mathematical formula using the private key. There is no way to from public to private key, it is one way from private to public.
    2.Use cases of public key.
  • to encrypt your message when you are using an open or unsecured network.
  • to use it as your identity on the network( like the address you share so other ppl can send you to the address).
3 Likes
  1. A private key is a unique digital signature that identifies you and is used to sign transactions. It is private but is used to generate a public key that is broadcasted.

A public key is not private and is used to verify the origin of the data by using the signature to check that it corresponds to the private key.

  1. Encryption and digital signatures
1 Like
  1. Describe the concept of public and private key with your own words.
    Public key is an address that is derived from a private key which is generated by random number. You can share the public key with anyone to send you a transaction or use to encrypt data. Private key is used to access or unencrypt the public key data.

  2. What 2 use-cases can public key cryptography be used for?
    To send a message to holder of private key.
    To send transaction to holder of private key.

1 Like

You can also encrypt messages, not just sign them :wink:

1 Like
  1. Public and Private key Cryptography is a system that allows users of a network to be granted exclusive access and/or control of data that is publicly shared. That may be in the form of exclusiveness to decrypt certain data or the ability to verify personal authenticity

  2. Public key cryptography can be used to:

    1. Using a particular Public key of a desired receiver of a message, encrypt messages/data that may only be decrypted with the Private key from which that Public key was generated
    2. Verify the identity of the sender of a message/piece of data in the network. Each message is signed using a Private key by the sender. There is a mathematical way of checking if the signature of that message and the Public key of the supposed sender (which is visible to all users of the network) were originated by the same Private key. If that is the case, the sender of the message is confirmed to be the holder of the tested Public key and the identity of the sender is verified
1 Like

Seems my first answer was correct,in the end (public to encrypt, private to decrypt and to sign. Thank you.

But still have a trouble on second answer “2 uses of public key”. Can you tell me if i answered in the right way?

Thank you!

1 Like

Homework on Public and Private Keys - Questions

  1. Describe the concept of public and private key with your own words.
    1.R The private Key is a Randon unique number, generate in your computer and the Public key is generated from this private key and used for encrypt your messages.
  2. What 2 use-cases can public key cryptography be used for?
    2r. A. Encryption
    B. Digital Signatures
1 Like

There are two separate keys, one that is private and one that is public. Public key cryptography uses a pair of keys to encrypt and decrypt data to protect it against unauthorized access or use. Network users receive public and private key pairs from certification authorities. If other users want to encrypt data, they get the intended recipient’s public key from a public directory. This key is used to encrypt the message, and to send it to the recipient. When the message arrives, the recipient decrypts it using their private kesy that the public doesn’t have access to.

1 Like
  1. Public and private keys are components of public key cryptography. A private key is a large, randomly generated number. And a public key is another number derived from that specific private key.

  2. They are used for encryption and digital signatures

1 Like

You said, “To make sure that the message is from Alice, Bob analyses the Digital signature in the message, and Alice’s public key, and derives Alice’s private key, confirming that the message came from Alice.”

I don’t think that is correct. No one should ever be able to derive a private key! There is a way that one can use the digital signature and verify that the public key was derived from it, thus validating the sender. But I don’t think it would reveal the sender’s private key, at least I should hope not.

  1. A private key is as stated private and does not get broadcasted publicly. It is an encrypted key used to digitally sign transactions. A private key is used to generate a public key.
    A public key is what gets broadcasted on the blockchain. When a message is received, the receiver encrypts the message with his own private key. A public key cannot be used to generate the private key.

  2. Gets used for digital signatures to identify and for integrity

Course: Blockchain & Bitcoin 101
Section: Functions, Hash Functions, Cryptography

08 Public and Private Key Cryptography

Notes from the Video:

Each wallet is built on a public and private key pair.

Use 1:
Encryption

Purpose: Hides the contents of a message or transaction by turning it to gibberish. Only the recipient can decrypt the contents, and only by using her/his private key,

Bob generates a random number private key.
He generates a public key from it via a special formula.
The public key is derived from the private key.
The public key is for the world to see.
No one can derive the private key from the public key.
You can go from the private key to the public, but not vice versa.

Alice encrypts her message with Bob’s public key.
The message becomes unreadable.
Bob’s private key can open up the message.

Not really used in cryptocurrency.

Use 2
Digital Signatures

Purpose: Verifies who sent a message.

How can Bob verify that Alice sent a msg?
Alice generates a random private key.
From that, she generates a public key.
Next, she uses the private key to sign the message.
It doesn’t encrypt it, but encryption is possible.
Bob uses Alice’s public key to verify that the message is from Alice’s private key.

Bitcoin transactions are signed with private keys.

When you start your bitcoin wallet, your computer will generate a private key.

Example: the number of different ways a shuffled card deck can be is 52!, a very large number.

From the private key, you create a public key.
From the public key, you generate a Bitcoin address.

When you use bitcoin, you sign with your private key.
If you lose your private key, you are out of luck.
You receive money at your bitcoin address.


Homework:

1. Describe the concept of public and private key with your own words.

A private key is a computer generated random number. From the private key and a special process, a public key is generated. No one can derive the private key from the public key. The world can see the public key. It is up to each owner of a private key to keep it private. If someone obtains it, that person can steal the money in that account. If one loses his private key, there is no recourse. His money is gone.

The public and private keys make a unique pair. Bitcoin also adds another layer; it uses an address that is generated from the public key.

To encrypt a message, the sender uses the recipient’s public key to encrypt the message. Only the holder of the matching private key can decipher the message. (Sending to a group of people would not work unless there was a group private / public key pair.)

A digital signature is sending a message or transaction with your private key. The receiver can use the sender’s public key to verify that it was indeed the sender who sent the message or transaction.

Goal: Verify that the public key and the digital signature were made using the same private key. This verifies the sender.

One receives Bitcoin at her/his digital address.

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

Two uses of public and private key cryptography are encryption and digital signatures.

1 Like

I have given you the answer in my reply :slight_smile:

The two cases are encryption and digital signatures.
You can sign a message (or transaction) with your private key and everyone that knows your public key can verify that you are the signer of the message.

The other use case is encryption, this one is not used in Bitcoin, but someone can use your public key to send you a hidden message over an unsecured network (the internet) that only you will be able to decrypt and read with your private key. :slight_smile:

1 Like

You only explained encryption, can you figure out what is the other usecase for public key cryptography? :wink:

:thinking: I think both identity and integrity is an example of digital signature. The other use case would be encryption. :slight_smile:

2 Likes

Oh yes. The 2nd is Digital Signatures for identifying and using integrity, so in a BTC wallet, the computer generates a private key which generates a public key off the private key and creates a BTC address.

1 Like
  1. The private key is randomly generated number, which is the basis for the generation of the public key through using mathematical functions (the one-way functions in a sense). Thus, the public key is derived from private key, but the private key could not be restored from the public key.
    The public key is available to all persons, with whom you are willing to share it (or to all interested persons, if you do share it on the web). The private key is kept secret.
    The public key is used for encryption of the message sent to particular person (e.g. PGP) or for validation of the digital signature. The private key is used for decryption of the encrypted message or signing the document.
  2. a) Encryption of the messages / files (PGP, GPG);
    b) digital signature.
1 Like