BIP 43 key export.
(bip43-export-key tree path public?) → exported
[BIP43] prescribes that BIP 32 key serialization be always done with the version numbers of the mainnet, i.e. *bip32-version-priv-main* and *bip32-version-pub-main*.
This function specializes bip32-export-key
by eliminating the boolean argument that selects mainnet or testnet,
and by passing
Function:
(defun bip43-export-key (tree path public?) (declare (xargs :guard (and (bip32-key-treep tree) (ubyte32-listp path) (booleanp public?)))) (declare (xargs :guard (and (bip32-path-in-tree-p path tree) (or public? (bip32-key-tree-priv-p tree))))) (bip32-export-key tree path t public?))
Theorem:
(defthm byte-listp-of-bip43-export-key (b* ((exported (bip43-export-key tree path public?))) (byte-listp exported)) :rule-classes :rewrite)
Theorem:
(defthm bip43-export-key-of-bip32-key-tree-fix-tree (equal (bip43-export-key (bip32-key-tree-fix tree) path public?) (bip43-export-key tree path public?)))
Theorem:
(defthm bip43-export-key-bip32-key-tree-equiv-congruence-on-tree (implies (bip32-key-tree-equiv tree tree-equiv) (equal (bip43-export-key tree path public?) (bip43-export-key tree-equiv path public?))) :rule-classes :congruence)
Theorem:
(defthm bip43-export-key-of-ubyte32-list-fix-path (equal (bip43-export-key tree (ubyte32-list-fix path) public?) (bip43-export-key tree path public?)))
Theorem:
(defthm bip43-export-key-ubyte32-list-equiv-congruence-on-path (implies (acl2::ubyte32-list-equiv path path-equiv) (equal (bip43-export-key tree path public?) (bip43-export-key tree path-equiv public?))) :rule-classes :congruence)
Theorem:
(defthm bip43-export-key-of-bool-fix-public? (equal (bip43-export-key tree path (acl2::bool-fix public?)) (bip43-export-key tree path public?)))
Theorem:
(defthm bip43-export-key-iff-congruence-on-public? (implies (iff public? public?-equiv) (equal (bip43-export-key tree path public?) (bip43-export-key tree path public?-equiv))) :rule-classes :congruence)