zeromq / chumak

Pure Erlang implementation of ZeroMQ Message Transport Protocol.
Mozilla Public License 2.0
197 stars 47 forks source link

Allow custom curve implementation module #10

Closed pma closed 6 years ago

pma commented 7 years ago

Hi,

I was trying to use chumak and Kcl project (https://hex.pm/packages/kcl) from Elixir to have a completely NIF-free solution, but currently it's not easy to provide your own NaCl compatible module without changing the library.

What do you think of making the interface exposed by chumak_curve_if a behaviour and letting the application provide a custom implementation module at configuration time, or as an optional parameter when instantiating a socket?

drozzy commented 7 years ago

I'm currently seeking any and all suggestions, as I don't use the crypto myself in production. It would be best to have someone who uses it live to suggest for a way of going forward. The current implementation was merely a push to get people to contribute.

Feel free to submit your suggestion as a PR, it will be merged.

drozzy commented 6 years ago

Closing this until someone decides to work on it. Feel free to re-open or make a new PR directly.

Currently I don't have time to work on this myself (nor the knowledge).