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

Duplicate code in the curve25519_base function #47

Open
finfet opened this issue May 5, 2023 · 0 comments
Open

Duplicate code in the curve25519_base function #47

finfet opened this issue May 5, 2023 · 0 comments

Comments

@finfet
Copy link
Contributor

finfet commented May 5, 2023

The curve25519_base and curve25519 functions differ by only 2 lines of code. While the curve25519_base function does contain a small optimization, it is likely not worth the maintenance burden to have two different versions of this function, especially when considering that this function contains complicated, security sensitive multiplications.

I would suggest just calling curve25519 from within curve25519_base. This call will likely get optimized out by the compiler so that there is no additional performance penalty. I am happy to submit a pull request for this and discuss further.

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

No branches or pull requests

1 participant