I'm finding that in a regular message exchange between Alice and Bob, the crypto_box_easy and crypto_box_open_easy methods allow Alice to send messages to Bob, and vice-versa.
I'm dealing with a server which stores the encrypted conversation contents between A and B, and upon retrieval of the raw messages, both parties can decrypt the messages that the other party sent, but not the messages that they themselves sent. In other words.
Alice can decrypt messages from Bob.
Bob can decrypt messages from Alice.
Alice cannot decrypt her own messages.
Bob cannot decrypt his own messages.
For this purpose, the libsodium documentation states that one should use the Pre-calculation Interface to compute a shared key to encrypt/decrypt messages between both parties on both ends.
Currently, this API only exposes the crypto_box_beforenm to compute said shared key, but not the wrapper calls to crypto_box_easy_afternm (to encrypt) and crypto_box_open_easy_afternm (to decrypt).
Would it be possible to add JNI/ObjectiveC wrappers for these?
Hi.
I'm finding that in a regular message exchange between Alice and Bob, the
crypto_box_easy
andcrypto_box_open_easy
methods allow Alice to send messages to Bob, and vice-versa.I'm dealing with a server which stores the encrypted conversation contents between A and B, and upon retrieval of the raw messages, both parties can decrypt the messages that the other party sent, but not the messages that they themselves sent. In other words.
For this purpose, the
libsodium
documentation states that one should use the Pre-calculation Interface to compute a shared key to encrypt/decrypt messages between both parties on both ends.Currently, this API only exposes the
crypto_box_beforenm
to compute said shared key, but not the wrapper calls tocrypto_box_easy_afternm
(to encrypt) andcrypto_box_open_easy_afternm
(to decrypt).Would it be possible to add JNI/ObjectiveC wrappers for these?
Thanks again for the awesome library!