1 Introduction
In a proof of replication system [5, 6], a user wants to distribute a file m and ensure that a server or group of servers will dedicate the resources to storing multiple copies or replicas of it. That is, the server should either receive or generate n replicas where the file m can be efficiently decoded from any single replica. In the original notion of proofs of replication, a server could take a file m as input and independently generate all the replicas
. Later it could prove possession if challenged. Since the introduction of this concept, several such solutions [7, 9, 16, 17, 25] have emerged.
However, in these solutions, there exist a tension that stems from the following attack. Consider a non-compliant server that stores just a single copy of m. When challenged to prove possession of replicas, it on the fly, generates using the legitimate generation algorithm and proceeds to prove replication using the ephemeral values as though it were storing these replicas all along.
It is easy to see that achieving meaningful security against such an attack is impossible without imposing a concrete time-bound between when a server is challenged and when it must answer. The setting of this time-bound must be coupled with an understanding of how long it takes an honest system to retrieve the replicas and produce a proof and balanced against how fast a highly provisioned server might take to produce the replicas from scratch. This balancing act creates a certain tension in that more costly replica generation will help security, but also imposes a higher burden on initiation. Moreover, other issues can arise in the context of a more extensive system. For example, if audit challenges come out at a predictable time (e.g., daily), then a cheating server could start generating the response ahead of time.
To address these issues, Damgård, Ganesh, and Orlandi [11] proposed a novel notion that we will call proof of replication with client setup. In this notion, a client that wishes to store a file m will generate replicas , along with a (short) public verification key
. The system will have the properties that (1) one can reconstruct the file from any replica along with the verification key, and (2) a server can prove possession of the replicas to any client that holds the verification key. Unlike the previous systems, proof of replication with client setup need not require fine-grained timing assumptions as a server will not be able to regenerate the replicas from only the message m and
. Indeed the security definition says (informally) that any poly-time server that devotes significantly fewer resources than n times message length will not be able to pass the possession test.
The solution proposed in [11] combines two high-level ingredients. The first is a proof of retrievability system as proposed in prior work [8, 12, 29]. Roughly, if a server executes a proof of retrievability for data d with a client, this means that now, the server was capable of reconstructing d. However, a proof of retrievability in and of itself gives no guarantee about the amount of resources required to store d.
Second, the authors introduce a notion of a replica encoding. A replica encoding system consists of three algorithms: . The setup algorithm on input, a security parameter
and the maximum number of replicas
of a scheme, outputs a public and secret key pair as
. The encoding algorithm takes as input the secret key and a message m to produce an encoding as
. Finally, the decoding algorithm takes as input an encoding y and the public key to retrieve the message as
or outputs
to indicate failure. The algorithms are randomized, and the encoding procedure can be run multiple times to produce multiple encodings. The correctness of the scheme dictates that if one encodes any message m under a secret key and then decodes it under the corresponding public key, m will be decoded.
To capture security, we will consider a soundness game which uses a two-stage attacker . In the first stage,
will be given a challenger-generated public key
and reply with a message m. It is then given
encodings generated by the challenger as
. The attacker outputs a state variable
, which we will generally think of as being smaller than
. At the second phase, the algorithm
is given the input
and is tasked with outputting guesses
. The security property intuitively states that if the size of the storage
is significantly less than
, then the number of i where
will be less than v. That is, the attacker cannot do much better than simply storing a set of values
.
Damgård, Ganesh, and Orlandi showed how a natural compilation of existing proof of retrievability schemes along with replica encodings gave way to proofs of storage with client setup. Also, they provided a candidate construction for replica encodings from trapdoor permutations under the ideal cipher model and the random oracle model. We turn our attention to these.
The DGO Construction: We now outline (a slight variant of the) construction for [11], which is given in the ideal permutation and the random oracle model. We remark that the DGO construction itself is an adaptation of one of the “hourglass” schemes of van Dijk et al. [30]. The building blocks will consists of a trapdoor permutation , along with the ideal cipher
, and a random oracle
. We again let
be the security parameter and let
be the output length of the trapdoor permutation as well as the block length of an ideal permutation
. For pedagogical purposes, we will assume for the sketch below that messages consist of
bits, but in our main body, we consider the more realistic case of many block messages.
The setup algorithm simply chooses a TDP public/secret key pair as outputs
where
is the trapdoor permutation key generation algorithm. The public and secret key pair of the TDP serve as the keypair of the replicated encoding scheme.
The encoding algorithm takes as input the TDP secret key and message m. It first chooses a string
. It then initializes a value
where
is modeled as a random oracle function. Then for
to
rounds it computes
where
is the number of rounds, which grows linearly with the number of replicas. The encoding is output as
.
Finally, the decoding algorithm recovers a message as follows. For setting j from
down to 0 compute
. Then output
.
The fact that the decoding step recovers the message follows straightforwardly from the correctness of the trapdoor permutation and ideal permutation. We also observe that it is publicly computable since it uses the public key and forward direction of the trapdoor permutation.
1.1 Our Contributions
- 1.
Our first contribution is that we discover and demonstrate that the security argument put forth by [11] is fundamentally flawed. The security argument makes implicit assumptions about an attacker’s behavior which are not generally true. More specifically, in the security game applied to the DGO construction (in the ideal permutation and random oracle model) an attacker works in two phases. The first stage attacker
receives the replicas, can make several queries to the ideal permutation and then records some state
of limited size. This state
is passed to a stage two attacker
which can make further permutation queries and attempts to reconstruct the queries. In general a first stage attacker can apply arbitrary strategies to breaking the scheme so long as it poly-time and state
is sufficiently small. However, the proof argument of [11] assume that the ideal permutation queries made by the attacker will be “uniquely stored”. Roughly, they will argue that a query output bit will either be stored explicitly or not at all. This discounts the possibility of an attacker strategy such as making several oracle queries and storing the XOR of all the outputs together. We demonstrate that the above error manifests in a false theorem statement in [11]. The authors claim that the scheme is secure for any trapdoor permutation (TDP) if
rounds are applied when doing n encodings of b blocks with security parameter
. (I.e. Claim the number of rounds does not need to scale with b.) We provide an explicit counterexample to this claim in Sect. 7. We give a TDP that is secure assuming indistinguishability obfuscation, but for which the scheme is attackable using these parameters. The attacker strategy actually works by XORing several query values together and is thus directly tied to the flaw in the security proof. There does not appear to be any simple “fix” to the security argument of [11] as we will see that addressing general attacker storage strategies comprises the core difficulty of proving security.
We also note that an explicit “partitioning assumption” appears in the security definition of [30] for “hourglass schemes” where the authors conjecture (but do not prove) that it seems implausible that mixing together two representations can give an advantage to an attacker. Although we do not do so formally, we believe that our counterexample can be adapted to the work of [30] as well (at least if one considered the scheme for general trapdoor permutations) and demonstrates the danger of making assumptions that restrict adversarial strategies.
- 2.
For our second contribution we show that the DGO construction is actually secure when parameterized correctly. In particular, when the number of rounds is equal to
. To do so we need to build up a proof approach from the ground up that accounts for general attacker storage behavior. We first develop an analysis technique that we call “sequence-then-switch”. We show how in this framework, we can prove security against an attacker that arbitrarily assigns state. In particular, we show how to analyze the security of a close variant of the [11] construction in the ideal permutation and random oracle model. In addition, we give an explicit construction of a trapdoor permutation using indistinguishability obfuscation which allows for an attack strategy not covered by their restricted model, showing the [11] construction as given is in fact explicitly insecure against general adversaries.
- 3.
The prior construction and proof relies on the ideal permutation model. A perhaps better goal would be to have a construction secure in the random oracle or random function model as this assumes less structure on the ideal object. Typically, this is dealt with by building a random permutation from a function using a Feistel network and showing that this is “indifferentiable” in the indifferentiability framework of Mauer et al. [22]. Prior works have shown this for 14 [20] and then 8 round Feistel [10]. However, Ristenpart, Shacham, and Shrimpton [27] show that the framework does not compose for multi-round games. Since the above construction relies on a multi-round game, proof from an ideal permutation cannot be reduced to a proof to an ideal function.
We give a new construction that relies only on the ideal function model and analyze its security. Our construction uses the random function to embed a Feistel like structure into the construction. However, instead of arguing in the indifferentiablity framework, we provide direct proof of security, which bypasses any composability issues. In both proofs, we allow the attacker to assign its storage arbitrarily.
1.2 Our Techniques
We begin by describing our analysis for the first construction using a TDP and ideal permutation. We focus on the construction producing many replicas on a single block, as described in the introduction for simplicity. Also, for simplicity, we consider the particular case where an attacker that asks for n replicas in the first stage and wants to produce all n of these replicas, but we significantly less than storage. In particular consider an adversary with
of length
bits of storage for security parameter
and block length
. Our central idea is to organize the proof into two parts where we first show that any storage bounded
must make “sequential” oracle queries on at least one replica. Then we show that on this particular replica, how one can swap out permutation output for another.
- 1.
Sequentiality: In our security game, the challenger first creates n replicas of m. To create the i-th replica by choosing
randomly. It sets
. Then for
to
rounds it computes
. The encoding is output to
as
for
. The attacker
receives the encodings, makes some more oracles queries before producing
of
bits and passing it to
.
Let’s examine the behavior of
whose job it is to output the encodings using the state plus oracle queries. We say that
“queries sequentially” on replica i if for all
it queries the oracle
on
before it queries the oracle on
. (We will think of outputting the encoding
at the end as implicitly querying on the final value.) That is for
to query sequentially on replica i it must both make all
oracle queries and make them in (relative) order. However, there could be many other queries outside the replica chain interspersed between
and
.
We will first argue that except with negligible probability whenever
produces all the encodings, it queries sequentially on at least one replica. Observe that we cannot hope to say that it queried sequentially on all replicas as
could directly store several of the replica encodings, which allows the algorithm to bypass any additional queries related to that replica. To prove this, we first define and prove a useful matching pairs lemma. Consider an algorithm
that takes as input a string
of length
and gets access to a string oracle access to a randomly chosen permutation
of block length
. The goal of
is to provide n distinct pairs
such that
, but without querying the oracle a either
nor
. Thus
can make several oracle queries on many values; however, once a query is made on some x, it spoils using x as a value from one of the pairs. Note that to win in this game,
needs to produce the pairs— not just distinguish them from random. Also observe that
can use advice to help it win this game. For example,
might encode the several pairs. We prove that no attacker
that makes a polynomially bounded number of queries can win in this game by a simple application of the union bound. Consider a fixed value of an advice string a—that is a is fixed before the permutation is chosen. We show that the probability of
winning is at most
. Then by the union bound the probability that there exists any string a which it could win with is at most
which is negligible in
.
Now we need to show that an attacker that wins but is not sequentially querying on any replica will break our matching pairs game. We consider
that does this. Let’s think of the algorithm pair as deterministic. (If they are randomized for each security parameter, we can fix their coins that maximize success probability.) We construct an algorithm
along with the process of determining an advice string that does this. Conceptually we can think of a preprocessing algorithm
that generates the advice.
will first run
, which makes several queries and then produce
. It then runs
on
. If
either did not produce all the replica encodings or it did sequentially query on some replica i, then abort. However, if it did not make sequential queries on all replicas, then there must be values
where
made an oracle query on
(or
), but had not yet made a query on
. Let
be the indices of the queries (ordered chronologically) for which this occurs. Note the number of queries
can make is polynomial in
, but in general, it could be much more than
. The preprocessing algorithm will package its advice string as
along with
and
. Importantly, the size of this information is bounded by
for some polynomial
since n,
, and the number of replicas is polynomially bounded. This means that if
is of size
, then the advice string will be within
.
We now consider algorithm
, which receives the advice string.
will run
with the following modifications. Suppose
makes its q-th query where
for some i. This means that
is querying on
, but had not yet made a query on
. At this point
determines
by querying
up to
. It then submits
as one of its matching pairs noting that neither
nor
were made before. It can also continue to run
without making either of these queries to the oracles since it already knows the answers to them. As this process proceeds,
will eventually recover n such pairs which breaks our matching pairs lemma and arrives at a contradiction.
- 2.
Switching:
Once sequentiality is established, we will proceed to argue that the adversary must still be sequential with good probability even when we “switch” the random oracle output of some
to a random value only for
, allowing us to embed a trapdoor permutation challenge.
In more detail, we now consider a new switched game that is almost equivalent to the prior one. In the switched game the challenger first chooses r random values
for
along with a bit string
. It programs the oracle T such that
This game can be shown to be almost equivalent to the previous one.
Next, we consider a game where the challenger answers queries according to a string x with
, but switches to using a string
(and keeps everything else the same) when responding to
. The challenger chooses the string
such that the output
given by
is the same as if the queries are answered according to
in the first phase. The attacker is considered to win only if it would produce sequential queries both for when x was used with
and when
was used with
.
With high probability, such an
will exist from the fact that
and
is set to be
. We emphasize that to make this argument we do not make any further assumptions on how
assigns
other than the bound on the size. We can then use the heavy row lemma [24] to argue that if an attacker wins with probability
in the previous game, it wins with probability
in this game. We note that the game takes exponential time to find such an
, but this is not an issue as the closeness lemma is information-theoretic.
Finally, in order to embed a TDP challenge, we need to move to a security game that can be efficiently simulated. While it might take exponential time to find
from x above, we observe that this is not necessary. Instead, we can embed the challenge from just knowing the shortest common prefix of x and
. Moreover, given x, we can simply guess what the prefix is with a
loss. Thus we move to a final game where the challenger simply chooses a random value j and a random permutation
in the first phase and then replaces the oracle output of
with a random R in the second phase. The attacker wins if it queries
. A simple reduction then shows that any attacker that wins in this game breaks the TDP security.
We begin by sketching out the encoding construction. In this setting, we will have a TDP in the domain bits and use a random oracle
that outputs
bits. We will use blocks of length
, and for this sketch, focus on the particular case where each replica consists of a single block message.















In this setting, we want to prove that in the security game, an attacker with cannot produce n replica encodings. (The extra factor of two is solely due to blocks being
bits here.)
Our proof will follow in the same theme of showing that there must be a form of sequential querying made on at least one replica. However, the new structure of the construction presents additional complications. For example, we could imagine an attacker , which stores all the values
for some j. This is possible since storing these only take
bits, and our assumption is only that the storage is less than
bits. On the one hand, it is unclear how the attacker can leverage storing all these values because one needs consecutive values (e.g.,
,
) to propagate further. And, storing n different consecutive pairs requires
bits of storage. On the other hand, the attacker can store these means at the very least we need a new notion of sequentiality.
For our new notion of sequentiality, we say that the queries to replica i meet our requirements if the longest common subsequence of the queries made and is of length at least
. Intuitively, this is close to our original notion but allows for a little skipping. To prove this form of sequentiality, we invoke a random function analog of our matching pairs lemma from before. The reduction to matching pairs follows in a similar spirit to before but requires a more nuanced case analysis.
Once that is in place, our proof proceeds analogously, but again with more nuances and complications arising from the fact that we only can guarantee the weaker form of longest common subsequence.
The Proposed Construction Is Round Optimal. We now consider the general case of a message having blocks and give intuition that our construction is round optimal up to constant factors. We construct a secure trapdoor permutation scheme from indistinguishability obfuscation which gives an insecure replica encoding scheme for any number of rounds
(i.e.
). Incidentally, this also shows that the construction provided by [11], which claims to only requires
rounds, is insecure against general adversaries.
We provide the intuition for our construction by considering the ideal VBB notion of obfuscation. The overall idea is to construct a trapdoor permutation family where we can amortize the ‘state’ space required to invert multiple independent instances. We will consider our permutations to be on domain . If we assume we have VBB obfuscation, then consider a program that takes in
many inputs
where
and an advice string also in
and outputs the preimages of the messages
iff the advice string that was input was equal to
. The program has the secret key hardcorded and simply computes
and makes the check against the advice string and outputs
if the check succeeds. The VBB obfuscation of this program is then posted in the public parameters and provides a way for the adversary to compress
bits to
bits and still preserve information. Thus an adversary with outputting
bits can recompute the replica from storing
information. This would violate the security if we proved soundness for the same parameters as our scheme. A formal treatment is presented in Sect. 7.
1.3 Additional Prior Work
Proofs of Retrievability:
Proofs of retrievability guarantee to a verifier that a server is storing all of client’s data. The notion was formalized in [21], where, in an audit protocol the verifier stores a (short) verification key locally and interacts with the server to enforce accountability of the storage provider. If the server can pass an audit, then there exists an extractor algorithm, that must be able to extract the file on interaction with the server. There are different constructions for this primitive, [8, 12, 29]. The construction of [29] showed how to do this in the random oracle model that allow public verifiability.
Proofs of Space: Proof of space are interactive protocols between a prover (server) and a verifier (client) that guarantee that a prover has dedicated a specific amount of space. It guarantees that it would be more expensive for a dishonest prover to deviate from the honest protocol. They were introduced in [14] and have been further studied in [1, 26]. Compared to a proof of replicated storage, they have an additional requirement of communication being succinct between a prover and verifier and are usually studied in the public-key setting.
Other examples of works which are different from proofs of space but enforce storage requirements similar to our soundness game on the prover are storage-enforcing commitments [19], hourglass scheme [30] and the model of computation considered by [15].
Proofs of Replicated Storage:
The formal treatment of proofs of replicated storage was given by [9, 11, 16]. The idea was introduced in [5, 6] where they proposed Filecoin, a decentralized storage network that performs consensus using proofs of replication. Recently, [7, 9, 16, 17, 25] have given constructions for proof of replication using timing assumptions (encoding process is much slower so that a server cannot replicate data on demand). On the other hand, the scheme of [11] is not based on timing assumptions and considers the protocol with a client setup. They introduce the notion of a replica encoding that can be combined with a public verifiable proof of retrievability [29] to give a proof of replicated storage. Please see [11] for other related works such as proof of data replication.
Hourglass Scheme:
Our constructions and the construction from [11] are reminiscent of the hourglass scheme of [30]. Our construction in the ideal permutation model differs from the RSA based hourglass function of [30] in explicitly ensuring that the encoding blocks are uniformly distributed by applying a random oracle and increasing the number of rounds suggested by their scheme. Because of our explicit encoding function, we do not need to make a partitioning assumption in our security proof. The brief analysis of their scheme gives a similar intuition to the security as used by [11] and gives a construction for the number of rounds independent of the number of blocks. But as we see in Sect. 7, this intuition does not hold true for general adversaries.
Technique Similarities in Literature:
Some of our techniques have a flavor that appears in the study of pebbling strategies on random oracle graphs and the memory hardness literature [2–4, 13, 15]. Pebbling strategies on random oracle graphs look at the amount of resources (the list of random-oracle calls) made by the adversary and help in proving complexity lower-bounds on the resources. Our notion of “sequentiality” is similar to the notion of a legal “ex-post-facto pebbling” on a directed acyclic graph (see [4] for details). The reductions there are proven using a core lemma which looks at a legal ex-post-facto pebbling given hints; Lemma 1 of [4, 13, 15] which is similar to our core lemmas for proving sequentiality Lemma 1. Interestingly, [2] considered adversaries that can store secret shares of the random oracle queries (such as a xor) and introduced the notion of an entangled pebbling game. They look at the resource of “Cumulative Memory Complexity (CMC)” and constructed an example to show that such strategies can help the adversary reduce it’s resource requirement. The followup work of [3] improved on their lower bounds results for any general adversarial strategy.
1.4 Concurrent Work
After completing our work we learned of a concurrent and independent work of Moran and Wichs [23]. They introduce a variant of replica encodings which they call incompressible encodings, and proceed to provide constructions in the random-oracle model (and the common random string model) using the Decisional Composite Residuosity or Learning with Errors assumptions. Their construction utilizes some new techniques to apply lossiness to construct said encodings. In addition, they introduce an additional “big-key” application for intrusion resilience which applies to our constructions and proofs as well.
At a very high level, our work depends on the general assumption of trapdoor permutations, whereas they use the specific number theoretic assumptions of Decisional Composite Residuosity and Learning with Errors. Comparing our construction instantiated with RSA trapdoor permutation to their DCR construction, their construction appears to be more practically efficient from a computational perspective due to the round complexity required for our construction, however, ours makes tighter use of space for small “s” values used in the DCR construction. An interesting future direction could be to explore concrete space and computational efficiency tradeoffs for increasing the s parameter in their DCR construction.
Similar to us, Moran and Wichs discovered foundational issues in the proof arguments of [11]. In a personal communication Wichs noted that there is a simple heuristic counterexample to the claim of [11] if one uses the heuristic of ideal obfuscation. We subsequently developed a counterexample based on the concrete assumption of indistinguishability obfuscation that we added as Sect. 7 of our work.
2 Preliminaries
Notation. These notations are used consistently throughout the text.
We use to denote the security parameter.
denotes the output of the algorithm
when we run x on it. A negligible function
is a function such that for every positive integer c, there exists an integer
such that for all
,
. [n] denotes the set
and [a, b] denotes the interval between a and b inclusive.
implies that we are uniformly sampling y from a domain set
. We say an adversary or an algorithm
is probabilistic poly time (PPT) if there is a polynomial
such that for all
,
will halt in
time in expectation on any input of length
.
A trapdoor permutation is defined as a collection of three PPT algorithms .
is an indistinguishability obfuscator for a circuit class
and security parameter
. A puncturable pseudorandom function family (PPRF) on domain
and range
is defined using a set of algorithms
. Due to space limitations, please find the complete definitions in the full version of the paper [18].
3 Defining Replica Encoding















- Correctness: For any choice of coins of
, the probability of incorrect decoding is
where the probability is over the coins of1.
- Length of the encoding scheme is denoted by a function
that takes in the security parameter and the length of the message and outputs the length of the encoding, formally for any
, choice of coins of
,
where the probability is over the coins of.
-Sound: Consider the game
between an adversary pair
and a challenger defined in Fig. 1. A replica encoding scheme is
-sound (
), if for any probabilistic poly-time adversaries
, for all
, there exists a function
such that the following holds.
where the probability is over the coins with the challenger and the two adversaries.
















The soundness game for the replica encoding scheme.
Definitions in Prior Work. The formal definition of proof of replica encoding was given by Damgård et al. [11]. The soundness game can also be defined from the proof of space literature where the input message to be stored is generated through a private key setup (not revealed to the prover and the verifier) and the time bound for the prover is polynomial. We simply clean up the definitions proposed by [11] and highlight a few differences.









Tweaking their definition to include as output of the game and not conditioning on events where the correct replica is output solves the issue.
Other minor differences between our definitions include a algorithm that sets up the parameters for the scheme. We do this to formalize the alignment and use the
environment of the underlying trapdoor permutation. The formal definition of replica encoding in DGO includes an efficiency condition defined as exactly
. We do not restrict the efficiency in the formal definition in our work and state it as a desired property that should be required for a practical replica encoding scheme.
4 Lemmas on Random Functions and Permutations
This section contains useful information theoretic lemmas on analyzing random permutations. The first is a result on the hardness of outputting relations on the required ideal primitive given limited advice and restricted behavior. We will use this later in showing adversaries capable in distinguishing between certain games will be able to do the following with noticeable probability. Due to space constraints, we defer the proofs of these lemmas to the full version [18]. Additionally, in the full version we discuss and prove the random function analogues of these lemmas.
Let ,
be oracles to a random permutation and its inverse. Consider any computationally unbounded adversary
that makes polynomially bounded (in
) queries to
on input a bounded
and outputs n pairs
without querying them explicitly. If
is bounded by
bits where n is polynomial in
, the probability that it succeeds is negligible in
.




