Bitcoin Improvement Proposal (BIP) 32.
This is described at
this page in the bitcoin/bips repository on GitHub,
Page `BIP 0032' of [Wiki].
We refer to the document at the first URL as `[BIP32]'
in the documentation below.
As stated in the 'Conventions' section of [BIP32],
the elliptic curve cryptography is based on the secp256k1 curve.
In our model, the types for private and public keys are
secp256k1-priv-key-p and secp256k1-pub-key-p.
The conversion functions described in the 'Conventions' section of [BIP32]
are formalized as follows in our model of Bitcoin:
The operations defined below should suffice to cover
the use cases that BIP 32 should cater to:
- Given a seed, bip32-master-tree is used to generate
a singleton tree with the master private key at the root.
- This master tree is extended as needed,
- For signing, private keys can be retrieved from the tree
For calculating addresses, auditing, etc.,
public keys can be retrieved from the tree
- For sharing (subtrees of) the master tree,
bip32-export-key is used to serialize a (private or public) key.
Then bip32-import-key is used to
construct a separate (sub)tree rooted at that key.
- (Sub)trees shared as just explained can be then operated upon via
bip32-extend-tree for deriving more keys,
bip32-get-priv-key-at-path for signing
(unless the tree consists of public keys),
calculating addresses, auditing, etc.,
and bip32-export-key for further sharing.
- Wallet structure.
- Key trees.
- Key serialization.
- Key derivation functions.
- Executable attachments for the BIP 32 formalization.
- Extended keys.
- Master key generation.