added encoding proofs to appendix for long version