jedisct1 / libhydrogen

A lightweight, secure, easy-to-use crypto library suitable for constrained environments.
https://libhydrogen.org
Other
594 stars 88 forks source link

Sealed boxes support! #113

Closed calvin2021y closed 2 years ago

calvin2021y commented 2 years ago

Is hydrogen able to provide Sealed boxes like libsodium ?

jedisct1 commented 2 years ago

It certainly does.

Use the N variant of the key exchange system to get an ephemeral key to encrypt your data with.

Then, send the resulting packet and the encrypted data to the server, which will be able to decrypt it using its secret key.

jedisct1 commented 2 years ago

This is even better than libsodium's sealed boxes since it supports an optional pre-shared key.