RSA PKCS#1 v1.5 signature scheme verification incompatibility issue#10
Open
yahyazadeh wants to merge 1 commit intobdauvergne:masterfrom
Open
RSA PKCS#1 v1.5 signature scheme verification incompatibility issue#10yahyazadeh wants to merge 1 commit intobdauvergne:masterfrom
yahyazadeh wants to merge 1 commit intobdauvergne:masterfrom
Conversation
Owner
|
Seems great, could you add a test vector for this use case ? Do not try to add to the existing one extracted from PKCS#1 specification, just add it directly in the test files. |
Author
|
I might not be able to do this at the moment but may try this later. |
Closed
bmurray7
reviewed
Jan 22, 2022
| except ValueError: | ||
| raise exceptions.RSAModulusTooShort | ||
| return primitives.constant_time_cmp(em, em_prime) | ||
| return primitives.constant_time_cmp(em, em_prime) or primitives.constant_time_cmp(em, em_prime_imp) |
There was a problem hiding this comment.
Is this still constant time?
In an or statement, Python only evaluates the second condition if the first condition evaluates to True. See the Python specification for Boolean operations..
Owner
There was a problem hiding this comment.
You are right. But don't expect this lib to give you real constant time even with this change. It's a toy implementation, if you need a really hardened implementation of RSA, there are a lot around written in C or ASM.
This file contains hidden or 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
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.
Added support for implicit NULL parameter case in pkcs1 signature verification