V1 soon#14
Open
pythcoiner wants to merge 6 commits into
Open
Conversation
dpk_to_pk now returns Result<_, Error::InvalidKeyExpression>: Single literal pubkeys and bare xpubs (no derivation, no wildcard) are rejected. descr_to_dpks and dpks_to_derivation_keys_paths silently filter rejected expressions, falling through to DescriptorHasNoKeys only when nothing valid remains. Test vectors gain expected: Option<String> so disallowed cases pin "must error".
Add Warning enum (DisallowedKeyExpression, NumsKey) and switch
encrypt() to return Encrypted { bytes, warnings }. Encrypted carries
a to_base64() helper (gated on the base64 feature) so callers can
get bitcoin-core-compatible base64 output without losing access to
the warnings. EncryptedBackup gains a warnings field populated
through ToPayload::warnings; the Descriptor impl forwards to a new
descriptor::descr_warnings that walks the descriptor and reports
each excluded key expression. NUMS detection wins over the disallow
rule so a NUMS literal in tr() is reported with the more specific
Warning::NumsKey.
The CLI bin is migrated to the new return type to keep the cli
feature build green; warning printing follows in the next commit.
Iterate Encrypted::warnings and write a one-line message to stderr per excluded key expression so users see when a cosigner's key was sorted out of the encryption-key set.
Add a sanity-harness assertion in individual_secret: distinct domain-separation tags for s and s_i make c_i = s ^ s_i = 0 statistically impossible, so seeing it means the secret derivation is misconfigured. Rewrite the two zero-secret fixtures (encode-decode and no-duplicates tests, plus individual_secrets.json) to use non-zero patterns that match the spec's expected shape; spell out the BTreeSet ordering in the encode-decode test.
e7860fc to
a1d9c42
Compare
Add a transparent v0 decrypt path so backups produced by the 0.0.2 release stay readable after upgrade. Magic-byte dispatch in set_encrypted_payload routes BIPXXX to the current parser and BEB to a new Payload::DecryptV0 variant; decrypt() detects the variant and delegates to the v0 crate via a private try_v0_decrypt helper that re-maps Decrypted/Error variants. Both crates pin the same miniscript version with identical features, so the Descriptor type crosses the boundary without re-parsing. The v0 dep is gated behind a `v0` cargo feature (on by default); miniscript_12_3_5 / miniscript_12_0 selections propagate to the v0 dep via `?/` so disabling `v0` keeps the dep tree minimal. This is a decrypt-only path - encrypt() never emits BEB, pinned by test_encrypt_never_emits_v0.
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.
No description provided.