The One Question bounty closes Thursday 10 December.

Join in
We Them Media logo We Them Media Support us

Web3bridge Students (cohort 11) Share What They’ve Learned: Public and Private Keys

The picture loads from YouTube. The player loads only when you press Play. Turn on captions in the player if you need them.

A student explains public and private keys in Ethereum using a mailbox and a secret password. They walk through how a random number becomes a recovery phrase, then a seed, a private key and a public key, and separate random wallets from seed-based ones, stressing safe storage of the phrase.

Not by We Them Media Channel: Web3Bridge. Published Tuesday 8 October 2024.

Titles are the owner’s. It plays from their channel.

Transcript

This transcript may contain errors. This video belongs to Web3Bridge. Letters mark each change of speaker.

These are the speakers’ own words. We have not checked their claims.

0:04 A: My name is Colin Soribo, and I'm here to tell you about public and private keys. Public and private keys in Ethereum are very important because they are what gives you security on the Ethereum blockchain. So let's take public key as like our home address or our mailbox that we share to people to like send us stuff, send us mails and all that. And then private key is like a secret password that we have to keep secure. Like, we have to keep it very private because it's the private key that we use to sign transactions on the Ethereum blockchain. And you can see it as signing mails and sending to other persons so that when they receive the mail, they know that yes, this message actually came from you. So if you play with your private key and another person gets hold of it, they can impersonate you, they can sign mails like it actually came from you, and they can- on the Ethereum blockchain, they can get all your money. So that's why you have to keep it private. And there's nothing to worry about. Generally speaking, a particular database can send you mails and there's nothing to worry about. They can't get your private key from just knowing your public key.

1:06 B: So the very first step of this process of creating your private and public key will be to generate an entropy number, which is a very random number that's within the range of 128 bits to 256 bits. So this particular number is passed through a hashing function SHA-256 to generate a hash. From it, we generate our checksum, which is like the first 4 digits added to the entropy. So that's the third step. So this new value was going to be passed to another hashing function to generate the string of bytes, and these bytes will be divided into 11-bit segments. So the next step will be each of these bit segments is mapped to a pool of specific words which we use to generate mnemonic phrases. So for using a 128-bit, we'll be making use- this will generate for us 12 mnemonic phrases. So these phrases are then further passed through another hashing algorithm to produce the seed. So this seed is further passed around the hashing algorithm to generate the private key. Then the private key, there's another mathematical equation that the private key is multiplied by the Ethereum G constant, which is additively multiplied, not the general multiplication. So it's additively multiplied with the Ethereum G constant to produce the public key. So the summary of the process is, uh, the private key is used to generate the public key, and throughout the processes there are a number of hashing algorithms that have been passed through. And the essence of this is just to ensure the security of the private key, that it is not compromised.

3:01 C: Term wallet contains keys while the Ether and token are stored on the blockchain. Wallet itself has like keychains. Users sign transactions with private keys just to prove they own the Ether on that particular wallet address. And we have 2 different types of Ethereum wallets. We have the non-deterministic wallets and deterministic wallets. For the non-deterministic wallets, the keys are generated independently with some random numbers. This type of wallet is kind of obsolete because as of now, we, we don't make use of that kind of wallet often. It generates the random wallets, and with that we have a bunch of keys. But for the non-deterministic wallets, the keys are generated from a single master key known as the seed. The seed is quite very important. The seed is Encoded to a list of words, either 12 or 24 words. You know, before you calculate your MetaMask wallet address, you get to like store some keys, some, some words to a safe place. It is better to store them, probably to write them down or store them to a place where no one has access to it. For the non-dramatic wallets, you can import your address from, from a particular wallet address to another type of wallet address, so far you have your seed phrase key. So just like shows the importance of, um, of your private keys. So that's where public keys and private keys comes into role, comes into play in, in the type of Ethereum wallet address.

4:50 B: So to see more of our content, kindly subscribe to all our social media channels.

More from this hub

Something wrong, or a video you want off this page? Write to wethem.xyz@gmail.com and it is fixed or taken down within 48 hours.