• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • 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-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
        • Riscv
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Bip32-key-serialization

    Bip32-key-fingerprint

    Fingerprint of an extended key.

    Signature
    (bip32-key-fingerprint key) → fp
    Arguments
    key — Guard (bip32-ext-key-p key).
    Returns
    fp — Type (byte-listp fp).

    The section `Key identifiers' of [BIP32] says that the first 32 bits (i.e. 4 bytes) of a key identifier are the key fingerprint.

    Definitions and Theorems

    Function: bip32-key-fingerprint

    (defun bip32-key-fingerprint (key)
      (declare (xargs :guard (bip32-ext-key-p key)))
      (take 4 (bip32-key-identifier key)))

    Theorem: byte-listp-of-bip32-key-fingerprint

    (defthm byte-listp-of-bip32-key-fingerprint
      (b* ((fp (bip32-key-fingerprint key)))
        (byte-listp fp))
      :rule-classes :rewrite)

    Theorem: len-of-bip32-key-fingerprint

    (defthm len-of-bip32-key-fingerprint
      (b* ((fp (bip32-key-fingerprint key)))
        (equal (len fp) 4))
      :rule-classes :rewrite)

    Theorem: bip32-key-fingerprint-of-bip32-ext-key-fix-key

    (defthm bip32-key-fingerprint-of-bip32-ext-key-fix-key
      (equal (bip32-key-fingerprint (bip32-ext-key-fix key))
             (bip32-key-fingerprint key)))

    Theorem: bip32-key-fingerprint-bip32-ext-key-equiv-congruence-on-key

    (defthm bip32-key-fingerprint-bip32-ext-key-equiv-congruence-on-key
      (implies (bip32-ext-key-equiv key key-equiv)
               (equal (bip32-key-fingerprint key)
                      (bip32-key-fingerprint key-equiv)))
      :rule-classes :congruence)