HD Wallet in Ardor

Derive multiple account addresses from a single seed

Lior Yaffe
2 min readMar 1, 2020

Anyone who is already familiar with Bitcoin wallets, be it hardware or software, knows that the first step in initializing a wallet involves the creation of a seed of 12 to 24 random words (also called mnemonic). In most cases the mnemonic is created based on a standard dictionary defined by Bitcoin’s Bip39. Later on, the wallet magically derives multiple Bitcoin addresses from the same seed without asking for further secret information from the user. This is implemented using a key derivation mechanism defined by Bip32 based on a unique per coin/type/account tree structure defined by Bip44. Furthermore, a lost wallet can always be recovered from the seed. This secure and relatively user friendly mechanism has become the industry standard and is being integrated into pretty much every new crypto wallet and service.

Until recently, when creating each and every Ardor account the user had to create a different “passphrase” based on a 12 words mnemonic from an Ardor specific dictionary. For a business entity or a power user keeping track of multiple passphrases is becoming a big maintenance problem.

The main goal of the Ardor HD wallet feature introduced in version 2.3 is to catch-up with Bitcoin and other leading crypto-currencies by implementing a simple and intuitive method for creating multiple accounts from a single secure seed. As usual, this feature is implemented into the Ardor wallet as a reference implementation.

The implementation we provide is composed of both hardware and software solutions. For the hardware solution we rely on a Ledger application, for the software solution we implement our own “Ledger Like” key derivation in software. By making sure the software and hardware solutions generate the exact same keys we make sure that our software implementation is as cryptographically secure as the Ledger hardware based solution on which it is based.

Now that we have HD wallet functionality built into the core, we can build on top of it more advanced applications. For example, applications which require generating multiple user accounts with a unique private key for each user account and an option for admin recovery in case a private key is lost by the user.

Another cool feature we support is the ability to generate a stream of new future addresses from a master public key without exposing the secret seed or the private key of each new account. This can be used for example by our existing standby shufflers to automatically generate a constant stream of new accounts in which to store shuffling results.

To implement this feature we had to come up with an innovative design that transforms the existing Ledger functionality to the cryptographic methods used by Ardor.

You can read more about this here

--

--

Lior Yaffe

Co-Founder and Managing Director of Jelurida. Ardor and Nxt core-developer