Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (2024)

Keys and Bitcoin Addresses

One of the ways that Bitcoin uses cryptographic keys is in generating Bitcoin addresses, which are often derived from public keys.This chapter covers public keys and how they are used to generate addresses.

Generating a Public Key

Starting with a private key in the form of a randomly generated number Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (3), we multiply it by a predetermined point on the curve called thegenerator pointKeys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (4)to produce another point somewhere else on the curve, which is the corresponding public key Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (5). The generator point is specified as part of the secp256k1 standard and is always the same for all keys in bitcoin:

Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (6)

where Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (7)is the private key, Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (8)is the generator point, and Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (9)is the resulting public key, a point on the curve. Because the generator point is always the same for all bitcoin users, a private key Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (10)multiplied with Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (11)will always result in the same public key Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (12). The relationship betweenkandKis fixed, but can only be calculated in one direction, from Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (13)to Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (14). That's why a bitcoin address (derived from Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (15)) can be shared with anyone and does not reveal the user's private key (Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (16)).

Tip:A private key can be converted into a public key, but a public key cannot be converted back into a private key because the math only works one way.

Implementing the elliptic curve multiplication, we take the private key Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (17)generated previously and multiply it with the generator point Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (18) to find the public key Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (19):

K = 1E99423A4ED27608A15A2616A2B0E9E52CED330AC530EDCC32C8FFC6A526AEDD * G

Public key Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (20)is defined as a point Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (21):

K = (x, y)where,x = F028892BAD7ED57D2FB57BF33081D5CFCF6F9ED3D3D7F159C2E2FFF579DC341Ay = 07CF33DA18BD734C600B96A72BBC4749D5141C90EC8AC328AE52DDFE2E505BDB

To visualize multiplication of a point with an integer, we will use the simpler elliptic curve over real numbers - remember, the math is the same. Our goal is to find the multiple Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (22)of the generator point Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (23), which is the same as adding Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (24)to itself, Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (25)times in a row. In elliptic curves, adding a point to itself is the equivalent of drawing a tangent line on the point and finding where it intersects the curve again, then reflecting that point on the x-axis.

Elliptic curve cryptography: visualizing the multiplication of a point Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (26) by an integer Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (27) on an elliptic curveshows the process for deriving Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (28), Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (29), Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (30), and Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (31)as a geometric operation on the curve.

Tip: Bitcoin uses thesecp256k1 optimized C libraryto do the elliptic curve math.

Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (32)

Figure 4. Elliptic curve cryptography: visualizing the multiplication of a point Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (33) by an integer Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (34) on an elliptic curve

Keys and Bitcoin Addresses: Generating a Public Key | Saylor Academy (2024)

FAQs

How to generate a public key in Bitcoin? ›

In technical terms, you multiply a starting point (generator point) on the secp256k1 elliptic curve by the private key (a random number), and this results in a new set of x and y coordinates, which is the public key.

What are Bitcoin public keys and addresses? ›

It is important to note that a public key is not the same as a wallet address, as some people may believe. A public key is part of the wallet address and is used to facilitate transactions, while a wallet address is used to identify a destination for cryptocurrency transactions.

How do you get a public key address? ›

The public key is generated from the private key using the Elliptic Curve Digital Signature Algorithm. You get a public address for your account by taking the last 20 bytes of the Keccak-256 hash of the public key and adding 0x to the beginning.

What is the difference between a public key and a public address? ›

Hence, a public address is the shortened version of the public key. As such, a public address can be freely shared with other people and they can send crypto to that address. A wallet is a virtual keychain that allows you to securely store, manage, and transfer your cryptocurrencies.

How do I create my own public key? ›

To generate an SSH private/public key pair for your use, you can use the ssh-keygen command-line utility. You can run the ssh-keygen command from the command line to generate an SSH private/public key pair. If you are using Windows, by default you may not have access to the ssh-keygen command.

What does a Bitcoin key look like? ›

Cryptocurrency private keys are randomly generated numbers that can be one of 2256 possibilities. Generally, they are 256 digits long, but for simplicity, private keys are usually expressed in hexadecimal form. While hashing a public address from a private key is trivial, the reverse is almost impossible.

What does a Bitcoin public address look like? ›

