Trần Hoàng Phương Thảo-22070432
Week 5: Keys and Addresses
LAB 1 : Generating private, public keys and addresses
Part I : Generating private keys
Fig 1. Generating private keys
This generate random numbers of 256 bits, known as private keys. It consists of 64
hexadecimal digitis, each of 4 bits.
Private key:
830efae86d3aa431d7db73a273e25090b83f4f70073415610954895fb8832a27
Part II : Generating a pair of keys (private and public)
Public keys are derived from the private keys using the elliptic Curve formula:
public_key=private_key*G
G is the generator of the Elliptic Curve.
The public key is a point of the curve, with two coordinates X and Y.
Fig 2. Generating a pair of keys (private and public)
Private Key:
31a787206e5afeff3521c0c6ecb619fe81d61874b390927720152321ed546a39
Public Key:
04c9d6aa39823c5a2dae1d9bd4f7ee23eebf95ffdfe181e1bf7f1e9c898437ca6ccd4bcc0ca223
b1c19025cd2d0ec9c3652c8c6ed00fca9286ebf6f2743b357452
Notice that the public key is larger than the private key. Why?
Trần Hoàng Phương Thảo-22070432
The public key is larger because it typically contains more data (such as coordinate pairs in
ECC or an additional exponent in RSA) and is structured for public distribution, while the
private key is optimized for secrecy and efficiency.
Part III: Generating a bitcoin address
Fig 3. Generating a bitcoin address
Private Key:23cc2cec3e865938dbaa9d3b3798c8f993b258336657822c0f39ef3c9067ae13
Public Key:
04da9d32b0c3a3f66a06b258cf465f0fdac8e22bebb2f58a7f7cade89ad131afed8b66994ef72d
e1c2c71d0282b45991d9b7c2a40d800c9c4701b6032c9c4fa180
Bitcoin Address Key:1CLZ7BZJPJfvftjCurg3oWRsBRwT2a5VMQ
I am using the following website for hash functions:
https://www.fileformat.info/tool/hash.htm
SHA-256(public_key)=
b64415debce6c176334a6b55a12bf6f55461bb2f651b3712b399cc9219caf23b
RIPEMD-160(SHA-256(public_key))=
7c5c168f4f593dbade9d86a66b29a48fc4e0ea35
Fig 4. Decode Bitcoin address
Trần Hoàng Phương Thảo-22070432
LAB 2: Generate paper wallet from the BitAddress.org
A Paper Wallet is a secure offline method to store Bitcoin. To create a Paper Wallet
on bitaddress.org, visit the website, generate a random key pair (Public Address &
Private Key), select the Paper Wallet option, and print it out.
Fig 5. Generate paper wallet from the BitAddress.org
Fig 6. Paper wallet
LAB 3:
A BIP-38 Paper Wallet adds an extra layer of security by encrypting your Private Key
with a password. On bitaddress.org, I generate a key pair, select Paper Wallet mode,
enable BIP-38 encryption, set a password, and print it out. My Private Key is now
encrypted, meaning it can only be unlocked with the correct password.
Trần Hoàng Phương Thảo-22070432
Fig 7. BIP-38 Paper Wallet
LAB 4:
Using online tool to generate vanity address
http://www.mobilefish.com
Vanity address miner
Compiling and running the vanity-miner example
I generate a Bitcoin vanity address containing the specific character sequence "Thao"
using an online tool. This process requires correctly configuring the public key format
and selecting the appropriate options to ensure the generated address meets the
requirements.
Fig 8. Vanity address