• 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-key-trees
            • Bip32-key-serialization
              • Bip32-export-key
              • Bip32-deserialize-key
              • Bip32-serialize-key
              • Bip32-serialized-key-p
              • Bip32-import-key
              • Bip32-key-identifier
              • Bip32-serialization-versions
                • *bip32-version-pub-main*
                • *bip32-version-priv-main*
                • *bip32-version-pub-test*
                • *bip32-version-priv-test*
              • Bip32-key-fingerprint
            • 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-key-serialization

Bip32-serialization-versions

Versions bytes for serializing extended keys.

These are for private or public keys, for mainnet or testnet: four possible combinations.

The values are specified in [BIP32], as hexadecimal integers, so we introduce them as such here. Even though [BIP32] does not explicitly say how these (32-bit) integers are converted to bytes, it seems reasonable that they are converted as big endian. This could be also confirmed by verifying that, after Base58 encoding, the serialized keys start with xprv, xpub, tprv, and tpub.

Subtopics

*bip32-version-pub-main*
*bip32-version-priv-main*
*bip32-version-pub-test*
*bip32-version-priv-test*