Repository navigation
Add SSlibKey Implementation - #4
Conversation
A container class of public key required for verification of signature by DSSE. `SSlibKey` is a replication of the `Key` class of the python-tuf metadata API, providing more flexibility to it and intended to work with DSSE. Signed-off-by: Pradyumna Krishna <git@onpy.in>
Tests to check equalities, serialization and verify method of SSlibKey are added to ensure integritry of Key interfaces. Signed-off-by: Pradyumna Krishna <git@onpy.in>
db8106a to
c74631a
Compare
lukpueh
left a comment
There was a problem hiding this comment.
This is great! And we can pretty much merge as is, maybe after addressing my comments in the test module.
I am a bit worried about the looks of the {to, from}_securesystemslib_key methods, which were crutches in python-tuf to deal with some securesystemslib key dict requirements in a black box manner, but should be handled now that we implement this in securesystemslib. We can ticketize it.
| sslib_key = SSlibKey.from_securesystemslib_key(scheme_dict) | ||
|
|
||
| with self.assertRaises( | ||
| (CryptoError, UnsupportedAlgorithmError, FormatError) |
There was a problem hiding this comment.
Do we not know what Error is raised here? Or does it differ, depending on the key type?
|
|
||
| @classmethod | ||
| def setUpClass(cls): | ||
| cls.dicts = [ |
There was a problem hiding this comment.
Minor nit: dicts is not ver mnemonic, maybe call it key_pairs?
| def test_sslib_verify(self): | ||
| """Test to check verify method of key.""" | ||
|
|
||
| for scheme_dict in self.dicts: |
There was a problem hiding this comment.
Minor nit: scheme_dict does not seem accurate. What about key_dict, or key_pair, or just key?
c74631a to
22ef0c4
Compare
|
Thanks for addressing my changes! Let's merge and I'll write an issue about |
Part of secure-systems-lab#370
Description of the changes being introduced by the pull request:
This pull request is related to DSSE implementation and adds a
KeyandSSlibKeyinterface to providepublicKeyclass containers. These function will be used to addSignandVerifymethods of DSSEEnvelope.Tests are added to ensure the working of
SSlibKey.Please verify and check that the pull request fulfils the following requirements: