-
Notifications
You must be signed in to change notification settings - Fork 12
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
Cryptography module, integrity checking commands and small fixes #108
Merged
Conversation
This file contains 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
Prints CMSIS_PACK_ROOT value in the index and update-index command descriptions, with a different output based on OS. Addresses Open-CMSIS-Pack#93.
This patch adds a new cryptography module, and two new commands to verify pack integrity. 'cpackget checksum-create' takes a local .pack and creates a .checksum file, similar to the typical digest files (like .sha256). It contains a list of all the pack files and their digest, whose cryptographic hash function is provided in the filename ('TheVendor.ThePack.1.2.3.sha256.checksum', for example). 'cpackget-verify' takes that .checksum file and verifies the integrity of a .pack, assuming it was generated with the other command.
chaws
reviewed
Jul 18, 2022
chaws
reviewed
Jul 18, 2022
chaws
reviewed
Jul 18, 2022
chaws
reviewed
Jul 18, 2022
chaws
reviewed
Jul 18, 2022
chaws
reviewed
Jul 18, 2022
chaws
reviewed
Jul 18, 2022
chaws
reviewed
Jul 18, 2022
chaws
reviewed
Jul 18, 2022
chaws
reviewed
Jul 18, 2022
It looks good! I left a few nit-pick comments and one major concern about speed (regarding decompressing etc). Tests are also missing, but I talked to Luis earlier today and he's working on that. Good work! |
Cleaned up function descriptions a bit, but should be good to go. |
chaws
reviewed
Jul 22, 2022
chaws
reviewed
Jul 22, 2022
chaws
reviewed
Jul 22, 2022
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.
This PR adds a "cryptography" module in order to support more advanced security features, such as integrity checking, and later on, digitally Signed Packs. The implementation is based on the ongoing discussion for a Signed Packs feature, started in #8. Checksum support has also been requested before (#91).
Currently only the "sha256" digest is supported, which is the industry standard for most cases. The new commands are:
cpackget checksum-create
takes a local .pack and creates a .checksum file, similar to the typical digest files (like .sha256). It contains a list of all the pack files and their digest, whose cryptographic hash function is provided in the filename (e.g:TheVendor.ThePack.1.2.3.sha256.checksum
).cpackget-verify
takes that .checksum file and verifies the integrity of a local .pack, assuming it was generated with the other command.It also includes small fixes regarding issues #85 and #93.