I need to encrypt some string, let's say "Hello world" with several Public Keys and be able to decrypt this hash with any of Private Keys. Could you please tell if it possible and if so, the way to do it.

Thank you.

2 Answers 2


Try to look at Smair's Secret Sharing scheme with k=1. Though I'm not sure if it's possible to derive a secret from predefined Stellar secret keys.

  • It does not work with k=1. I've already checked this option.. Commented Nov 8, 2018 at 14:12

It's possible quiet in a different way, I have been working on a similar implementation. I'm not sure if this may be useful to you but the way I have implemented is like this,

  1. Create a data key pair private(data) pub(data)
  2. Encrypt the data with data private key private(data)
  3. create multiple key pairs, private(Alice) pub(Alice), private(Bob) pub(Bob)
  4. Encrypt the private(data) with Alice's and Bob's public key
  5. You can share encrypted data and encrypted private(data) with Alice and Bob
  6. Alice can decrypt the private(data) with private(Alice) and than decrypt Data with decrypted private(data)
  7. Bob can decrypt the private(data) with private(Bob) and than decrypt Data with decrypted private(data)
  • Thank you, this can be an option, but here is much better implementation. I didn't check it yet, but it looks good - you don't need to store encrypted parts several times, but instead, you can store encrypted content keys. security.stackexchange.com/a/4577/190816 Commented Nov 9, 2018 at 9:46
  • Hmm I believe my answer is same as that question you linked, just answered in a different way. Commented Nov 9, 2018 at 17:02

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