bip32 hd wallets – generate personal keys from derivation paths or from one other personal keys?

on

|

views

and

comments


To generate a non-public key from one other personal key or derivation path, you should use a course of referred to as “key derivation”. Key derivation is a option to create a brand new personal key from an present personal key through the use of a mathematical perform.

To derive a non-public key from one other personal key, you should use a key derivation perform (KDF) similar to PBKDF2 (Password-Based mostly Key Derivation Perform 2) or BIP32 (Bitcoin Enchancment Proposal 32). These capabilities use the prevailing personal key and a derivation path (a collection of numbers and letters that specify how the brand new personal key ought to be derived) as enter, and produce a brand new personal key as output.

Right here is an instance of the way you would possibly use BIP32 to derive a brand new personal key from an present personal key:

# Import the BIP32 library
import BIP32

# Create a BIP32 occasion
bip32 = BIP32.new()

# Set the prevailing personal key
bip32.set_private_key(existing_private_key)

# Derive the brand new personal key utilizing the desired derivation path
new_private_key = bip32.derive_path(derivation_path)

Observe that the precise steps for producing a non-public key from one other personal key will differ relying on the particular KDF and programming language you might be utilizing. It is usually vital to maintain your personal keys secure and safe, as they can be utilized to entry and spend your Bitcoin.

Share this
Tags

Must-read

Waymo raises $16bn to gas international robotaxi enlargement | Know-how

Self-driving automobile firm Waymo on Monday stated it raised $16bn in a funding spherical that valued the Alphabet subsidiary at $126bn.Waymo co-chief executives...

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here