-
Notifications
You must be signed in to change notification settings - Fork 49
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
Expect bytes in create_ and verify_signature; do not serialize #162
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
The caller knows what their data is and how to serialize it (including whether or not to canonicalize it in some fashion); ssl.keys is too low level to be doing this. (I talked this over with Lukas and it serves his interests for in-toto as well.) Updated testing. Did not touch code style, even though I'd love to.... Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
lukpueh
approved these changes
Jan 11, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving this PR and confirming that I also welcome this change (in-toto/in-toto@e5ca543 shows why).
awwad
added a commit
that referenced
this pull request
Apr 3, 2019
lukpueh
added a commit
to lukpueh/securesystemslib
that referenced
this pull request
Aug 13, 2019
Adopt create and verify signature snippets in documentation to accept data to be signed as bytes instead of strings, as changed in secure-systems-lab#162.
3 tasks
lukpueh
added a commit
to lukpueh/securesystemslib
that referenced
this pull request
Aug 14, 2019
Adopt create and verify signature snippets in documentation to accept data to be signed as bytes instead of strings, as changed in secure-systems-lab#162.
lukpueh
added a commit
to lukpueh/in-toto
that referenced
this pull request
Sep 3, 2019
secure-systems-lab/securesystemslib#162 removes data canonicalization and encoding from signature creation/verification functions and leaves it to the caller. This commit changes invocation of sslib signature creation/verification functions to pass the pre-canonicalized and -encoded bytes representation of a signable instead of its dictionary representation, which aligns with the way it calls gpg signature creation/verification functions.
3 tasks
lukpueh
added a commit
to lukpueh/in-toto
that referenced
this pull request
Sep 3, 2019
secure-systems-lab/securesystemslib#162 removes data canonicalization and encoding from signature creation/verification functions and leaves it to the caller. This commit changes invocation of sslib signature creation/verification functions to pass the pre-canonicalized and -encoded bytes representation of a signable instead of its dictionary representation, which aligns with the way it calls gpg signature creation/verification functions. Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
lukpueh
added a commit
to lukpueh/securesystemslib
that referenced
this pull request
Sep 4, 2019
Adopt create and verify signature snippets in documentation to accept data to be signed as bytes instead of strings, as changed in secure-systems-lab#162.
lukpueh
added a commit
to lukpueh/securesystemslib
that referenced
this pull request
Sep 4, 2019
Adopt create and verify signature snippets in documentation to accept data to be signed as bytes instead of strings, as changed in secure-systems-lab#162.
lukpueh
pushed a commit
that referenced
this pull request
Sep 4, 2019
3 tasks
tanishqjasoria
pushed a commit
to tanishqjasoria/securesystemslib
that referenced
this pull request
Jan 30, 2020
Largely resolves Issue secure-systems-lab#161, especially given the merge of PR secure-systems-lab#162. See GitHub: secure-systems-lab#161 secure-systems-lab#162 Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
tanishqjasoria
pushed a commit
to tanishqjasoria/securesystemslib
that referenced
this pull request
Jan 30, 2020
Adopt create and verify signature snippets in documentation to accept data to be signed as bytes instead of strings, as changed in secure-systems-lab#162.
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 is related to #161.
Currently, ssl's
create_signature()
andverify_signature()
assume they know too much about the data. Rather than just taking bytes, these functions assume the data is compatible withsecuresystemslib.formats.encode_canonical()
, which I don't think is appropriate (and is problematic for using other formats, like ASN.1/DER, which are not).The caller knows what their data is and how to serialize it (including whether or not to canonicalize it in some fashion); ssl.keys is too low level to be doing this. I talked this over with @lukpueh of in-toto, as the other major client of securesystemslib, and it serves in-toto's interests as well.
Updated testing. Did not touch code style, even though I'd love to....
Please verify and check that the pull request fulfills the following
requirements: