libsodium-jni icon indicating copy to clipboard operation
libsodium-jni copied to clipboard

SealedBox support ?

Open om26er opened this issue 6 years ago • 2 comments

It seems libsodium-jni doesn't implement SealedBox, are there plans to implement that ?

We use libsodium-jni is autobahn and require SealedBox for a feature and are willing to help make that happen.

om26er avatar Mar 09 '19 13:03 om26er

@joshjdevl ping!

I found this implementation (https://github.com/abstractj/kalium/blob/master/src/main/java/org/abstractj/kalium/crypto/SealedBox.java) of SealedBox, probably something we can bring into this repository, what are your thoughts on that ?

om26er avatar Mar 13 '19 18:03 om26er

Hi @om26er

I initially had something similar in the repo early on. However, the issue is that only at encryption or decryption is an error thrown. In addition, it is a runtime error which, if left uncaught, will terminate the application.

I would suggest a better pattern to enforce when the container object is constructed that the public and private key is in the correct format and encoding.

joshjdevl avatar Mar 15 '19 23:03 joshjdevl