crocs-muni / ECTester

Tests support and behavior of elliptic curve cryptography implementations on JavaCards (TYPE_EC_FP and TYPE_EC_F2M) and in selected software libraries.
https://crocs-muni.github.io/ECTester
MIT License
62 stars 13 forks source link

Support deterministic PRNG where possible. #34

Closed J08nY closed 2 months ago

J08nY commented 3 months ago

This adds support for initializing the libraries with a determinisitic PRNG as well as making the test suites more deterministic based on a seed given on the command-line. Similarly, it makes the card test suites deterministic, even though the card RNGs cannot be made so.

The following libraries do not currently behave deterministically:

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 51.21951% with 40 lines in your changes missing coverage. Please review.

Project coverage is 53.98%. Comparing base (88c9d01) to head (be605a2).

Files Patch % Lines
...va/cz/crcs/ectester/reader/test/CardTestSuite.java 10.00% 15 Missing and 3 partials :warning:
...c/main/java/cz/crcs/ectester/common/util/Util.java 20.00% 6 Missing and 2 partials :warning:
...n/java/cz/crcs/ectester/reader/ECTesterReader.java 68.00% 3 Missing and 5 partials :warning:
...z/crcs/ectester/reader/test/CardCofactorSuite.java 20.00% 4 Missing :warning:
.../crcs/ectester/reader/test/CardCompositeSuite.java 50.00% 1 Missing :warning:
...a/cz/crcs/ectester/reader/test/CardWrongSuite.java 50.00% 1 Missing :warning:

:exclamation: There is a different number of reports uploaded between BASE (88c9d01) and HEAD (be605a2). Click for more details.

HEAD has 2 uploads less than BASE | Flag | BASE (88c9d01) | HEAD (be605a2) | |------|------|------| ||4|2|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #34 +/- ## ============================================ - Coverage 61.28% 53.98% -7.31% + Complexity 1308 816 -492 ============================================ Files 133 77 -56 Lines 9212 6443 -2769 Branches 1261 924 -337 ============================================ - Hits 5646 3478 -2168 + Misses 2983 2567 -416 + Partials 583 398 -185 ``` | [Components](https://app.codecov.io/gh/crocs-muni/ECTester/pull/34/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=crocs-muni) | Coverage Δ | | |---|---|---| | [Applet](https://app.codecov.io/gh/crocs-muni/ECTester/pull/34/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=crocs-muni) | `70.27% <ø> (+0.43%)` | :arrow_up: | | [Common](https://app.codecov.io/gh/crocs-muni/ECTester/pull/34/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=crocs-muni) | `45.40% <20.00%> (-12.73%)` | :arrow_down: | | [Reader](https://app.codecov.io/gh/crocs-muni/ECTester/pull/34/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=crocs-muni) | `55.44% <55.55%> (+4.99%)` | :arrow_up: | | [Standalone](https://app.codecov.io/gh/crocs-muni/ECTester/pull/34/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=crocs-muni) | `∅ <ø> (∅)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.