-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Golang-style salt lengths to verify RSA PSS sigs
Previously, the securesystemslib RSA-PSS signature creation and verification code was fixed at using a salt length equal to the hash output length. This commit changes that to allow end-users to use a salt length that is the maximum available. The original motivation for this commit was to be able to verify RSA-PSS signatures generated by the Golang crypto RSA package, which defaults to the maximum salt length. For more information on how Golang crypto and Python cryptography handle salt lengths, please see: https://github.com/golang/go/blob/11f92e9dae96939c2d784ae963fa7763c300660b/src/crypto/rsa/pss.go#L225-L232 https://cryptography.io/en/3.1/hazmat/primitives/asymmetric/rsa/#cryptography.hazmat.primitives.asymmetric.padding.PSS.MAX_LENGTH For more information on salt lengths and how they relate to the proof of the security of the RSA-PSS scheme, please see: https://crypto.stackexchange.com/a/1222 This commit also includes test for the above changes, and some minor, unrelated formatting changes for pylint so that tests pass. Signed-off-by: Trishank Karthik Kuppusamy <[email protected]>
- Loading branch information
1 parent
bbf1505
commit 7edc11f
Showing
2 changed files
with
214 additions
and
130 deletions.
There are no files selected for viewing
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
Oops, something went wrong.