relab / hotstuff

MIT License
172 stars 53 forks source link

Fix eddsa private key parsing bug #123

Closed hanish520 closed 6 months ago

hanish520 commented 6 months ago

The eddsa private key is encoded as PEM(PKCS#8) format. While decoding the private key a bug was introduced to generate a new key from the encoded bytes. Fixed the issue by decoding the private key with same format.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 33.33333% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 62.53%. Comparing base (301532c) to head (18716fd).

Files Patch % Lines
crypto/keygen/keygen.go 33.33% 4 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #123 +/- ## ========================================== + Coverage 62.46% 62.53% +0.07% ========================================== Files 79 79 Lines 7576 7584 +8 ========================================== + Hits 4732 4743 +11 Misses 2541 2541 + Partials 303 300 -3 ``` | [Flag](https://app.codecov.io/gh/relab/hotstuff/pull/123/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=relab) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/relab/hotstuff/pull/123/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=relab) | `62.53% <33.33%> (+0.07%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=relab#carryforward-flags-in-the-pull-request-comment) to find out more.

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