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

feat: Added ECDSA PKey validation and unit test #1192

Merged
merged 4 commits into from
Dec 18, 2024

Conversation

gsstoykov
Copy link
Contributor

Description:
This PR resolves issues for users who would potentially try to create an invalid PKey/PBKey over the Kublitz ECDSA curve.
Introducing PBKey validation as defined in issue #1166 could only potentially harm user input related to HIP-540 or introduce restrictions not adhering to crypto library specific generator functions.

Related issue(s):

Closes relevancy for: #1166

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: gsstoykov <georgi.stoykov@limechain.tech>
@gsstoykov gsstoykov added the enhancement New feature or request label Dec 18, 2024
@gsstoykov gsstoykov self-assigned this Dec 18, 2024
@gsstoykov gsstoykov requested review from a team as code owners December 18, 2024 09:23
@gsstoykov gsstoykov linked an issue Dec 18, 2024 that may be closed by this pull request
0xivanov and others added 3 commits December 18, 2024 11:30
Signed-off-by: Ivan Ivanov <ivanivanov.ii726@gmail.com>
Signed-off-by: gsstoykov <georgi.stoykov@limechain.tech>
Signed-off-by: gsstoykov <georgi.stoykov@limechain.tech>
Copy link
Contributor

@0xivanov 0xivanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gsstoykov gsstoykov merged commit 46bb7f2 into main Dec 18, 2024
5 checks passed
@gsstoykov gsstoykov deleted the 1166-add-validation-for-creating-publickey-from-bytes branch December 18, 2024 10:46
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ecdsa_private_key.go 81.25% 2 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
crypto.go 73.47% <ø> (-0.12%) ⬇️
ed25519_public_key.go 88.99% <ø> (ø)
ecdsa_private_key.go 72.48% <81.25%> (+0.65%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add validation for creating PublicKey from bytes
2 participants