Current location: Current location: Home > ai > Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep15 Text
Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep15
[ai] Time: 2025-07-11 11:23:31 Source: AIHackNode Author: code Click: 49 times
we get thispublic key now this publicy key we wanteverybody to have interstellar ambitionsaccess to right thisis yeah whole world can see this thisprivate key we really want it to be uhprivate we don't want people to see thiswe're going to use this private key aslike a password to quote unquotedigitally signed transactions and thenpeople can verify them with this publickey so let's let's see what thisactually looks like let's pick a arandom key a more secure key rightbecause the longer it is the the moresecure it's going to be and if we go tosignatures now right um let's say wehave this uh this message that we wantright we say high world right we wantthis to be the message what's going tohappen is this private key that we'vecreated we can use to sign this dataright remember how in the blockchaindemo you know we were kind of we werehashing stuff right we were we're usingthis uh shade 256 hash to to get thishash well we're doing something similarbut instead of hashing we're we're usingthis digital signature algorithm tocreate this message signature now what'sreally powerful about how this uh thisalgorithm works is that you can createthis message signature with your privatekey but somebody else can't derive yourprivate key from the message signatureand that's what makes this really reallypowerful however if we go to verifyusing this public key right uh and sothis is the this is that 0403 this isthat same public key using this uh usingthis public key anybody can verify ohlet's go ahead and sign it again anybodycan verifythat the signature is yours right so youhave a public a private key just for youso you can sign things and a public keythat anybody can verify something rightso anybody can verify this and let's saysomebody tries to fake a transactionfrom you they say Hey you know this isthis is this is their transaction um allthey have to do is verify that thissignature against your uh public key andvery easily this whole thing turns redbecause uh it isn't verified right thethe algorithm says Hey uhuh that's wrongso we can go ahead and take that intotransactions in this exact same way soif I want to send money you know if Iwant to send $400 from you know myaddress to another address using myprivate key I can sign that transactionand anybody else in the world can thenverify this transaction right and thisis why when people say hide your keysyou know protect your keys this is whatwe're talking aboutin our accounts here right if we go touh settings and again the only reasonthat I'm showing you guys my pneumonicand my private key is because this is auh this is a dumpster account I'm goingto throw this away at the end of thisvideo or I'm just not going to put anyreal money in it umbut when we look at our our our metamaskhere we have this pneumonic phrase whichallows us to easily get these differentprivate keys right so uh pneumonicphrase combined uh with you know uhwhatever account number will get us aprivate key so pneumonic phrase combinedwith one we're going to get this privatekey and this is when we look at AccountDetails export privateKey password confirm this is going to bethe private key that we're going to useto sign our transactions right this ifanybody else gets access to this privatekey they then can sign transactions forus and they can send transactions for usand that's why we want to keep theseprivate so uh it works the exact sameway right so this is why it's soimportant to hide your private keys andhide your newonics now your ethereumaddress is actually apiece uh is actually a piece of yourpublic key now to get our address inethereum all we have to do is take thispublic key that we've created with ourprivate key hash it using that sameethereum hashing algorithm and then takethe last 20 bytes and that's how we'llactually derive to our um to our addresshere now knowing the exact methodologyof how to get the address doesn't reallymatter because it could changeblockchain to blockchain and could evenchange NE two um but just know that thatis essentially how kind of theseaddresses are derived right there's somederivative of the public key rightbecause the public key is public and youknow uh using the public key in kind ofany public way is is totally fine um butnot the private key so that is how wesign our transactions note though thisisn't how we send the transactions so sothis is just going to sign it create atransaction for us to send uh we'lllearn later on how to send thesetransactions so that was a lot ofinformation there too let's do a quickrecap your public key is derived byusing a digital signature algorithm onyour private key right and you want tokeep your private key private at alltimes because you're going to use yourprivate key to sign transactions signingtransactions with your private key youare the only one who can actually dothis because you can't get get theprivate key from a message signaturehowever using your public key you cananybody can very easily verify that asignature that's signed by you is infact signed by you in our metamask ourprivate keys are located in this accountdetail section you just hit uh showPrivate keys and type in your passwordand you'll get your your private keyhere a quick note here is oftentimeswhen using your private key somewherethey want it in hexadecimal form so ifwe're going to use our private key umfor something like brownie which we'llgo into later we need to actually appenda zerox to the front but we'll get intothat later and the address of youraccount is derived from this so if youthink about it your private key createsyour public key which then can createyour address and there's a littlebarrierhere or a big barrier here because yourprivate key you want to keep private andyour public key and your address can allbe public informationnow that we know a little bit more aboutwhat's going on underneath the hood ofthese blockchains let's go back at ourtransactions and look at
(Editor in charge: cs)
Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep67Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep24
Related content
- GenAI Essentials – Full Course for Beginners - Ep136
- Web3 Developer in 2024 Roadmap_ Solidity, Smart Contract, and Blockchain Development [Full Course] - Ep55
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep244
- One On One Interview With Abisoye Bello _ Host_ Patricia Nkwane - Ep1
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep143
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep273
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep96
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep253
- Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial - Ep132
- Web3 Developer in 2024 Roadmap_ Solidity, Smart Contract, and Blockchain Development [Full Course] - Ep25
- Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep77
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep282
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep155
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep6
Wonderful recommendations
- XRP Ripple LIVE Senate Brad Garlinghouse - FROM WALL STREET TO WEB3 - Martyn Lucas Investor - Ep8
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep101
- Web3 Developer in 2024 Roadmap_ Solidity, Smart Contract, and Blockchain Development [Full Course] - Ep32
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep196
- Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course - Ep176
- Solana Developer Bootcamp 2024 - Learn Blockchain and Full Stack Web3 Development - Projects 1-9 - Ep17
Popular Clicks