Open saxxi opened 6 years ago
Hi! At the moment no browser usage is planned, the scope of this project is indeed just to provide bindings to the C library for the usage in nodejs.
However, I could take a look at a vanilla JavaScript implementation of libhydrogen at the weekend. In which functions of libhydrogen are you interested in most? I can of course not promise anything.
All the best, Fabian
Hi Fabian, thanks for your interest and quick reply.
I'd just need to do a really basic encryption with symmetric key:
import { encryptFunction, decryptFunction } from 'libhydrogen'
const encryptedString = encryptFunction('my message here', 'password01')
const decryptedString = decryptFunction(encryptedString, 'password01')
Here is the equivalent code I made for AES:
Maybe you could help me out somehow forking that.
Kind regards, Adit
The library can be compiled using Emscripten, and the performance using WebAssembly is really good. The Gimli permutation is a perfect fit for WebAssembly.
But a pure Javascript version would be awesome, if only because it would be way smaller.
Hi! Just wanted to note that I did not find time on the weekend. I can not promise when and if I will take a look at a native JS implementation, but I certainly want to.
I began work on a JavaScript package to expose libhydrogen by way of emscripten/wasm: https://github.com/stevecrozz/libhydrogen-wasm https://www.npmjs.com/package/libhydrogen-wasm
It is pretty early at this point but it should be runnable in a browser.
Hi, I understand this library encapsulates the C API. As I'd like to have E2E encryption I was looking to encrypt directly in the browser. Is this possible or in a project roadmap?
Thank you.