Repository navigation
Conversation
- Keep existing clients, persistence, and clock APIs enabled by default. - Allow consumers to build the protocol without transport, runtime, or OS entropy.
- Share encoding and decoding with the convenience client. - Preserve raw device error codes and messages before client error mapping.
- Expose explicit entropy, timestamp, and timezone payloads without client I/O. - Reject malformed root fingerprints instead of returning arbitrary-length hex.
- Reuse shared xpub, address, and script-registration codecs in the client. - Preserve protobuf field presence for paths, names, and nested responses.
- Keep ephemeral generation and pairing state in the client. - Verify caller-supplied keys, pairing-code formatting, and encrypted exchanges with deterministic vectors.
- Port the final-sequence, payload-length, and error-propagation fixes from BitBoxSwiss#137. - Validate incoming continuation headers and preserve incremental whole-report decoding. - Read and write complete simulator reports over TCP.
- Share signing requests, reply parsers, and firmware gates without moving the client loop. - Expose borrowed paths and reusable PSBT payloads; return an error for unsupported unforced scripts.
- Retain the convenience client’s fingerprint lookup and use one lowering path. - Validate metadata cardinality and preserve firmware-aware output configuration.
- Reject mismatched input and signature counts before mutating the PSBT. - Apply ECDSA and Taproot signatures without dropping unrelated entries.
- Parse acknowledgements without copying their payloads. - Preserve client retry and reconnect behavior around the shared codecs.
- Apply rustfmt to the extracted client paths. - Compile the ETH utility only for the client and its tests.
- Document the feature boundary and the caller’s fresh-ephemeral-key requirement.
- Check individual feature builds and guard the normal dependency closure. - Keep the existing client, simulator, USB, and example matrix.
- Check the non-witness output index and preserve witness UTXO precedence.
- Zero U2F report padding and reject bad continuation headers as reports arrive. - Reject empty reads, short writes, and missing initialized flags in modern INFO replies.
- Reject invalid compact scalars and high-S signatures without parsing twice. - Document caller-owned signature verification and cover rejection before insertion.
- Reject nested replies to top-level requests and top-level replies to nested requests. - Keep both envelopes supported by the standalone parser.
- Report adapter encoding errors as Write and retain detailed codec errors.
- Specify per-signature entropy, commitment ordering, and the verification boundary.
Author
|
Probably should rebase after #137 is merged. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BHWI #81 tracks replacing copied vendor protocol code in BHWI. Today BHWI maintains its own BitBox02 wire and signing code because using the async client would also bring in its command sequencing and I/O model. Those copies can drift from upstream, including when signature validation is tightened.
This PR lets BHWI use the same protocol primitives as the BitBox client while keeping its own
start/exchange/endinterpreter, pairing state, and wallet ownership checks. Callers still provide transport and runtime, including for WASM and FFI. Once these APIs are released, BHWI can depend on the published crate instead of maintaining a fork.default-features = falseusable without device I/O, an async runtime, or OS randomness. The default build retains the existing client. Consumers that disable defaults but use the client can enableclient, pluspersistenceorclockfor those APIs.The U2F size and framing fixes overlap with #137. This PR does not include its host passphrase or typed device-state changes.
Verified with rustfmt, native no-default unit tests, a no-default WASM build check, Clippy with USB and simulator features, and the Bitcoin/PSBT tests against the pinned simulator matrix.