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 bignum operation functions #5960

Open
gilles-peskine-arm opened this issue Jun 19, 2022 · 0 comments
Open

Improve test coverage of bignum operation functions #5960

gilles-peskine-arm opened this issue Jun 19, 2022 · 0 comments
Labels
component-crypto Crypto primitives and low-level interfaces enhancement size-m Estimated task size: medium (~1w)

Comments

@gilles-peskine-arm
Copy link
Contributor

gilles-peskine-arm commented Jun 19, 2022

Follow-up of #5959. The goal here is to make the coverage of edge cases more systematic.

For each bignum input argument to a test function, make sure that:

  • There is at least one test case where the argument is positive with a single limb (<2^32), one where it's positive with multiple limbs (≥2^64), one where it's negative with a single limb, one where it's negative with multiple limbs, one where it's negative and one where it's zero.
  • Whenever testing a bignum input, also test that input with a leading zero limb.
  • When there are multiple inputs, test interesting cases, e.g. equal vs ≥ vs ≤ values for subtraction.

Remove manually written test data that's no longer relevant.

@gilles-peskine-arm gilles-peskine-arm added enhancement component-crypto Crypto primitives and low-level interfaces size-m Estimated task size: medium (~1w) labels Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-crypto Crypto primitives and low-level interfaces enhancement size-m Estimated task size: medium (~1w)
Projects
None yet
Development

No branches or pull requests

1 participant