Skip to content

Conversation

@awwad
Copy link
Contributor

@awwad awwad commented Jan 10, 2019

This is related to #161.

Currently, ssl's create_signature() and verify_signature() assume they know too much about the data. Rather than just taking bytes, these functions assume the data is compatible with securesystemslib.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
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

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 <[email protected]>
@awwad awwad requested a review from lukpueh January 10, 2019 20:56
Copy link
Member

@lukpueh lukpueh left a 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 awwad merged commit beb3109 into master Feb 19, 2019
awwad added a commit that referenced this pull request Apr 3, 2019
Largely resolves Issue #161, especially given the merge of
PR #162.

See GitHub:
#161
#162

Signed-off-by: Sebastien Awwad <[email protected]>
lukpueh pushed 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.
lukpueh pushed 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 pushed 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.
lukpueh pushed 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 <[email protected]>
lukpueh pushed 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 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
Largely resolves Issue #161, especially given the merge of
PR #162.

See GitHub:
#161
#162

Signed-off-by: Sebastien Awwad <[email protected]>
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 <[email protected]>
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants