Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encryption key related improvements (QOL) #16

Merged
merged 6 commits into from
Sep 2, 2021
Merged

Conversation

811Alex
Copy link
Contributor

@811Alex 811Alex commented Sep 2, 2021

Adds a table of known keys, associated with (partial) signatures.
When the signature of the current config.bin matches one in the table and the --key parameter is omitted, the associated key gets used automatically.
Also adds a new parameter, --try-all-known-keys, to decode.py, which tries all the keys in the table against the payload, until one decrypts it successfully (checks if the decrypted payload starts with the payload magic), or it runs out of keys.

Lastly, it adds a few messages to help the user.
If a key was automatically chosen, it gets printed, so the user knows how to re-encrypt the file.
If the decrypted payload doesn't start with the magic, the user gets an error suggesting that the key was wrong, instead of a stacktrace.
If encode.py gets used without a key or signature, the user gets some warnings.

@mkst mkst merged commit ec9b27d into mkst:master Sep 2, 2021
@mkst
Copy link
Owner

mkst commented Sep 2, 2021

Thanks for these improvements!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants