The time on the parsing doesn't improve, as the data from the binary
file needs to be converted to `affine` representation, and then parsed
into the `bn256.G1` & `bn256.G2` formats (Montgomery). But the size of
the ProvingKey files in binary is much smaller, so will be better
handled by the smarthpones.
- Parse time benchmarks:
```
BenchmarkParsePk/Parse_Pk_bin_circuit1k-4 2 563729994 ns/op
BenchmarkParsePk/Parse_Pk_json_circuit1k-4 635641 1941 ns/op
BenchmarkParsePk/Parse_Pk_bin_circuit5k-4 1 2637941658 ns/op
BenchmarkParsePk/Parse_Pk_json_circuit5k-4 1 2986560185 ns/op
BenchmarkParsePk/Parse_Pk_bin_circuit10k-4 1 5337639150 ns/op
BenchmarkParsePk/Parse_Pk_json_circuit10k-4 1 6149568824 ns/op
BenchmarkParsePk/Parse_Pk_bin_circuit20k-4 1 10533654623 ns/op
BenchmarkParsePk/Parse_Pk_json_circuit20k-4 1 11657326851 ns/op
```
- Size of ProvingKey file for a circuit of 50k constraints:
```
circuit 20k constraints:
10097812 bytes of proving_key.bin
29760049 bytes of proving_key.json
circuit 50k constraints:
24194964 bytes of proving_key.bin
71484081 bytes of proving_key.json
```
Also adds ProofToSmartContractFormat, which returns a ProofString as the
proof.B elements swap is not a valid point for the bn256.G2 format.
Also unexports internal structs and methods of the prover package.
Also apply golint.
- before:
BenchmarkGenerateProof-4 1 1553842743 ns/op
For a circuit of 9094 constraints takes 7.761949512s seconds to generate the proof.
- now:
BenchmarkGenerateProof-4 1 1331576862 ns/op
For a circuit of 9094 constraints takes 5.745279126s to generate the proof.
For bigger circuits (more constraints) the difference will be bigger.
Executed on a Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, with 16GB of RAM