tweetnacl-js icon indicating copy to clipboard operation
tweetnacl-js copied to clipboard

ed25519 decode / decompress

Open 1000i100 opened this issue 3 years ago • 3 comments

I have ed25519 pubkeys. I would like to check there validity. The RFC say how to do that by decoding/decompressing to an x,y point : https://tools.ietf.org/html/rfc8032#page-11

Do y plan to add this to this lib ?

1000i100 avatar Apr 02 '21 15:04 1000i100

The primary goal of this project is to produce a translation of TweetNaCl to JavaScript which is as close as possible to the original C implementation, plus a thin layer of idiomatic high-level API on top of it.

This feature could perhaps be added under nacl.lowlevel, @dchest what is your opinion on adding this feature as a deviation from TweetNaCl? Should it be hidden away in nacl.lowlevel or would it be better to have this added to a separate helper library?

CMEONE avatar Jun 16 '21 16:06 CMEONE

Alternatively, if we wanted to separate some features not in TweetNaCl but keep them in the same library, we could create something like nacl.other, where we might want to add some other useful features (such as ephemeral encryption/decryption) that use the functions provided in nacl. It depends whether it is better to keep this library as close as possible to TweetNaCl or allow for some additional high-level functions bundled with the library but not in the top-level nacl.

CMEONE avatar Jun 16 '21 16:06 CMEONE

To be fair, I would like to avoid exposing internals at all — they are mostly translated from the C code without proper JS conventions, and require a lot of care to use correctly; they should have a properly designed API. I wanted to eventually remove all .lowlevel stuff, but since people already started building on top of it, it will break third-party packages. This is why I'd prefer if forked this code to add features they desire, it's small enough and not changing frequently.

dchest avatar Jun 18 '21 06:06 dchest