Published on: 2020-10-26T13:04:56+00:00
The author of a Bitcoin Improvement Proposal (BIP) has introduced a Python reference implementation of BIP32 path templates compatible with micropython. The FSM formal spec has been corrected and thoroughly tested in both C and Python implementations. The author has submitted a PR to the bips repo and is open to feedback. However, no information is provided about a non-text attachment included.In July 2020, Dmitry Petukhov suggested that having clear specifications and licensed quality implementations would facilitate the adoption of a specific format. He shared a C implementation on GitHub with an MIT license, but no further details are given.The BIP draft aims to establish a format for path templates that enables interoperability among software and hardware vendors by specifying derivation path restrictions. This allows software vendors to create profiles containing constraints on the paths used in their custom derivation schemes. Users can then install these profiles into hardware wallets that support path templates. By enforcing the specified constraints, the device ensures that the software solution functions as intended.Path templates provide a standardized way to describe constraints for BIP32 paths. They allow for application-specific restrictions and identification of multiple chains of addresses. For example, a signing scheme may require only certain whitelisted derivation paths to be used during HD derivation when signing inputs or checking if an output is the change output. By placing the constraints in the signer's configuration, this approach accommodates different vendor-developed schemes and prevents conflicts with custom software solutions.The proposed format for path templates serves as a building block for interoperability between hardware and software vendors. It offers a flexible alternative to rigid sets of "well-known" paths by adopting a common format for specifying restrictions. The hope is that vendors will find it easier to adopt this format with the availability of clear specifications and permissibly licensed quality implementations.In a Bitcoin development mailing list, Dmitry Petukhov suggested creating a BIP draft for path templates. Dave Harding requested clarification on how these templates compare to key origin identification and examples of their usage. He also questioned whether they are intended for backups, multisig wallet coordination, or managing data between software transaction construction and hardware device signing.The author's proposal for a standard format aims to describe constraints on BIP32 paths. The BIP draft specifies "path templates" that facilitate the distinction between valid and invalid paths based on defined constraints. It includes examples of templates and a formal specification of a finite state machine for parsing. A Python implementation for template parsing and matching already exists.While the BIP32 derivation path format allows for custom schemes, unrestricted usage can be unsafe in certain contexts. Hard-coding checks for well-known paths into software and firmware reduces interoperability. To address this, the author proposes a flexible approach that defines a standard notation for "BIP32 path templates" to succinctly describe constraints on the derivation path.Support for these path templates will enhance interoperability and flexibility, enabling vendors and developers to easily define their own custom restrictions. Having standardized formats for custom path templates encourages the development of a common approach to enforce application-specific path restrictions in devices and applications. For example, devices could allow the installation of application-specific profiles with path templates and custom parameters. However, precautions must be taken to prevent the accidental installation of malicious or incorrect profiles.
Updated on: 2023-08-02T02:27:58.765588+00:00