zk-snark explained: basic principles