stef / libopaque

c implementation of the OPAQUE protocol with bindings for python, php, ruby, lua, zig, java, erlang, golang, js and SASL.
GNU Lesser General Public License v3.0
69 stars 10 forks source link

Add JavaScript bindings for libopaque #10

Closed creemama closed 3 years ago

creemama commented 3 years ago

This repo has Python and PHP bindings. I am working on JavaScript bindings: https://github.com/creemama/libopaque/tree/javascript-bindings .

@stef, what are you thoughts on including the JavaScript bindings in this repository? Should I create a separate libopaque.js repository? As an example, https://github.com/jedisct1/libsodium.js/ is a separate repository for the JavaScript bindings of https://github.com/jedisct1/libsodium . See also https://libsodium.gitbook.io/doc/bindings_for_other_languages .

Just like you created libopaque from libsphinx, are you planning on creating separate repositories for the Python bindings like you did for pwdsphinx? (Someone already has https://pypi.org/project/PyOpaque/ .pwdopaque is still available.)

If you plan on creating separate repositories for the PHP and Python libopaque bindings in the future, then I should create a separate repository for the JavaScript bindings. If not, then having JavaScript bindings here might be useful. On the other hand, having a separate repository for libopaque.js would make it easier for me to maintain.

stef commented 3 years ago

This repo has Python and PHP bindings. I am working on JavaScript bindings: https://github.com/creemama/libopaque/tree/javascript-bindings .

super happy about that, js bindings were on my todo list (which is quite long still)

@stef, what are you thoughts on including the JavaScript bindings in this repository? Should I create a separate libopaque.js repository? As an example, https://github.com/jedisct1/libsodium.js/ is a separate repository for the JavaScript bindings of https://github.com/jedisct1/libsodium . See also https://libsodium.gitbook.io/doc/bindings_for_other_languages .

good question, if i'd do it i'd put it into this repo first, then maybe later i'd make a seperate repo if that makes sense. but since it's your work, this is a different thing i guess.

Just like you created libopaque from libsphinx, are you planning on creating separate repositories for the Python bindings like you did for pwdsphinx? (Someone already has https://pypi.org/project/PyOpaque/ .pwdopaque is still available.)

i approach this from an OS distro packager PoV (as i do package samizdat for alpine linux) and in that role i like one source repo, which then can shed multiple packages.

If you plan on creating separate repositories for the PHP and Python libopaque bindings in the future, then I should create a separate repository for the JavaScript bindings. If not, then having JavaScript bindings here might be useful.

i have no such plans currently. for the sphinx python bindings really i did it because it also contains a server and a client for sphinx in python. which i guess also makes sense to implement for opaque, but maybe it's better to do the pyopaque-server and pyopaque-client in seperate repos. really, there's arguments for both approaches.

On the other hand, having a separate repository for libopaque.js would make it easier for me to maintain.

that is a super good reason for doing your own repo.

sorry for not being more helpful in answering this very nice problem to have question :)

creemama commented 3 years ago

Thank you for the feedback. If you don't mind, let's go with putting the JavaScript bindings in this repo. As you wrote, if it makes sense, we can create another repo later.

It won't be any time soon, but once I'm ready, I'll make a pull request with the JavaScript bindings and close this issue.

I've never done this before, but I wonder. After the JavaScript bindings get in, if you made me a collaborator or a code owner perhaps I could merge pull requests having to do with the JavaScript bindings.

stef commented 3 years ago

i asked some comrades that are very much into packaging for distros, and their response was, that having everything in one repo signals very strong coupling, and always aligned APIs - whereas external bindings they expect to get out of sync more often. yeah, i guess i have to elevate your privileges if you start committing in this repo.

stef commented 3 years ago

hey, we should pair up your js on the client with my php on the server and make a demo showing both techs. and maybe even do a drupal or wordpress plugin maybe?