Golang implementation of "Proofs of Replicated Storage Without Timing Assumptions" .
Here we check out some important implementation details.
The notation of Invertible Random Oracles is used in the paper, in which we implement it with Encrypt-Mix-Encrypt encryption mode developed by Halevi and Rogaway in 2003 ("A Parallelizable Enciphering Mode"). We use the implementation of the following link. An alternative way is using Cipher Block Chaining (CBC) Mode, performance-wise they are similar and EME is highly parallelizable.
The best candid is RSA but we need them to have an equal domain, there's a trick which we can use from the original ring signature paper ("How to Leak a Secret
"). We need to extend trapdoor permutations to the same domain. We extend all permutations to have a common domain of
- For any
$b$ -bit input$m$ define nonnegative integers$q_i$ and$r_i$ that$m=q_in_i+r_i$ where$0\le r_i\lt n_i$ .
Intuitively,
- Number of rounds:
$r>(cn+1) k / B$ -
$k=\log |\mathcal{D}|$ where$\mathcal{D}$ is the domain of$f$ $\implies k=\log 2048=11$ -
$c$ , the percentage of data compression that we are okay with$\implies c=0.95$ -
$n$ , number of replications$\implies n=5$ -
$B$ , the function is$B$ -leakage inversion of the permutation$f\implies B=\log k =\log\log|\mathcal{D}|=\log11\approx 3$
-
We can conclude number of rounds we need for
- CPU
- Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz 2.71 GHz
- Encoding a single block (20 rounds of RSA)
- 162.4184 (ms)
- Decoding a single block (20 rounds of RSA)
- 1.637543 (ms)