dchest / tweetnacl-js

Port of TweetNaCl cryptographic library to JavaScript
https://tweetnacl.js.org
The Unlicense
1.78k stars 294 forks source link

2.0 or something revamped? #263

Closed jamilservicos closed 8 months ago

jamilservicos commented 8 months ago

@dchest We are in a different time, computers are not what they used to be... I suggest creating something in a language that supports wasm and napi, and porting it to the browser and nodejs via wasm and napi. you will have less worry than something directly in javascript, since there are many "news" in javascript, constantly. I don't know if it helps give you any ideas... but look at this suite I'm making in rust: https://github.com/SimplyBuilder/sb-module-crypto/

Maybe it will turn on some light for your "2.0".

you no longer need to struggle to write compact code, because in the end everyone is using heavy frameworks without caring about it.

dchest commented 8 months ago

There's no need for WASM/etc tweetnacl-js in the future: everything is moving towards supporting X25519 and Ed25519 natively via Web Cryptography API, which is great. There is a place for a tweetnacl-js-style wrapper (but async) for ease of use, but the cryptography code will be up to the browser/Node/Bun/etc runtime. Hashing hash been there already for a long time. Base64 encoding is coming to ArrayBuffer. UUID, if you need it, is crypto.randomUUID. Node implemented crypto.getRandomValues. Lovely progress!