Skip to content

Conversation

@lukpueh
Copy link
Member

@lukpueh lukpueh commented Apr 10, 2024

  • addresses part of #731
  • blocks on #772 (commits are included in this PR)

In preparation for the removal of schema.py (#183), this patch removes schema checks of function arguments in hash.py and one entire function.

The removed checks are obfuscated "is string" checks, and without them invalid args in any of the relevant functions are still caught in the digest function, where they all end up and would raise a more meaningful UnsupportedLibraryError or UnsupportedAlgorithmError.

The removed function digest_from_rsa_scheme doesn't seem to be used anywhere (according to sourcegraph.com) not even in securesystemslib.signer, where the same functionality is replicated several times (see #594). Removing it here allows to ignore a slightly more complex schema check.

In prepartion for the removal of schema.py (secure-systems-lab#183), this patch removes
schema checks of function arguments in hash.py and one entire function.

The removed checks are obfuscated "is string" checks, and without them
invalid args are still caught in the `digest` function, where they all
end up and raise a more meaningful UnsupportedLibraryError or
UnsupportedAlgorithmError if invalid.

The removed function `digest_from_rsa_scheme` doesn't seem to be used
anywhere (according to sourcegraph.com) not even in
securesystemslib.signer, where the same functionality is replicated
several times (see secure-systems-lab#594). Removing it here allows to ignore a
slightly more complex schema check.

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
@lukpueh lukpueh force-pushed the rm-hash-schema-check branch from 3992344 to aef86c6 Compare April 15, 2024 13:45
@lukpueh lukpueh marked this pull request as ready for review April 15, 2024 13:45
@lukpueh lukpueh requested a review from jku April 15, 2024 15:41
@lukpueh lukpueh merged commit 7c547ac into secure-systems-lab:main Apr 16, 2024
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