Key generation on Kava Mainnet is changing

Ruaridh O'Donnell
3 min readFeb 17, 2020

--

The way private keys are generated and restored from backup on kava mainnet is being updated. This post explains those updates and how they affect everyone.

TL;DR You probably don’t need to do anything (unless you’re a wallet app developer), funds and keys are safe. Restoring keys from a backup phrase might require an extra flag or option to be selected.

The basics: what are mnemonics and private keys?

A mnemonic is the name of the 12–24-word phrase that is used to back up crypto wallet apps or Ledger devices. Private keys are sequences of bytes used to actually sign transactions before sending them to a blockchain. Mnemonics come from a set of standards: bip32, bip44 and bip39. A mnemonic contains all the information needed to recreate a huge number of private keys, across thousands of different chains. That’s how a crypto wallet app or Ledger device can have just one mnemonic but work with all kinds of different chains. A mnemonic effectively “stores” your private keys (actually they’re deterministically generated, but the analogy is useful). The way kava wallets generate keys from a mnemonic is changing.

What are coin types?

A mnemonic can “store” lots of private keys. To retrieve one the wallet app needs to know it’s location or “path”, much like a file path that tells you where a file is on a drive. There is a standard that gives the expected locations for every different blockchain. Projects register these in a central place so that wallets can cooperate. This is known as a “bip44 coin type”. For example, to retrieve a bitcoin key from a mnemonic a wallet knows to use coin type 0, and for Ethereum keys to use coin type 60.

What’s Changing

Building off the work of the cosmos SDK, Kava originally used the same coin type as cosmos (118). This made sense at the time as it was thought the many Comos chains would work a bit like Ethereum coins and dapps. However it’s now clear that using the same coin type causes problems with wallet providers. To facilitate easier integration of KAVA into existing wallets and apps, we are now moving over to a shiny new KAVA specific coin type: 459. This will make it easier for all wallets to interoperate and handle KAVA specific functionality. With the release of this post, there is a new version of kvcli and we are working with existing wallets and SDK providers to implement the necessary changes. We expect broad support for both coin types. Most importantly, if you generated a mnemonic on the old coin type (118), you will still be able to restore it using kvcli. However, the defaults for new mnemonics going forward will be 459.

What do you need to do?

Probably nothing. The changes only have an effect if you are generating keys from a mnemonic (ie restoring a backup or generating a new mnemonic). Wallets will continue to work as they did before.

Specifics:

  • Exporting funds from Binance is unaffected.
  • Existing funds and keys are safe.
  • Trust Wallet uses the new coin type.
  • The cli kvcli will now default to the new coin type but will use the old if you pass --legacy-hd-path flag. make sure you have version ≥ 0.3.2
  • If you already have keys stored with the cli you don’t need to do anything — the cli stores private keys not mnemonics so key signing is unaffected.
  • Ledger users using the Cosmos app use the old coin type. In practice, this is not expected to be an issue as it’s not recommended to restore a backup from a Ledger onto a hot wallet.

--

--