With cardano-cli address key-gen, what is the difference between a normal key (obtained with --normal-key) and an extended key (obtained with --extended-key)?


I'll preface with the note that cardano-cli is a legacy project from the Byron era prior to the restructuring of cardano-sl into the modern infrastructure used today. You likely want to use the cardano-address if you can. The Adrestia repo keeps track of the official tools, libraries, and APIs as well as their support for the various eras.

To give a short explanation, the way key generation in Cardano works is as follows:

  1. You create a Recovery or Seed Phrase. This is a deterministic seed that then derives your extended private key. This is the famous 24 word phrase that you store. It derives your xprv key but it does not represent it. This means if you do not have a seed phrase, you can not get one and you'll have to create a new wallet to get it.

  2. You create the Extended Private Key. This is the root key from which all other keys are derived (including the extended public key). This key can either be created from scratch or derived from a seed phrase. If you want your key to be loadable into Daedalus/Yoroi without poking around in the internals and manually editing the SQLite database, you need to start from a seed phrase.

  3. You derive Child Private Keys. These are various keys that serve specific purposes. Examples include the delegation(staking) keys, the various stake pool keys, and spending keys. As the protocol grows, there'll be more of these keys however as long as you have your extended private key or seed phrase, you'll be able to gain access to those with little to no action required.

  4. You derive whatever else from the Child Private Keys. This is where you would derive addresses, stake pool certificates, etc. This is essentially all handled by the node itself and you don't really have to worry about much of this stuff unless you are doing something specific.

So in summary, the seed phrase is the "seed" that creates everything else (and is easy to store/remember), the extended key is your "master key", and the normal key (now called a spending key) derives from the extended key and lets you spend your funds.

Also note that the terminology differs a bit between eras. Byron used a rather different key system so you should generally avoid using it unless you absolutely have to. Icarus established the basis for modern key derivation in the Cardano ecosystem and Shelley has extended upon that (with staking related keys).

  • The Adrestia repo README lists cardano-wallet among other tools so you seem to be implying that cardano-cli is deprecated and that I should use cardano-wallet instead. I'm trying to mint some native tokens, which I know how to do with cardano-cli. Is minting supported by newer tools like cardano-wallet? A cursory inspection of the cardano-wallet help reveals no minting functionality. If cardano-cli is the only way to mint native tokens, then I'm missing the bridge between how cardano-cli manages keys and addresses and how the newer tools (e.g. cardano-address) do it. May 28 at 12:19
  • I'll report back after I do a bit of research first. From my understanding cardano-cli kinda supports Shelley and Mary. I think the development of native assets started on cardano-cli and is still being ported over to cardano-wallet. It is ultimately just metadata Tx which cardano-wallet supports. From what I can tell atm it looks like if you want to mint native assets with cardano-wallet, you can do it but it's a manual process. The fields and validation seem to exist in the backend but there doesn't seem to be a cli interface other than the metadata interface exposed at the moment.
    – lambda
    May 29 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.