Witness Encryption for Succinct Functional Commitments and Applications