Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test coverage of RSA verification #221

Open
briansmith opened this issue Jun 20, 2016 · 1 comment
Open

Improve test coverage of RSA verification #221

briansmith opened this issue Jun 20, 2016 · 1 comment

Comments

@briansmith
Copy link
Owner

We should build the following test cases. Also, we may need to change the structure of check_modulus_and_exponent so that line-based coverage tools are useful in more precisely reporting what's tested.

# Test the range of accepted public key exponents: [3, 2^34), only odd values.

# e == 3, the minimum supported.
Digest = SHA256
Result = P

# e == 0
Digest = SHA256
Result = F

# e == 1
Digest = SHA256
Result = F

# e == 2
Digest = SHA256
Result = F

# e == 4

# e is the maximum 33-bit odd exponent.
Digest = SHA256
Result = P

# Smallest odd 34 bit value.
Digest = SHA256
Result = F

# e is 256 bits.
Digest = SHA256
Result = F

# e is 2048 bits.

# e is 8192 bits.

# Test the range of accepted public key moduli: 2048-8192 bits, only odd values.
[...]
@briansmith briansmith added this to the crates.io milestone Jul 3, 2016
@briansmith briansmith removed this from the crates.io milestone Aug 8, 2016
@briansmith
Copy link
Owner Author

Also, empty e (zero bytes long), empty n (zero bytes long), signature has leading zero byte(s), signature ends in a zero byte.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant