pyca / pynacl

Python binding to the Networking and Cryptography (NaCl) library
https://pynacl.readthedocs.io/
Apache License 2.0
1.05k stars 228 forks source link

Expose crypto_core_ed25519_from_uniform #791

Closed AnonimaUzanto closed 1 year ago

AnonimaUzanto commented 1 year ago

Included in the libsodium low level functions is crypto_core_ed25519_from_uniform which provides the ability to apply Elligator 2 mapping to map arbitrary 32-byte data to a valid curve point. This functionality can be used to convert hashed data to a valid curve point. I have added and tested the applicable code in a fork and can provide a PR to add the functionality. Can this functionality be added to PyNaCl?

Prior issue: (https://github.com/pyca/pynacl/pull/528#issuecomment-498176836

Source documentation: https://doc.libsodium.org/advanced/point-arithmetic#elligator-2-map

reaperhulk commented 1 year ago

We'd be happy to review a PR exposing this.

AnonimaUzanto commented 1 year ago

Thank you! I have created a PR although there is a failure that I believe is related to Sphinx and not the exposed function. I have not used Sphinx so I am not sure how to resolve that error.

AnonimaUzanto commented 1 year ago

Closing issue, thank you for approving PR!