|
Bitcoin keys generator |
 |
This "Bitcoin Key Generator" is designed to visually detect and detect the formation of cryptographic activities, by means of detecting anti-cryptocurrency operations in the Bitcoin network. Open desire JavaScript code (with comments) makes it possible for everyone within reach of the cryptocurrency keys to understand.
In this example, a binary (Bin-binary) Private key (256 bits) is randomly generated, which is converted to the main hexadecimal (Hex) format of the private key (32 bytes), from which, using the library bitcoinJS-lib.js its byte (Bytes) representation is formed, for use in all further calculations.
"Bitcoin Key Generator" works offline (without internet connection), uses public JavaScript code and can be used to generate your own private keys. But, you have to remember that modern HD-wallets (Hierarchical Deterministic - Hierarchically Deterministic) create a new address after each crypto-transaction to which change will be sent (UTXO - Unspent Transaction (TX) Output).
Example: You created all the necessary keys and addresses in this generator (or in any similar one), sent 1 BTC to your address, then you decided to give a friend 0.3 BTC by transferring them to his the address. Be aware that the remaining 0.7 BTC (Unspent change) will go to a new address for which you do not have a Private Key. You will lose them forever. There is a rule: one Address - one Private Key. In this example, you need to send the entire amount in order not to lose your funds or use the software settings to return the change to the sender's address.
If necessary, you can decompose your personal private key into components or check the generated one.
Short and accessible description of all Bitcoin keys/addresses with examples
Bitcoin Private key (Bin) - Private key (Binary) - a binary number visually representing the private key of Bitcoin. Consists of zeros and ones randomly generated. In this example, it is a fundamental element for all further calculations.
Binary Private Key Example (bit: 256, characters: 32, bytes: 32):
0110101110000110101100100111001111111111001101001111110011100001
1001110101101011100000000100111011111111010110100011111101010111
0100011110101101101001001110101010100010001011110001110101001001
1100000000011110010100101101110110110111100001110101101101001011
Bitcoin Private key (Hex) - Private key in hexadecimal format. Derived from the binary Private Key. Consists of a set of numbers and Characters. It is the main Private Key format in many Bitcoin wallets. Knowing the Private Key, you can manage the funds stored in the Bitcoin address. The private key is used to digitally sign when the asset is sent.
Private Key Hex Example (characters: 64, bytes: 32):
6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b
Bitcoin Private key array (Bytes) - Private key expressed as a byte array. Used to get: WIF key, WIF key with compression token, Bitcoin address, Compressed Bitcoin Address, Public key, Compressed Public key and Private key in Base64 format.
An example of a Private Key expressed as a byte array (characters: 32, bytes: 32):
107, 134, 178, 115, 255, 52, 252, 225, 157, 107, 128, 78, 255, 90, 63, 87,
71, 173, 164, 234, 162, 47, 29, 73, 192, 30, 82, 221, 183, 135, 91, 75
Bitcoin Private key WIF (Hex) - Private key in WIF format. WIF - Wallet Import Format - Wallet import/export format. Designed to simplify coding using ECDSA (Elliptic Curve Digital Signature Algorithm). Consists : Base58 + checksum (4 bytes). First character: "5".
An example of a Private Key in WIF format (characters: 51, bytes: 51):
5JdeC9P7Pbd1uGdFVEsJ41EkEnADbbHGq6p1BwFxm6txNBsQnsw
Bitcoin Private key WIF (Hex) Compressed - Private key in WIF format indicating public key compression. WIF Compressed - Wallet Import Format Compressed - Compressed Import/Export Format wallet. Performs the same functions as the WIF key, but has one more byte. The extra byte contains a marker indicating that their respective Public Keys should be Compressed. Accordingly, Bitcoin Private key WIF Compressed will create Compressed addresses: Bitcoin Public key Compressed and Bitcoin Address (P2PKH) Compressed. First character: "L" or "K".
WIF (Hex) Compressed Private Key Example (characters: 52, bytes: 52):
KzpjABzbCjoxyhxzweCzGG3fqpKgbgJpsJeTqGV37f2KN7RM9eGD
Bitcoin Private key Base64 - Private key in the format Base64. This is a classic data encoding standard. Sometimes used for signing messages (signmessage), as a more compatible (understandable) format for human perception. Last character: "=".
Example of a Private Key in Base64 format (characters: 44, bytes: 44):
a4ayc/80/OGda4BO/1o/V0etpOqiLx1JwB5S3beHW0s=
Bitcoin Public key (Hex) - Public key in hexadecimal format. To generate a Public Key from a Private Key, the Bitcoin protocol uses ECDSA (Elliptic Curve Digital Signature Algorithm). Specifically, it uses a single elliptic curve coordinate point secp256k1 (the intersection of X and Y). Consists of three parts: Prefix (04) + X coordinate + Y coordinate. UnCompressed Public Key is an obsolete format, it has been deprecated in favor of a shorter Compressed format (Public key Compressed). The public key is intended to generate data within transactions in the blockchain and to create a "withdrawal blocking script" transaction (scriptPubKey). First characters: "04".
Public key example (characters: 130, bytes: 65):
04fdf4907810a9f5d9462a1ae09feee5ab205d32798b0ffcc379442021f84c5bbf
c891eb16b0faef4bef99ba6d522fb85470a20df730808e583778aa35c7af98f5
Bitcoin Public key (Hex) Compressed - Public key in hexadecimal format. Used in a Bitcoin transaction if it is indicated by a marker in the Private key indicating compression (Private key WIF Compressed). To generate a Public Key from a Private Key, the Bitcoin protocol uses ECDSA (Elliptic Curve Digital Signature Algorithm). The Compressed format of the Public Key stores the full X coordinate along with a prefix indicating whether the Y coordinate is even or odd (checked against the last byte of Y, which can be seen in the last byte of the unCompressed Public Key). It consists of two parts: Prefix (02 - if Y is even, 03 - if Y is odd) + X coordinate. Accordingly, the Public Compressed key has a smaller size than the unCompressed Public key, which is why it is actively used at the moment. The public key is intended to generate data within transactions in the blockchain and to create a "withdrawal blocking script" transaction (scriptPubKey). First characters: "02" or "03".
An example of a Compressed Public Key (characters: 66, bytes: 33):
03FDF4907810A9F5D9462A1AE09FEEE5AB205D32798B0FFCC379442021F84C5BBF
Bitcoin Address (P2PKH) - Legacy Bitcoin address suggested by Satoshi Nakomoto. Script type: P2PKH (Pay to Public Key Hesh) - pay with public key hash , i.e. The Exit transaction script, using cryptographic functions, checks them against the hash of the Public Key and, in case of a match, allows spending funds. Consists of three parts: Prefix (1) + Public Key + Checksum (4 bytes). It usually contains 34 characters (34 bytes), but if zeros appeared at the beginning of the address during the conversion, they are discarded and, theoretically, the address can consist of 20 characters. First character: "1". Bitcoin Address (P2PKH) uses typo protection Base58Check: latin alphabet only, missing characters: plus "+" and minus "-", slash "/", zero "0", uppercase "o" and "i", lowercase "L"). Only the following characters can be used in the address: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz
There are several types of Bitcoin addresses:
Legacy Addresses: P2PKH - Pay to Public Key Hesh - First character: "1".
Advantage: supported by all wallets.
Legacy Addresses: P2SH - Pay to Script Hash (pay for script hash) - First character: "3".
Enhancement: Allows you to reduce sender's Bitcoin transfer fees, pass on fees to recipients, and create multi-sig addresses.
SegWit addresses: Bech32 or P2WPKH - Pay to Witness Public Key Hash (pay for the hash of the Witness Public Key) - First characters: "bc1q".
Enhancement: SegWit - Segregated Witness (segregated witness) - reduces the block size in the Bitcoin network by removing it from his signature.
Taproot Addresses: P2TR - Pay-to-Taproot - First characters: "bc1p".
Enhancement: improved transaction privacy, using Schnorr scheme to implement MAST (Merklized Alternative Script Trees), improved signature hashing, ability to smart contracts on the Bitcoin network.
All submitted Bitcoin addresses comply with the standards/rules of the Bitcoin network, so they can be used.
Bitcoin address example (P2PKH) (characters: 34, bytes: 34):
12AKRNHpFhDSBDD9rSn74VAzZSL3774PxQ
Bitcoin Address (P2PKH) Compressed - Bitcoin address is used in a Bitcoin transaction if it is indicated by a marker in the Private key indicating compression (Private key WIF Compressed). Can be obtained from the public Compressed key (Bitcoin Public key Compressed). Was introduced in Bitcoin-Qt v0.6.0 (30 May 2012). It usually consists of 34 characters (bytes), but if zeros appeared at the beginning of the address during the conversion, they are discarded and, theoretically, the address can consist of 20 characters. Unlike Bitcoin Address (P2PKH), Bitcoin Address (P2PKH) Compressed Public key (Bitcoin Public key Compressed) is smaller - this leads to fewer transactions in the network and saves the size of the block chain.
Example Bitcoin Address (P2PKH) Compressed (characters: 34, bytes: 34):
1Dt8ty59tU9LkrXG2ocWeSzKFAY8fu6jga
Note 1: Most often, Bitcoin keys are displayed in hexadecimal (Hex) format: numbers from 0 to 9 and letters from A to F.
For various transformations/calculations, their 32 Bytes arrays (numbers from 0 to 255) are used.
Note 2: Private key - has access to spend your asset, Public key - used as address/account to replenish an asset. If someone gets your Private Key - they can spend your funds if someone gets your Public Key - he will be able to replenish your balance.
Note 3: Very briefly, there are only two keys: Private and Public.
Private key is a random set of characters from which, based on mathematical transformations that do not have retroactive effect, Public key is formed. Key = Number. All further actions: various formats, encodings and compression - take place on these two numbers.
|
|