Показ дописів із міткою ENG. Показати всі дописи
Показ дописів із міткою ENG. Показати всі дописи

середа, 1 травня 2024 р.

PureAceton :: How to Convert Mnemonic (12 Word) to Private Key & Address Wallet Bitcoin and Ethereum | UPD II Part added

 

How to Convert Mnemonic (12 Word) to Private Key & Address Wallet Bitcoin and Ethereum

By PyMmdrza 
mdrza.medium.com
3 min
April 23, 2023

I. How to Convert Mnemonic (12 Word) to Private Key & Address Wallet Bitcoin and Ethereum

·
4 min read

--

Listen

Share

To convert a mnemonic to a private key, you first need to generate a seed from the mnemonic using a key derivation function such as PBKDF2 or BIP39. The seed is then used to generate a master key using a hierarchical deterministic (HD) key generation algorithm such as BIP32.

The master key can then be used to derive a private key, which is a 256-bit number represented as a hexadecimal string. This private key can be converted to a WIF (Wallet Import Format) key for Bitcoin, or directly used to generate a public key and address for Ethereum.

https://mdrza.medium.com/genereted-private-key-and-address-tron-wallet-from-mnemonic-3e180e7e154d

To generate a Bitcoin address, the private key needs to be hashed using the SHA-256 and RIPEMD-160 algorithms, and then encoded using Base58Check. This produces a unique address that can be used to receive Bitcoin.

To generate an Ethereum address, the private key is used to generate a public key, which is a point on an elliptic curve. This public key is then hashed using the Keccak-256 algorithm, and the resulting hash is used as the address.

Step 1: Mnemonic to Seed

A mnemonic is a sequence of words that can be used to generate a seed for a hierarchical deterministic (HD) wallet. HD wallets are designed to create a hierarchy of keys, starting from a single “master key” that is derived from the mnemonic.

The seed is generated from the mnemonic using a key derivation function, such as PBKDF2 or BIP39. This function takes the mnemonic as input, along with an optional passphrase, and produces a 512-bit seed.

The seed is a random value that can be used to derive multiple private keys and addresses. It’s important to keep the seed secure, as anyone with access to the seed can generate the same keys and addresses as you.

Step 2: Seed to Master Key

The seed is used to generate a master key using an HD key generation algorithm, such as BIP32. This algorithm takes the seed as input and produces a master key, which is a 256-bit number.

The master key is the root of the key hierarchy for the wallet. It can be used to derive multiple private keys and addresses, each with their own level in the hierarchy.

Step 3: Master Key to Private Key

The master key is used to derive a private key using an HD key derivation algorithm, such as BIP32 or BIP44. This algorithm takes the master key as input, along with an index number that corresponds to a specific private key in the hierarchy.

The private key is a 256-bit number represented as a hexadecimal string. It’s important to keep the private key secure, as anyone with access to the private key can spend the funds associated with the corresponding address.

Step 4: Private Key to Bitcoin Address

To generate a Bitcoin address from the private key, the private key needs to be hashed using the SHA-256 and RIPEMD-160 algorithms. This produces a 160-bit hash, which is then encoded using Base58Check.

Base58Check is a custom encoding scheme that is used to represent Bitcoin addresses in a more compact and user-friendly format than raw hashes. The resulting address is a unique identifier that can be used to receive Bitcoin.

Pro2word : Mnemonic crack bitcoin all address wallet type

https://github.com/Pymmdrza/Pro2WordBTC

Step 5: Private Key to Ethereum Address

To generate an Ethereum address from the private key, the private key is used to generate a public key. This is done by performing a series of mathematical operations on the private key that result in a point on an elliptic curve. The public key is a 512-bit number represented as a hexadecimal string. This public key is then hashed using the Keccak-256 algorithm, which produces a 256-bit hash.

The resulting hash is the Ethereum address associated with the private key. Ethereum addresses are represented as hexadecimal strings and are 20 bytes in length. In summary, the process of converting a mnemonic to a private key and then generating a Bitcoin and Ethereum address involves several steps, including generating a seed from the mnemonic, deriving a master key from the seed, deriving a private key from the master key, and finally, generating a Bitcoin address using the private key and a Ethereum address using the public key. It’s important to keep the mnemonic, seed, and private key secure, as they provide access to the funds associated with the corresponding addresses.

II.

Extract the private key from the seed phrase

By taki 183 
Startups and business
2 min
September 27, 2020

A detailed answer to a frequently asked question!

Typically, non-custodial wallets use a seed phrase to restore access to funds. Seed is a sequence of 12, 18 or 24 words, BIP39 standard. This standard contains a dictionary of 2048 words and key generation protocols BIP32-44-49-84-141. With a wallet seed, you can access funds in almost any non-custodial wallet application. Accordingly, the reliability of seed phrase storage is a top priority for a cryptocurrency user.

In some wallets, access to funds is provided through the Private Key, which is a sequence of alphanumeric characters. It is worth noting that the private key provides access to only one specific coin address, while the seed phrase gives complete control over all coin addresses that were generated in the wallet. In simple words, the seed phrase contains all the private keys for all addresses in the wallet.

The process of extracting a private key from a seed phrase is quite simple, let's look at it using the example of the Ripple coin (XRP).

Attention! Further operations will be performed with your seed phrase. By continuing to follow the instructions, you take full responsibility for the safety of your assets.

  • Save latest BIP39 release on PC https://github.com/iancoleman/bip39/releases/
  • Disable all networks on the PC - Wi-Fi, LAN, Bluetooth. This is necessary to ensure the security of your seed phrase. It is better to do this on a “cold” computer that will never be used for the Internet again (or the operating system will be reinstalled immediately after the necessary steps);
  • Open the downloaded BIP39 release in html, and enter the seed phrase in the BIP39 Mnemonic field. In the Coin field, from the drop-down list, select the ticker of the desired coin, in our case it is XRP;
  • In the Derived Addresses section, use the search (CTRL+F) to look for the address we need and its private key. In Trustee Wallet , this is usually the first address in the list, unless HD wallet mode is enabled.
  • Now the resulting private key can be used in any official Ripple wallet.

This method can be used to obtain private keys from the seed phrase of any coin, but it is important to follow the rules of “digital hygiene.” Please note that the rules for handling and storing a private key are comparable to the rules for a seed phrase - do not transfer to anyone, store securely, etc.

PS If you don’t see the required address or you don’t see all of them, then you need to fill out the “Derivation Path” section. This also applies to wallets such as Coinomi, Atomic Wallet, where the coin path has a different standard. Full instructions on how to register the path of the coin you need can be found at the link https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki or in the documentation for the corresponding wallets.