![$$\Pr \begin{bmatrix} \exists ~\mathsf {advice} \in \{0,1\}^{*}~s.t.~ |\mathsf {advice} | \le n\cdot \lambda -\omega (\log \lambda ), \\ \{(x_i, y_i)\}_{i=1}^{n} \leftarrow \mathcal {B} ^{\mathsf {T} (\cdot ), \mathsf {T} ^{-1}(\cdot )}(\mathsf {advice})~where~\\ \forall i\ne j\in [n], x_i\ne x_j,~\mathsf {T} (x_i) = y_i,~x_i \notin \mathsf {s} _{\mathcal {B}}^\mathsf {T} ~and~y_i \notin \mathsf {s} _{\mathcal {B}}^{\mathsf {T} ^{-1}} \end{bmatrix} \le \mathsf {negl} (\lambda ),$$](../images/508076_1_En_20_Chapter/508076_1_En_20_Chapter_TeX_Equ7.png)




![$$\pi ' = \pi [\mathsf {swap}(x_1,x_2)] ]$$](../images/508076_1_En_20_Chapter/508076_1_En_20_Chapter_TeX_IEq337.png)




Let denote the symmetric group on
. Let
, and
. Then
is uniform on
- i.e. x is independent of
.
Multiple invocations of the swap notation are defined as following
![$$\pi [\mathsf {swap}(x_1,y_1),\ldots ,\mathsf {swap}(x_k,y_k) ]$$](../images/508076_1_En_20_Chapter/508076_1_En_20_Chapter_TeX_IEq348.png)
Let
.
Iterate from
to k,
• Perform
swap,
.
Output
.





![$$\begin{aligned} (r_k, \pi [\mathsf {swap}(r_{0},\tau (r_{1})), \ldots , \mathsf {swap}(r_{k-1},\tau (r_k)) ]) \end{aligned}$$](../images/508076_1_En_20_Chapter/508076_1_En_20_Chapter_TeX_Equ9.png)

We introduce another useful result on the probability of finding collisions on a deterministic function .





5 Replica Encoding in the Ideal Permutation Model
We now give the construction and proof of our replica encoding scheme from trapdoor permutations in the ideal permutation model and the random oracle model. As stated in the introduction, the construction itself is a close variant of [11]. However, our proof will introduce new analysis techniques that account for an attacker that stores state in an arbitrary manner.
Let denote the security parameter. Let
(denoted by
) be a function polynomial in
and represents block length in our construction. We use a trapdoor permutation
where the domain for the family of trapdoor functions is
where
is setup with security parameter
. Let
be random permutation oracles on the same domain
and
be a random oracle on the range
.
5.1 Construction
Let (denoted by
) be the number of rounds in our scheme. For our construction, it depends on the security parameter, maximum number of replicas chosen during setup and the message length.
Run . Output
.

Parse
.
Choose a string
.
Divide m into
blocks of length
i.e.
,
.
Set
.
- Compute
,
- For rounds j from 1 to
, compute:
Let
and output
.

Parse
.
Parse y as
. Parse
as
, where
and
.
For rounds j from
to 0:
Compute
,
compute,
Output.
The encoding length for our scheme is .2
5.2 Security of Replica Encoding Scheme
Assuming is a secure trapdoor permutation and
are oracles to a random permutation on domain and range
and
is a random oracle on the same range. Then our construction for
described above is
-sound according to Definition 1 for all
and
.
Sequence of Games. Our proof proceeds via a sequence of games as described below. We assume that adversaries have their randomness non-uniformly fixed in each game to maximize their success. The changes in each game in comparison to the previous one are indicated with red. Details of the previous game are copied without explicit rewriting. We defer the formal proof of indistinguishability between successive games to the full version [18].
Game 0: This is the original security game where we record the queries made by the adversaries in lists. We also assume that any list is ordered and stores distinct elements. More concretely, when in Phase 1 a query x is made on
,
checks if
and updates the list
if the condition is true. It performs this operation of maintaining the list for each Phase and oracle separately. Denote
as the functions that take in the security parameter and output the total distinct queries made by the adversaries to oracle
during the three phases respectively. Note that the functionality of the oracles is still the same, we just record queries.
Setup: The challenger(denoted by
) runs
and sends public key
’ to
. It keeps the secret key
’ for itself.
Phase 1: The adversary
issues queries on
,
responds the query back to
.
File Challenge:
. It sends m to
who parses
as
;
as
and does the following:
Divide m into
blocks of length
i.e.
,
.
For
,
* Choose a string
.
- * Compute
,
* For rounds j from 1 to
and
,
Compute
from
as
* Let
and set
.
returns
to
.
Phase 2:
issues additional queries on
,
responds the query back to
.
State Sharing:
outputs state
and sends
to
.
Phase 3: The adversary
queries on
,
responds the query back to
.
- Guess:
outputs the replica guesses to
.
Verify: Let
if
and 0 otherwise. Adversary wins if
.


Setup: The challenger(denoted by
) runs
and sends public key
’ to
. It keeps the secret key
’ for itself.
Phase 1:...
File Challenge:
. It sends m to
who parses
as
;
as
and does the following:
Divide m into
blocks of length
i.e.
,
.
For
,
* Choose a string
.
* Let
and set
.
returns
to
.
Phase 2, State Sharing, Phase 3, Guess:...
Verify: Let
if
and 0 otherwise. Adversary wins if
.
Setup, Phase 1, File Challenge, Phase 2, State Sharing, Phase 3:....
.
Verify: Let
if
. Adversary wins if
and
.
– Setup, Phase 1, File Challenge, Phase 2, State Sharing, Phase 3, Guess:....
– Verify: Let
if
,
is queried on
and 0 otherwise. Adversary wins if
and
.

Setup: The challenger(denoted by
) runs
and sends public key
’ to
. It keeps the secret key
’ for itself. Set
= 0.
Phase 1, File Challenge, Phase 2, State Sharing, Phase 3, Guess:....
Sequentiality:
We consider going through
list of queries to
and
. If there is a point in time such that some
was queried on
or
was queried on
when
has not made a query to
for
, then set
.
Verify:
,
, and





![$$i\in [r ]$$](../images/508076_1_En_20_Chapter/508076_1_En_20_Chapter_TeX_IEq524.png)





![$$i\in [r ]$$](../images/508076_1_En_20_Chapter/508076_1_En_20_Chapter_TeX_IEq530.png)



![$$A_{i,\mathsf {x} [i]}$$](../images/508076_1_En_20_Chapter/508076_1_En_20_Chapter_TeX_IEq534.png)
– Setup, Phase 1:....
File Challenge:
. It sends m to
who parses
as
;
as
and does the following:
Divide m into
blocks of length
i.e.
,
.
For
,
* Choose a string
.
Prequery Check
If
, set
.
* Sample
* For rounds j from
to 1 and
,
Compute
from
as
- * For each block
, reprogram
* Let
and set
.
returns
to
.
Phase 2: Use
to answer queries for
respectively.
State Sharing:....
Phase 3: Use
to answer queries for
respectively.
Guess, Sequentiality:....
Verify: Adversary wins if
is queried on
,
, and
.














Routine
– Setup, Phase 1, Sampling a New Permutation, File Challenge, Phase 2, State Sharing:....
Phase 3: Use
to answer queries for
respectively.
Guess:....
Sequentiality:
If
(
was queried on
or
was queried on
while
had not been queried on
), set
.
Verify: Adversary wins if
is queried on
,
, and
.


Setup, Phase 1, Sampling a New Permutation, File Challenge, Phase 2, State Sharing, Running
:....
Setting switched oracle:
Let
denote the
bit of
. We will write
to refer to
and denote
with
. Set
to denote
.
Let
be the inverse of
.
– Phase 3, Guess:....
– Verify: Adversary wins of
is queried on
,


– Setup, Phase 1, Sampling a New Permutation, File Challenge, Phase 2, State Sharing:....
– Setting switched oracle:
Define
to be:
Let
be the inverse of
.
Phase 3, Guess:....
Verify: Adversary wins of
is queried on
and
.
6 Replica Encodings in the Random Function Model
We now turn toward building Replica Encodings from trapdoor permutations in the ideal function model. Our construction will embed a Feistel like structure into the replica encoding construction. We will directly prove security of this construction. Our construction makes use of the and
defined for a trapdoor permutation on domain
and a random function
on the same domain. Let
be a random oracle on the range
.
Define functions on even length inputs as follows. If
, where
, then the function
denotes the left half of x i.e.
and the function
denotes the right half of x i.e.
.
6.1 Construction
Run . Output
.

Parse
.
Choose a string
.
Divide m into
blocks of length
i.e.
,
.
Set
.
- Compute
,
For rounds j from 2 to r compute:
- Compute
from
and
as
Let
Let
and output
.

Parse
.
Parse y as
. Parse
as
,where
and
.
For each
and for rounds j from
to 0 compute:
- Compute
from
and
as
compute,
Output.
The encoding length for our scheme is .3
6.2 Proof of Security
Assuming is a secure trapdoor permutation on domain and range
and
is an oracle to a random function on the same domain and range, and
is a random oracle with range
. Then our construction for
described above is
-sound according to Definition 1 for all
and
.
Due to space constraints, we defer the sequence of games and the proof of this theorem to the full version of our paper, [18].
7 Counterexample for Round Function Independent of Blocks
We gave intuition in Sect. 1.2 using VBB obfuscation that our construction is round optimal up to constant factors i.e. is insecure for any number of rounds . Below we formalize the notion by giving a construction from
that captures this intuition formally and constructs a scheme in the end that breaks soundness security.
We assume the existence of a trapdoor permutation with domain
for
4 , a puncturable PRF family
, indistinguishability obfuscation
for all polynomial sized circuits.
7.1 Construction











Routine

Routine
- 1.
Sample
- 2.
Let
and
.
- 3.
Output
- 1.
Let
and output (z, y).
- 1.
Let
.
- 2.
Let
.
- 3.
Output
.
7.2 Proofs
Efficiency
are polynomial time algorithms
simply calls
twice. The programs
and
simply call the underlying PRF and trapdoor primitives at most
times. By the efficiency of the underlying PRF and trapdoor permutation,
and
are poly-sized circuits and
runs in poly time, thus
runs in polynomial time.
simply evaluates a polynomial sized circuit, which is polynomial time.
does a single call to
, which are all polynomial time algorithms by definition.
Correctness





















Security
Assuming is a secure one way permutation, indistinguishability of
and a puncturable PRF family






We will show this via a sequence of games, where the view of the adversary between successive games is indistinguishable. Due to space constraints, the formal proof is deferred to the full version [18]. The proof follows the punctured programming technique of [28].
Game 0 This is the original security game.
- 1.Challenger samples a random
- (a)
Sample
- (b)
Let
and
.5
- (c)
Output
- 2.Challenger runs
- (a)
Let
.
- 3.
Adversary is given
.
- 4.
Adversary outputs
- 5.
If
then output 1 else output 0
- 1.Challenger samples a random
- (a)
Sample
- (b)
Compute
- (c)
Compute punctured key
- (d)
Let
and
.
- (e)
Output
- 2.Challenger runs
- (a)
Let
.
- 3.
Adversary is given
.
- 4.
Adversary outputs
- 5.
If
then output 1 else output 0
- 1.Challenger samples a random
- (a)
Sample
- (b)
Compute
- (c)
Compute punctured key
- (d)
Let
and
.
- (e)
Output
- 2.Challenger runs
- (a)
Let
.
- 3.
Adversary is given
.
- 4.
Adversary outputs
- 5.
If
then output 1 else output 0
In this game, we compute using true randomness
.
- 1.Challenger samples a random
- (a)
Sample
- (b)
- (c)
Compute
- (d)
Compute punctured key
- (e)
Let
and
.
- (f)
Output
- 2.Challenger runs
- (a)
Let
.
- 3.
Adversary is given
.
- 4.
Adversary outputs
- 5.
If
then output 1 else output 0
7.3 Attack on Replica Encoding Scheme
First, we restate the security game in the context of the above TDP. We consider a variation of our construction in Sect. 5 with instantiated with the above trapdoor permutation and present a concrete attack adversary which breaks the
-soundness of our replica encoding scheme for any constant
. We remark that this attack also applies to the construction in Sect. 6.

Setup: The challenger(denoted by
) runs
and sends public key
’ =
to
. It keeps the secret key
’
for itself.
Phase 1: The adversary
issues queries on
,
responds the query back to
.
File Challenge:
. It sends m to
who parses
as
;
as
and does the following:
Divide m into
blocks of length
i.e.
,
.
For
,
* Choose a string
.
- * Compute
,
* For rounds j from 1 to
and
,
Let
Let
Compute
from
as
* Let
and set
.
returns
to
.
Phase 2:
issues additional queries on
,
responds the query back to
.
State Sharing:
outputs state
and sends
to
.
Phase 3: The adversary
queries on
,
responds the query back to
.
- Guess:
outputs the replica guesses to
.
Verify: Let
if
and 0 otherwise. Adversary wins if
.
Now below, we present out construction of adversaries .
Choose any message
where
.
Send m to challenger.
Receive
.
For each
, set
.
Send
as state.
Divide m into
blocks of length
,
For
Compute
For
Set
For
Let
and output
use
space.
We observe that the state output is , which use
, and
space respectively. We use the fact that
and
to give us our result.
, there exists a negligible function
such that the probability that
in the verification stage of
for adversaries
is
.
We recall that is simply an obfuscation of program
. Thus, as long as the collection
is unique for every
and
is the
of
, then
will successfully invert. By the fact that H is a random oracle, and that T and
are permutations, we use the fact that a uniform random variable under a permutation is uniformly random to get that
is a uniform and independently random set. Thus, we can union bound the probability that any of them collide with
. In addition, we know that
is the aforementioned value by construction. Thus, we can inductively reason that our adversary computes
correctly, and thus can recover the original encodings.
When instantiated with a round function , the construction in Sect. 5 is not
-sound for any constant functions
.