Efficient Cryptographic Primitives For Non-Interactive Zero-Knowledge Proofs And Applications