• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
          • Bip32
            • Bip32-wallet-structure
              • Bip32-compliant-addresses-for-limit-p
              • Bip32-compliant-accounts-for-limit-p
              • Bip32-compliant-chains-p
              • Bip32-compliant-addresses-p
              • Bip32-compliant-tree-p
              • Bip32-compliant-depth-p
              • Bip32-compliant-accounts-p
            • Bip32-key-trees
            • Bip32-key-serialization
            • Bip32-key-derivation
            • Bip32-executable-attachments
            • Bip32-extended-keys
            • Bip32-master-key-generation
          • Bech32
          • Bip39
          • Bip44
          • Base58
          • Bip43
          • Bytes
          • Base58check
          • Cryptography
          • Bip-350
          • Bip-173
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Lists-light
        • Axe
        • Builtins
        • Solidity
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Bip32

Bip32-wallet-structure

Wallet structure.

[BIP32] describes a recommended structure for the key tree. This is illustrated in a figure in [BIP32], an explained in Section `Specification: Wallet structure' of [BIP32].

According to the figure, each key in the tree has depth 0, 1, 2, or 3. The master key is at depth 0, as always. The keys at depth 1 are account keys, one per account. The keys at depth 2 are chain keys, one per chain. The keys at depth 3 are account keys, one per account.

We formalize this structure as a predicate over key trees. With that in hand, we can formally say whether (the key tree of) a wallet is compliant with this structure or not. This compliance predicate is defined incrementally below.

Subtopics

Bip32-compliant-addresses-for-limit-p
Check if the address keys under a given chain key in a tree comply with the BIP 32 wallet structure, for a given address index limit.
Bip32-compliant-accounts-for-limit-p
Check if the account keys in a tree comply with the BIP 32 wallet structure, for a given account index limit.
Bip32-compliant-chains-p
Check if the chain keys under a given account key in a tree comply with the BIP 32 wallet structure.
Bip32-compliant-addresses-p
Check if the address keys under a given chain key in a tree comply with the BIP 32 wallet structure.
Bip32-compliant-tree-p
Check if a key tree complies with the BIP 32 wallet structure.
Bip32-compliant-depth-p
Check if the depth of a key tree complies with the BIP 32 wallet structure.
Bip32-compliant-accounts-p
Check if the account keys in a tree comply with the BIP 32 wallet structure.