The BGN paper (Evaluating 2-DNF Formulas on Ciphertexts) used a threshold variant of BGN. I also want to use this cryptosystem, however, I cannot find any open-source implementation. Is there any such an implementation? If not, how could I implement it (the secret key can be easily shared, but I do not know how to decrypt a ciphertext by each share and then combine these shares to get the final plaintext)? Thank you.