I am currently trying to figure out if my following scheme is implementable in ECC or whether I can use existing implementation. At first I was going with libsodium but it seems that it really doesn't support my use case.

My scenario: There are basically two groups. Group A which has read access (only decryption) and Group B which has write/read access (both encryption/decryption).

libSodium has something which is very similar: crypto_box_seal/crypto_box_seal_open

The issue with libSodium's api is that crypto_box_seal_open requires both keypairs. I would need the reverse of this api.


  • private key => encryption/decryption
  • public key => decryption

Does a scheme like this exist?

  • 1
    $\begingroup$ If the public key allows decryption, then there is no point in encrypting at all, since the public key is (as the name suggests) public. So you can just store everything in plain for the same result. It sounds like you might be more interested in authentication? $\endgroup$
    – Maeher
    Feb 11, 2018 at 0:29

1 Answer 1


What you want is called a signature scheme. This will enforce the separation concerning the right to write. If you need confidentiality as well, you can combine this with traditional symmetric or public-key encryption.

So how does this work with signatures? Whenever somebody from Group B writes the data, they remove the old signature and apply a new one. Now anybody from Group A or B can verify that the file has not been modified since it was last edited (by a member of group B). Of course, members from group A won't be able to sign the file, because their public signature keys won't be added to the central list of trusted signature keys. Alternatively one could also use something called a ring signature which also guarantees anonymity of the original writer (or a group signature if attributation is wanted).

  • $\begingroup$ Sorry but I am not exactly sure how signatures would help here, I need to actually encrypt/decrypt data, how would a signature help here? $\endgroup$
    – MrBorrowck
    Feb 10, 2018 at 20:51
  • 1
    $\begingroup$ @MrBorrowck Signatures enforce the read / write requirement. You can't get that with encryption. But you can for example hand out a symmetric key to everyone with read access (or use some smart scheme involving public keys) and hand out a public / private signature key to everyone with write access. Now only people with read access can read and only those with write access can write. $\endgroup$
    – SEJPM
    Feb 10, 2018 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.