Skip to content

Commit

Permalink
slip-0023: Minor naming changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkozlik committed Jul 31, 2019
1 parent b4822df commit 92b5b28
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions slip-0023.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Cryptocurrency wallets generally work by combining a [BIP-0039](https://github.c

Cardano hierarchical deterministic wallets use an extended private key which requires them to implement a custom adaptation of the BIP-0032 child key derivation scheme. The Cardano wallets currently in existence implement several mutually incompatible schemes for the derivation of the master node from a BIP-0039 mnemonic and passphrase. Unfortunately all of these derivation schemes fail to separate the derivation of the seed from the derivation of the key tree, making it impossible to integrate them with new seed derivation schemes. This specification aims to rectify this by defining a new scheme for the derivation of the master node from a seed. The new scheme is primarily intended for use with SLIP-0039 Shamir's Secret-Sharing for Mnemonic Codes.

## Universal master node derivation
## Cardano universal master node derivation

This scheme adapts the master node derivation used in BIP-0032 and SLIP-0010 by defining a new curve name "ed25519 cardano seed" for the Ed25519 curve with the Cardano deterministic key hierarchy. The curve name is used as salt in BIP-0032 and SLIP-0010 when deriving the master node from the seed. This is necessary to ensure proper domain separation between different elliptic curves or different types of key hierarchies. The root extended private key (*k*<sub>L</sub>,&nbsp;*k*<sub>R</sub>) is computed by taking the SHA-512 hash of the root private key *I*<sub>L</sub>, modifying certain bits to make it a valid EdDSA key and clearing the third highest bit of *k*<sub>L</sub> to ensure compatibility with Cardano child key derivation.

Expand All @@ -30,9 +30,9 @@ This scheme adapts the master node derivation used in BIP-0032 and SLIP-0010 by
5. Modify *k* by assigning *k*[0] := *k*[0] & 0xf8 and *k*[31] := (*k*[31] & 0x1f) | 0x40.
6. Interpret *k*[0:32] as a 256-bit integer *k*<sub>L</sub> in little-endian byte order. Let *k*<sub>R</sub> := *k*[32:64] and use (*k*<sub>L</sub>,&nbsp;*k*<sub>R</sub>) as the root extended private key and *c* := *I*<sub>R</sub> as the root chain code.

## Icarus master node derivation
## Cardano Icarus master node derivation

The Icarus master node derivation scheme is commonly used with BIP-0039. Since there does not exist any specification of this scheme, its description is included below for completeness.
The Icarus master node derivation scheme, aka V2 derivation scheme, is commonly used with BIP-0039 in Cardano wallets. Since there does not exist any specification of this scheme, its description is included below for completeness.

1. Let *M* be a BIP-0039 mnemonic and *P* the passphrase entered by the user.
2. Determine the initial entropy *E* that was used to generate *M*.
Expand All @@ -46,9 +46,9 @@ The derivation of child keys in the Cardano deterministic key hierarchy is speci

## Compliance

Implementations which use SLIP-0039 as the source of the master secret MUST derive the master node for the Cardano deterministic key hierarchy using the Universal master node derivation scheme as specified above.
Implementations which use SLIP-0039 as the source of the master secret MUST derive the master node for the Cardano deterministic key hierarchy using the Cardano universal master node derivation scheme as specified [above](#cardano-universal-master-node-derivation).

Implementations which use BIP-0039 as the source of the master secret SHOULD derive the master node for the Cardano deterministic key hierarchy using the Icarus master node derivation scheme to maintain compatibility with existing wallets.
Implementations which use BIP-0039 as the source of the master secret SHOULD derive the master node for the Cardano deterministic key hierarchy using the Cardano Icarus master node derivation scheme to maintain compatibility with existing wallets.

## Test vectors

Expand Down

0 comments on commit 92b5b28

Please sign in to comment.