crypto icon indicating copy to clipboard operation
crypto copied to clipboard

Exposing more of libsodium high-level APIs

Open soapdog opened this issue 3 years ago • 2 comments

Hi,

I'm working with the Secure Scuttlebutt protocol which makes heavy use of many high-level libsodium APIs. I noticed that this package is not exposing sealed and secret boxes and other features from that library.

I don't know if the maintainers of this package are interested in such features or if I should work on creating a separate sodium package. I decided to check here if a PR for such features is OK before I start coding anything.

soapdog avatar Sep 03 '20 18:09 soapdog

Thanks for the message. Yes, I would be happy with adding support for libsodium APIs.

I glanced over the page you linked to, and the missing features that I noticed were sealed boxes, secret boxes, and conversion from ed25519 (signing) keys to curve25519 (DH) keys. Are there any others needed?

Here are my thoughts on implementation:

  • The sealed box operations can be added as methods of sodium-x25519-key%.
  • Conversion of ed25519 keys to curve25519 keys can be done with a method on sodium-ed25519-key%.
  • The secretbox construction is like a cipher (but not a full AEAD cipher, sadly, since it doesn't allow additionally authenticated data).

I've created a branch b-sodium-api with a partial implementation.

rmculpepper avatar Sep 04 '20 11:09 rmculpepper

this is fantastic @rmculpepper. I will fetch that branch and start studying it so that I can help. Thanks a lot for helping me out.

soapdog avatar Sep 04 '20 17:09 soapdog