Bitcoin wallet addresses have between 26 and 35 characters and consist of both letters and numbers. They start with either "1," "3," or "bc1." Here's an example of a Bitcoin address: 1Lbcfr7sAHTD9CgdQo3HTMTkV8LK4ZnX71. Ethereum addresses are 42-character hexadecimal addresses.

How to generate a Bitcoin private key? ›

Tip: The bitcoin private key is just a number. You can pick your private keys randomly using just a coin, pencil, and paper: toss a coin 256 times and you have the binary digits of a random private key you can use in a bitcoin wallet. The public key can then be generated from the private key.

What is the algorithm for generating Bitcoin address? ›

An address of 34 characters is generated by applying the SHA256 hashing algorithm on the pubic key, then computing the RIPEMD160 hash of the result. A = RIPEMD160(SHA256(P)), where P is the public key, and A is the Bitcoin address.

Can anyone get a public key? ›

Public key cryptography is a method of encrypting or signing data with two different keys and making one of the keys, the public key, available for anyone to use. The other key is known as the private key. Data encrypted with the public key can only be decrypted with the private key.

How can I find public key? ›

Command Prompt (for Windows 10 only)
  1. Open Command Prompt or Windows PowerShell.
  2. Issue the command: ssh-keygen.
  3. To view public key, navigate to C:\Users\<username>/.ssh/id_rsa.pub (see image below) or execute this command in the command prompt: more C:\Users\<username>/.ssh/id_rsa.pub.
Sep 13, 2022

How do I find someone's public key? ›

To search for public keys on the key server, open GPG Keychain, press ⌘F (or click the Spotlight icon to Lookup Key ). Type the email address for which you are looking for a public key and click Search . Optionally we recommend to verify public keys. This KB-article explains how to verify and sign a key.

Is Bitcoin address the same as the public key? ›

A bitcoin address is not the same as a public key. Bitcoin addresses are derived from a public key using a one-way function.

What is an example of a public key? ›

Example: Public keys of every user are present in the Public key Register. If B wants to send a confidential message to C, then B encrypt the message using C Public key. When C receives the message from B then C can decrypt it using its own Private key.

What would a public key be used for? ›

The public key may be known by anyone and, depending on the algorithm, may be used to 1. Verify a digital signature that is signed by the corresponding private key, 2. Encrypt data that can be decrypted by the corresponding private key, or 3. Compute a shared secret during a key-agreement process.

How do I create a public key token? ›

First open the “Developer Command Prompt for Visual Studio” with Administrator privileges. We will use the “Microsoft . NET Framework Strong Name Utility” to get the necessary information. The result will include the Public key (hasgh algorithm: sha1) and Public key token.

How do you find the public key of a Bitcoin? ›

Step-by-step instructions to find your Extended Public Key

Tap on the small settings icon (three dots) in the top right. Select "Wallet Information." Tap on the "Extended Public Key" to copy it.

How do I get my Bitcoin key? ›

Where can I find my private Bitcoin key?
  1. Software wallets (desktop, mobile, or online): When you use a software wallet, your private key is stored within the application. ...
  2. Hardware wallets: Hardware wallets, such as Ledger or Trezor, store your private keys offline on a physical device.
May 18, 2024

How do I generate a public RSA key? ›

Generate RSA Keys
  1. Open a shell using Putty or another utility.
  2. Use commands to generate an RSA key file. Type the following command to generate RSA keys: ssh-keygen -t rsa. ...
  3. Navigate to the. rsakey. folder that you created in step 2b. ...
  4. Locate the public key beginning with. ssh. and copy the key.

Top Articles
The advantages and disadvantages of an aptitude test: are they reliable? - Testlify
Aptitude test | IQ, Cognitive Ability & Problem-Solving
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
Things To Do In Atlanta Tomorrow Night
Non Sequitur
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Greg O'Connell

Last Updated:

Views: 6059

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Greg O'Connell

Birthday: 1992-01-10

Address: Suite 517 2436 Jefferey Pass, Shanitaside, UT 27519

Phone: +2614651609714

Job: Education Developer

Hobby: Cooking, Gambling, Pottery, Shooting, Baseball, Singing, Snowboarding

Introduction: My name is Greg O'Connell, I am a delightful, colorful, talented, kind, lively, modern, tender person who loves writing and wants to share my knowledge and understanding with you.