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

Fix broken zero pad implementation causing corrupted ciphertext #87

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

gmaiainc
Copy link
Contributor

This is a fix for #86, which was mainly caused by a broken zeroPad function as well as equally buggy equivalent code present in publickey.go. An additional on-curve check was also added, as well as a benchmark test that would have made the bug easier to identify.

@savely-krasovsky
Copy link
Member

Do you think we need additional IsOnCurve check after ScalarMult?

@gmaiainc
Copy link
Contributor Author

On further analysis I don't think it is necessary, it must have been a leftover from the investigation into the root cause. I've dropped that commit.

@savely-krasovsky savely-krasovsky merged commit 0169652 into ecies:master Dec 14, 2023
1 check passed
@savely-krasovsky
Copy link
Member

@gmaiainc very nice catch! Thank you for the contribution! I will prepare a release.

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

Successfully merging this pull request may close these issues.

2 participants