Malleable Proof Systems and Applications