Is it possible to encrypt a secret with 2 public keys such that either of the 2 private keys can decrypt the secret? I've seen it said that this can be done with GPG but I need to find a library that can do it and so far find no leads.
I'm not set on a language or framework but considering (in order) Java, Go, Ruby, or Lua.