Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #702 +/- ##
========================================
Coverage 96.64% 96.64%
========================================
Files 79 79
Lines 10150 10176 +26
========================================
+ Hits 9809 9835 +26
Misses 341 341 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
moved from original prototype in kef.unwrap(), so that callers that know context can quickly rule-out very unlikely strings that would otherwise result in prompting for "Decrypt?"... based on non-uniform distribution of bytes in the payload. example) An ascii string -- or even UTF-8 string, is "almost" never a KEF.
bbcaa2b to
0bdf481
Compare
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.
DRAFT: For a future release AFTER v25.09.0
What is this PR for?
Focus of this PR is to re-prioritize loading of data (scanned or from sd) to be treated as plaintext, within context, instead of first attempting to parse and decrypt a KEF envelope. PSBTs in particular, which are often loaded in binary, form can appear to be KEF, but if they can be parsed as PSBTs first, then user will not have to answer "No". If parsing fails, in this case -- as a PSBT, we could then fall-back to see if it was KEF, and try again after decryption.
Loading of datum-types TO DO:
In some cases, this is not possible, a KEF must be checked first, in cases where data is treated as random bytes
and no other obvious parsing could be done... ie) for mnemonic entropy, passphrases, and for decryption keys we
should check if it's a KEF first (rather than treating 32 bytes as a mnemonic, or base43 text as a passphrase, or a string of bytes as the decryption key when in fact these would normally parse as kef envelopes to prompt decryption... and in the case of a false-KEF the user will know NOT to decrypt.
In most other cases, we could try to parse in plaintext form first, and then fall back to trying KEF if it fails.
Changes made to:
Did you build the code and tested on device?
What is the purpose of this pull request?