-
Notifications
You must be signed in to change notification settings - Fork 6
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
Secure hashing to curve per RFC9380 #169
Conversation
I hate to overcomplicate things, but I really think we need some additional interface on an elliptic curve class to denote which ones work for our current EC math and which ones don't. Currently, all curves work, but this will change in the future. If we add this now, its harder to shoot your future self in the foot |
yes, i've thought about this as well; would mean refactoring the |
i don't think this is relevant to this PR though; it would be a separate refactor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know the snake_case function names come from the rfc, but still. please use CamelCase (but feel free to add the snake_case names into the apidocs. (yes, even for private functions)
supreme/src/commonMain/kotlin/at/asitplus/signum/ecmath/RFC9380.kt
Outdated
Show resolved
Hide resolved
supreme/src/commonMain/kotlin/at/asitplus/signum/ecmath/RFC9380.kt
Outdated
Show resolved
Hide resolved
This comment was marked as outdated.
This comment was marked as outdated.
made the requested changes |
- RFC9380.expand_message_xmd - RFC9380.map_to_curve_simple_swu they are sometimes used as components in other constructions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙂
RFC. This is needed for lots of advanced cryptography, including OPRFs and OPAQUE. Probably a good thing to have in one place.
Note: side channel security relies on the underlying BigInteger implementation being constant time. I have my doubts whether our underlying BigInteger is constant time.