Next Article in Journal
Image Encryption Scheme Based on Multiscale Block Compressed Sensing and Markov Model
Previous Article in Journal
Various Auto-Correlation Functions of m-Bit Random Numbers Generated from Chaotic Binary Sequences
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Constructions of Beyond-Birthday Secure PRFs from Random Permutations, Revisited

1
Key Laboratory of Electromagnetic Space Information, Chinese Academy of Sciences, School of Information Science and Technology, University of Science and Technology of China, Hefei 230027, China
2
School of Computer Science, Nanjing University of Posts and Telecommunications, Nanjing 210023, China
*
Author to whom correspondence should be addressed.
Entropy 2021, 23(10), 1296; https://doi.org/10.3390/e23101296
Submission received: 9 September 2021 / Revised: 27 September 2021 / Accepted: 28 September 2021 / Published: 30 September 2021

Abstract

:
In CRYPTO 2019, Chen et al. showed how to construct pseudorandom functions (PRFs) from random permutations (RPs), and they gave one beyond-birthday secure construction from sum of Even-Mansour, namely SoEM 22 in the single-key setting. In this paper, we improve their work by proving the multi-key security of SoEM 22 , and further tweaking SoEM 22 but still preserving beyond birthday bound (BBB) security. Furthermore, we use only one random permutation to construct parallelizable and succinct beyond-birthday secure PRFs in the multi-key setting, and then tweak this new construction. Moreover, with a slight modification of our constructions of tweakable PRFs, two parallelizable nonce based MACs for variable length messages are obtained.

1. Introduction

Random numbers are widely used in engineering practice. In particular, randomization is central to cryptography. One can generate random numbers by using physical random sources such as chaos-based [1] and quantum-based [2] random number generator. However, obtaining random numbers from physical phenomena requires high quality of the entropy source, and is also device-dependent so that the corresponding cost is not cheap. Besides, in some cryptographic applications, the way of generating random numbers above is not friendly due to its uncontrollability. Motivated by cryptographic applications, Blum and Micali [3] and Yao [4] formalized the modern notation of pseudorandom generators from the perspectives in computational complexity. Later, Goldreich et al. [5] proposed the concept of pseudorandom functions (PRFs). Informally, F ( K , · ) is said to be a PRF where K is a uniformly random string with enough entropy, if for any input x, F ( K , x ) can be computed efficiently and can not be distinguished from a truly random value. PRFs are important in cryptography with fruitful applications in encryption, identification, and authentication.
In theory, PRFs can be obtained from one-way functions [5,6], but this general transformation is not practical. Some other algebraic constructions, such as number theory-based [7,8] or lattice-based PRFs [9,10,11], are still inefficient. Therefore, it is significant to construct PRFs from symmetric primitives both in theory and practice. There are a series of works to build the PRFs from pseudorandom permutations (PRPs)/block ciphers [12,13,14]. Recently, Chen et al. [15] proposed a method to construct PRFs from random permutations (RPs). In [15], the construction SoEM 22 (which means sum of one-round Even-Mansour based on two independent permutations) was proved beyond-birthday secure in the single-key setting.
About SoEM 22 , there are three questions we may ask: (i) Is SoEM 22 beyond-birthday secure in the multi-key setting? (ii) Can SoEM 22 be tweaked while preserving BBB security? (iii) If the underlying random permutations can be computed efficiently in both forward and inverse directions, can we construct beyond-birthday secure PRFs by using only one permutation in both multi-key and tweakable cases?
Fortunately, we can give positive answers to these questions. First, we prove that SoEM 22 is beyond-birthday secure in the multi-key setting. Informally, it means that for any distinguisher who distinguishes m independent n-to-n-bit keyed functions from m independent ideal random functions, its advantage does not depend on m. However, in this case the distinguisher still needs to make at least O ( 2 2 n / 3 ) queries to achieve a noticeable advantage.
Second, we tweak the construction SoEM 22 , inspired by the work [16]. A tweakable PRF, F : K × T × { 0 , 1 } n { 0 , 1 } n , means that one can associate a tweak space T to the key space K . For any key k randomly sampled from K , one can choose different tweaks t T to compute y = F ( k , t , x ) even on the same input x.
Following the idea in [17], we solve the third question, and construct beyond-birthday secure PRFs in the multi-key setting from one bidirectionally efficient random permutation. Then this new construction from a single permutation can also be tweaked while preserving BBB security.

1.1. Our Contributions

In this paper, we enhance the security of SoEM 22 [15] by showing that
F K 1 , K 2 P 1 , P 2 ( x ) = P 1 ( x K 1 ) P 2 ( x K 2 ) K 1 K 2
is beyond-birthday secure in the multi-key setting, where ⊕ denotes the bitwise XOR operator, P 1 and P 2 are two independent random permutations, x is an n-bit input, and K 1 and K 2 are two n-bit uniformly random strings. Furthermore, we can tweak the construction SoEM 22 , while preserving BBB security, as
TPRF H K h 1 , H K h 2 P 1 , P 2 ( t , x ) = P 1 ( x H K h 1 ( t ) ) P 2 ( x H K h 2 ( t ) ) H K h 1 ( t ) H K h 2 ( t ) ,
where H K h 1 and H K h 2 are uniformly and independently sampled from the regular and almost-XOR universal (AXU) keyed hash family, t is a tweak, and x is an n-bit input.
Chen et al. [15] first constructed beyond-birthday secure PRFs from random permutations. Later, Chakraborti et al. [18] suggested and designed minimally structured beyond-birthday secure RPFs (i.e., by using only one random permutation). Following this line of study, we design a parallelizable beyond-birthday secure PRF in the multi-key setting from one bidirectionally efficient random permutation P as
F K 1 , K 2 P ( x ) = P ( x K 1 ) P 1 ( x K 2 ) K 1 K 2 ,
where K 1 , K 2 , and x are the same as those in Equation (1). We tweak this new construction as
TPRF H K h 1 , H K h 2 P ( t , x ) = P ( x H K h 1 ( t ) ) P 1 ( x H K h 2 ( t ) ) H K h 1 ( t ) H K h 2 ( t ) ,
where H K h 1 , H K h 2 , x, and t are the same as those in Equation (2).
Moreover, from our two constructions of tweakble PRFs, we can give two nonce based MACs for variable length messages. In particular, when one replaces the input x (resp. the tweak t) in Equations (2) and (4) by an n-bit nonce N (resp. a message M), one can obtain two parallelizable beyond-birthday secure nonce based MACs as
T = P 1 ( N H K h 1 ( M ) ) P 2 ( N H K h 2 ( M ) ) H K h 1 ( M ) H K h 2 ( M )
and
T = P ( N H K h 1 ( M ) ) P 1 ( N H K h 2 ( M ) ) H K h 1 ( M ) H K h 2 ( M ) .

1.2. Related Works

Based on two random permutations P 1 and P 2 , Cogliati et al. [16] constructed a beyond-birthday secure tweakable Even-Mansour (TEM) as
TEM H K h 1 , H K h 2 P 1 , P 2 ( t , x ) = P 2 ( P 1 ( x H K h 1 ( t ) ) H K h 1 ( t ) H K h 2 ( t ) ) H K h 2 ( t ) ,
where H K h 1 and H K h 2 are uniformly and independently sampled from the uniform and AXU keyed hash family, t is a tweak, and x is an n-bit input. Later, Dutta [17] gave a beyond-birthday secure TEM from one permutation as
TEM H K h 1 , H K h 2 P ( t , x ) = P ( P ( x H K h 1 ( t ) ) H K h 1 ( t ) H K h 2 ( t ) ) H K h 2 ( t ) ,
where P is a random permutation, and H K h 1 , H K h 1 , t, and x are the same as those in (7). Compared with Equations (7) and (8), our constructions in Equations (2) and (4) are parallelizable.
Chakraborti et al. [18] constructed beyond-birthday secure PRFs from random permutations with minimal structure (i.e., from one random permutation P) as
P 1 ( P ( K x ) 3 K x ) 2 K ,
where K is an n-bit key, x is an n-bit input, and 2 is a primitive element in the finite field F 2 n so that 2 K denotes the multiplication of 2 and K over F 2 n . Recently, Dutta et al. [19] proved that the construction
P ( P ( K 1 x ) K 2 K 1 x ) K 1
is also a beyond-birthday secure PRF, where K 1 and K 2 are two n-bit uniformly random strings. However, all these two constructions were proved beyond-birthday secure only in the single-key setting. Compared with them, Equation (3) is parallelizable and can be proved beyond-birthday secure in the multi-key setting.
Besides, Chakraborti et al. [18] also gave a nonce based MAC for variable length messages as
T = P 1 ( P ( K N ) 3 K N H K h ( M ) ) 2 K ,
where K is an n-bit key, N is an n-bit nonce, M is a variable length message, and H K h is uniformly sampled from the keyed hash family with three properties: regular, AXU, and 3-way regular.

1.3. Technical Overview

The basic technique to prove the BBB security of our constructions is the H-Coefficient technique [20,21]. As an example, we intuitively introduce the core idea of the security proof for the construction TPRF H K h 1 , H K h 2 P in Equation (4). Let Φ be a random function from T × { 0 , 1 } n to { 0 , 1 } n , where T is the tweakable space. Denote TPRF H K h 1 , H K h 2 P : T × { 0 , 1 } n { 0 , 1 } n as in Equation (4). Given a deterministic distinguisher D who has access query to the primitive oracle P and to the construction oracle TPRF H K h 1 , H K h 2 P or Φ , the goal of D is to distinguish which construction oracle it interacts with. Set Q ¯ P = { ( u 1 , v 1 ) , , ( u p , v p ) } as all p query-response tuples for the primitive oracle, and Q ¯ F = { ( t 1 , x 1 , y 1 ) , , ( t q , x q , y q ) } as all q query-response tuples for the construction oracle. Then, Q ¯ F and Q ¯ P along with H K h 1 and H K h 2 are called a transcript, denoted by τ ¯ = { Q ¯ F , Q ¯ P , ( H K h 1 , H K h 2 ) } . When D interacts with Φ , the transcript τ ¯ is said in the ideal world; otherwise, τ ¯ is said in the real world.
In general, all possible transcripts are divided into bad transcripts and good transcripts. The key to use the H-Coefficient technique is to define bad transcripts in the ideal world with a low proportion. Furthermore, one also needs to show that the probability of any good transcript in the ideal world is close to its probability in the real world. After observing the transcript, the distinguisher will use this information to test whether it is compatible with TPRF H K h 1 , H K h 2 P . Based on this fact, one can briefly interpret how to define bad transcripts by the following example. Assume that there exist ( t , x , y ) Q ¯ F and ( u 1 , v 1 ) , ( u 2 , v 2 ) Q ¯ P such that H K h 1 ( t ) x = u 1 and H K h 2 ( t ) x = v 2 (this event is denoted by Bad 1 ). Then in the real world, one must have y = v 1 u 2 H K h 1 ( t ) H K h 2 ( t ) . However, in the ideal world, the probability that this equation holds is at most 1 / 2 n . In this case, the distinguisher has a significant advantage. If H K h 1 and H K h 2 are independently chosen from the uniform keyed hash family, then one has
Pr [ ( H K h 1 ( t ) = x u 1 ) ( H K h 2 ( t ) = x v 2 ) ] 1 2 2 n .
By union bound, the probability of Bad 1 in the ideal world can be upper bounded by q p 2 / 2 2 n . This advantage is secure roughly up to p = q = O ( 2 2 n / 3 ) adversarial queries. We illustrate some other bad cases for transcript τ ¯ in Figure 1, where (1) in Figure 1 is for the above example.
For any good transcript, to prove that its probability in the real world is almost close to the one in the ideal world, it needs to show that the number of choices for unfixed maps of P is large enough. Let U = { u 1 { 0 , 1 } n : ( u 1 , v 1 ) Q ¯ P } , V = { v 1 { 0 , 1 } n : ( u 1 , v 1 ) Q ¯ P } , U F = { H K h 1 ( t ) x : ( t , x , y ) Q ¯ F } , and V F = { H K h 2 ( t ) x : ( t , x , y ) Q ¯ F } . Then the good transcript ensures that U U F = (resp. V V F = ) and all items in U F (resp. V F ) are distinct. The next goal is to choose distinct values for { P ( H K h 1 ( t ) x ) : ( t , x , y ) Q ¯ F } (resp. { P 1 ( H K h 2 ( t ) x ) : ( t , x , y ) Q ¯ F } ) such that { P ( H K h 1 ( t ) x ) : ( t , x , y ) Q ¯ F } ( V V F ) = , { P ( H K h 1 ( t ) x ) H K h 1 ( t ) H K h 2 ( t ) y : ( t , x , y ) Q ¯ F } ( U U F ) = , and all items in { P ( H K h 1 ( t ) x ) H K h 1 ( t ) H K h 2 ( t ) y : ( t , x , y ) Q ¯ F } are distinct (resp. { P 1 ( H K h 2 ( t ) x ) : ( t , x , y ) Q ¯ F } ( U U F ) = , { P 1 ( H K h 2 ( t ) x ) H K h 1 ( t ) H K h 2 ( t ) y : ( t , x , y ) Q ¯ F } ( V V F ) = , and all items in { P 1 ( H K h 2 ( t ) x ) H K h 1 ( t ) H K h 2 ( t ) y : ( t , x , y ) Q ¯ F } are distinct). However, this strategy is not enough to achieve the BBB security. To deal with this problem, we adopt the main idea in [17,22] to count more possible choices for unfixed maps of P, and this idea allows that { P ( H K h 1 ( t ) x ) : ( t , x , y ) Q ¯ F } V F . Informally, it means that there exist some pairs ( ( t , x , y ) , ( t , x , y ) ) Q ¯ F × Q ¯ F such that P ( x H K h 1 ( t ) ) H K h 1 ( t ) H K h 2 ( t ) y = x H K h 1 ( t ) or P 1 ( x H K h 2 ( t ) ) H K h 1 ( t ) H K h 2 ( t ) y = x H K h 2 ( t ) . Take the first case for example, one has
{ x H K h 1 ( t ) P x H K h 1 ( t ) H K h 1 ( t ) H K h 2 ( t ) y , x H K h 1 ( t ) P x H K h 2 ( t ) , x H K h 2 ( t ) H K h 1 ( t ) H K h 2 ( t ) y P x H K h 2 ( t ) .
To ensure that the maps in (9) are valid, x H K h 1 ( t ) H K h 1 ( t ) H K h 2 ( t ) y can not be equal to previous fixed inputs of P, and x H K h 2 ( t ) H K h 1 ( t ) H K h 2 ( t ) y can not be equal to previous fixed outputs of P. Since Φ is a random function from T × { 0 , 1 } n to { 0 , 1 } n , then y = Φ ( t , x ) is uniformly and independently distributed for each distinct query ( t , x ) in the ideal world. Due to this property, one can define the good transcripts to ensure that the number of rational maps in (9) is large enough. At the same time, it guarantees that the proportion of the corresponding bad transcripts in the ideal world can also achieve a beyond birthday bound. For more details, please refer to Section 4.

1.4. Organization

The rest of this paper is organized as follows. In Section 2, we introduce some necessary notations and basic tools. In Section 3, we prove the multi-key security of SoEM 22 , further tweak the construction SoEM 22 , and finally construct parallelizable nonce based MACs from two permutations. The constructions of beyond-birthday secure PRFs from one permutation in both multi-key and tweakable settings are given in Section 4, and we also design parallelizable nonce based MACs from one permutation in this section. Finally, Section 5 concludes this paper.

2. Preliminaries

2.1. Notations

For any n Z , we simplify the set { 1 , , n } as [ n ] , and denote the set of all n-bit strings by { 0 , 1 } n . For any finite set S , s $ S means that s is sampled uniformly from S . Besides, | S | denotes the size of S. For any sets X and Y , Func ( X , Y ) includes all functions from X to Y , and we simply write Func ( n ) for Func ( { 0 , 1 } n , { 0 , 1 } n ) . Furthermore, Perm ( n ) denotes the set of all permutations on { 0 , 1 } n . For any two integers q and N such that 1 q N , define ( N ) q = N ( N 1 ) ( N q + 1 ) . In particular, ( N ) 0 = 1 .
Q = { ( x 1 , y 1 ) , , ( x p , y p ) } is said a well-defined n-bit permutation-compatible set if x 1 , , x p { 0 , 1 } n (resp. y 1 , , y p { 0 , 1 } n ) are all distinct. Given a well-defined permutation-compatible set Q , we say that the permutation P Perm ( n ) extends Q , denoted by P Q , if P ( x i ) = y i for all i [ p ] . For another well-defined n-bit permutation-compatible set Q = { ( x 1 , y 1 ) , , ( x p , y p ) } , Q and Q are called disjoint if x i x j and y i y j for any i [ p ] and j [ p ] . Given the disjoint n-bit permutation-compatible set Q and Q , for any random permutation P $ Perm ( n ) satisfying P Q , the probability of P Q is 1 / ( 2 n p ) p , which is denoted by
Pr [ P $ Perm ( n ) : P Q | P Q ] = 1 ( 2 n p ) p .
For any function F : D V , given the set S = { ( x 1 , y 1 ) , , ( x q , y q ) : ( x i , y i ) D × V } , F S means that F ( x i ) = y i for any ( x i , y i ) S .
Given two sets U and U , we say that U is disjoint with U if U U = . Let U = { U 1 , , U m } be a collection of finite sets. Then U is called a disjoint collection if for any i j [ m ] , U i is disjoint with U j . In this case, the size of U is defined as | U | = | U 1 | + + | U m | . Two disjoint collections U = { U 1 , , U m } and U = { U 1 , , U n } are called inner disjoint if U i U i = for any i [ m ] , i [ n ] . Let S mul be a multi-set, and let δ S mul ( x ) denote the multiplicity of x in S mul . When S mul is called a set, it means that all the repeated items in it are viewed as a unique item. Throughout this paper, when we discuss the size of S mul , which is denoted by | S mul | , the items in S mul are counted without considering the multiplicity.
Definition 1
(Universal Hash Functions). Let n be a positive integer. Assume that K H and X are two finite sets. Let H = ( H K h ) K h K H be a keyed hash family from X to { 0 , 1 } n , where K H is the hash key space. H is called ϵ 1 -regular if for any t X and any y { 0 , 1 } n , it holds that
Pr [ K h $ K H : H K h ( t ) = y ] ϵ 1 .
H is called ϵ 2 -almost XOR-universal ( ϵ 2 -AXU) if for any distinct t , t X and any y { 0 , 1 } n , it holds that
Pr [ K h $ K H : H K h ( t ) H K h ( t ) = y ] ϵ 2 .
H is said XOR-universal (resp. uniform) if it is 2 n -AXU (resp. 2 n -regular).
Next, we briefly describe an example of l 2 n -regular and l 2 n -AXU keyed hash family [18,23] for some constant l N . Let M be any binary string with | M | < l · n , and set K H = { 0 , 1 } n . Then we pad M as M | | 10 s = M 1 | | | | M l , where s = l · n | M | 1 , 0 s denotes the all zero s bits, and M i { 0 , 1 } n for each i [ l ] . For any K h K H , the keyed hash is defined as:
Poly H K h ( M ) = M l · K h M l 1 · K h 2 M 1 · K h l ,
where K h and M i ( i [ l ] ) are viewed as the elements in F 2 n , and · denotes the multiplication in F 2 n .
Remark 1.
The keyed hash family H is said to be ϵ-3-way regular, if for any y { 0 , 1 } n and any three distinct inputs t, t , and t X , it holds that
Pr [ K h $ K H : H K h ( t ) H K h ( t ) H K h ( t ) = y ] ϵ .

2.2. The H-Coefficient Technique

One important tool used in our proofs is the H-Coefficient technique [21], which can be used to upper bound the statistical distance between the query-answers from two interactive systems. For convenience, we focus on the modernization version of Chen and Steinberger [20].
Let P 1 , , P r $ Perm ( n ) be r independent random permutations, and K be the key space. In this paper, we only consider the case r { 1 , 2 } and K = { 0 , 1 } 2 n . The randomly sampled 2 n -bit key can be parsed as ( K 1 , K 2 ) $ { 0 , 1 } 2 n , where K 1 and K 2 are two independent n-bit uniformly random strings. Then based on r public permutations P 1 , , P r , F K 1 , K 2 P 1 , , P r : { 0 , 1 } n { 0 , 1 } n denotes the keyed function indexed by ( K 1 , K 2 ) { 0 , 1 } 2 n . Besides, let φ $ Func ( n ) be an ideal random function. Then for any deterministic distinguisher D who has query access to the oracle O re = ( F K 1 , K 2 P 1 , , P r ; P 1 ± , , P r ± ) in the real world, or the oracle O id = ( φ ; P 1 ± , , P r ± ) in the ideal world, the advantage of D to distinguish which oracle it has access to is defined by
Adv F ( D ) = | Pr [ D O re = 1 ] Pr [ D O id = 1 ] | .
As shown in Figure 2, in the multi-key setting, the goal of distinguisher D is to distinguish m keyed functions ( F K 1 1 , K 2 1 P 1 , , P r , , F K 1 m , K 2 m P 1 , , P r ) from m independent ideal random functions φ 1 , , φ m $ Func ( n ) , where ( K 1 1 , K 2 1 ) , , ( K 1 m , K 2 m ) $ { 0 , 1 } 2 n are m independent keys. In this case, let O id = ( φ 1 , , φ m ,   P 1 ± , , P r ± ) be the oracle in the ideal world, and O re = ( F K 1 1 , K 2 1 P 1 , , P r , , F K 1 m , K 2 m P 1 , , P r ,   P 1 ± , , P r ± ) be the oracle in the real world. The advantage of the distinguisher D to distinguish these two oracles can be defined as the same in (11), but here we use Adv F K 1 , K 2 P 1 , , P r m k ( D ) to identify the multi-key case.
Let H be an ϵ 1 -regular and ϵ 2 -AXU keyed hash family from T to { 0 , 1 } n . Then we use two independent keyed hash functions ( H K h 1 , H K h 2 ) $ H 2 to tweak the keyed function F K 1 , K 2 P 1 , , P r as TPRF H K h 1 , H K h 2 P 1 , , P r : T × { 0 , 1 } n { 0 , 1 } n such that TPRF H K h 1 , H K h 2 P 1 , , P r ( t , x ) = F ( H K h 1 ( t ) , H K h 2 ( t ) ) P 1 , , P r ( x ) . In addition, the ideal tweakable random function can be denoted as Φ : T × { 0 , 1 } n { 0 , 1 } n , i.e., Φ $ Func ( T × { 0 , 1 } n , { 0 , 1 } n ) . In this case, let O re = ( TPRF H K 1 , H K 2 P 1 , , P r ,   P 1 ± , , P r ± ) be the oracle in the real world, and O id = ( Φ ,   P 1 ± , , P r ± ) be the oracle in the ideal world. For any distinguisher D , its advantage can be defined as the same in (11), but here we use Adv TPRF H K h 1 , H K h 2 P 1 , , P r t w e a k ( D ) to identify the tweakable case.
The security proofs in both multi-key and tweakable settings are similar. Therefore, we prove these two cases in a unified approach. For two independently and randomly sampled functions f 1 and f 2 from Func ( T , { 0 , 1 } n ) , ( f 1 , f 2 ) is said a good ( ϵ 1 , ϵ 2 ) -key-derivation pair if it satisfies two properties in the following:
(i)
ϵ 1 - Regular . For any t T and any y { 0 , 1 } n , it holds that
Pr [ f i ( t ) = y ] ϵ 1 , for i { 1 , 2 } .
(ii)
ϵ 2 - AXU . For any distinct t , t T and any y { 0 , 1 } n , it holds that
Pr [ f i ( t ) f i ( t ) = y ] ϵ 2 , for i { 1 , 2 } .
The above two properties are enough for the security proofs in both tweakable and multi-key settings. In the tweakable setting, ( H K h 1 , H K h 2 ) is a good ( ϵ 1 , ϵ 2 ) -key-derivation pair, where ( H K h 1 ,   H K h 2 ) $ H 2 . In the multi-key setting, set T = [ m ] , and uniformly and randomly sample two independent random functions f 1 , f 2 $ Func ( T , { 0 , 1 } n ) . Then ( f 1 , f 2 ) is a good ( 2 n , 2 n ) -key-derivation pair. To show the security of the constructions in both tweakable and multi-key settings, we only need to prove the BBB security of the following “unified” function
F f 1 , f 2 P 1 , , P r : T × { 0 , 1 } n { 0 , 1 } n ,
where ( f 1 , f 2 ) is a good ( ϵ 1 , ϵ 2 ) -key-derivation pair and P 1 , , P r ( r { 1 , 2 } ) are r independent random permutations. In this case, let O re = ( F f 1 , f 2 P 1 , , P r ,   P 1 ± , , P r ± ) be the oracle in the real world, and O id = ( Φ , P 1 ± , , P r ± ) be the oracle in the ideal world, where Φ $ Func ( T × { 0 , 1 } n , { 0 , 1 } n ) . When the distinguisher D interactes with O re or O id , any query-responses along with the good ( ϵ 1 , ϵ 2 ) -key-derivation pair ( f 1 , f 2 ) Func ( T , { 0 , 1 } n ) 2 are called a transcript, denoted by τ = ( Q F , Q P 1 , , Q P r , ( f 1 , f 2 ) ) . In addition, Q F (resp. Q P i , for 1 i r ) records query-responses when the distinguisher D interacts with the construction oracle (resp. the primitive oracle P i for 1 i r ). Furthermore, T re (resp. T id ) denotes the probability distribution of the interacting transcripts between D and O re (resp. O id ). A transcript τ is said attainable if Pr [ T id = τ ] > 0 . Finally, the advantage of the distinguisher D , to distinguish which oracle it has access to, can be defined as the same in (11), but here we use Adv F f 1 , f 2 P 1 , , P r u n i f y ( D ) to identify this unified description.
Let Γ = Γ good Γ bad be a partition for the set Γ consisting of all attainable transcripts, where Γ good (resp. Γ bad ) contains all “good” (resp. “bad”) transcripts. Then the main result of the H-Coefficient technique can be described as the following lemma.
Lemma 1
(H-Coefficient Technique [20,21]). Let D be a deterministic distinguisher, and T re (resp. T id ) be the probability distribution of transcripts in the real world (resp. in the ideal world). Let Γ good and Γ bad be defined above. Assume that there exists 0 ϵ ratio 1 such that for any τ Γ good , it holds that
Pr [ T re = τ ] Pr [ T id = τ ] 1 ϵ ratio .
Then, Adv F f 1 , f 2 P 1 , , P r u n i f y ( D ) ϵ ratio + Pr [ T id Γ bad ] .

2.3. Useful Tools

Assume that there are g “rational” items in an N-size set S. When one samples s items from S without replacement, H denotes the random variable which counts the number of “rational” items among these s items. Then we say that H follows the hypergeometric distribution with parameters N, s , and g , denoted by H Hyp N , s , g . For 0 α g , one has
Pr [ H = α ] = g α · N g s α N s .
In addition, the expectation value of H is s g / N , i.e., E ( H ) = s g / N .
The following lemma is useful in our proofs.
Lemma 2.
Let A, B, C, and N be positive integers satisfying A + B N / 2 and A + C N / 2 . Then we have
j = 0 A 1 N ( N B C 2 j ) ( N B j ) ( N C j ) 1 4 A ( A + B ) ( A + C ) N 2 .
Proof. 
j = 0 A 1 N ( N B C 2 j ) ( N B j ) ( N C j ) = j = 0 A 1 ( N B j ) ( N C j ) ( B + j ) ( C + j ) ( N B j ) ( N C j ) = j = 0 A 1 1 ( B + j ) ( C + j ) ( N B j ) ( N C j ) j = 0 A 1 1 ( B + A ) ( C + A ) ( N B A ) ( N C A ) ( * ) j = 0 A 1 1 4 ( B + A ) ( C + A ) N 2 1 4 A ( B + A ) ( C + A ) N 2 ,
where ( * ) holds since A + B N / 2 and A + C N / 2 .  □

3. Multi-Key and Tweakable Secure PRFs from Two Random Permutations

In this section, we prove that the construction SoEM 22 from two random permutations P 1 , P 2 $ Perm ( n ) in [15], namely
F K 1 , K 2 P 1 , P 2 ( x ) = P 1 ( x K 1 ) P 2 ( x K 2 ) K 1 K 2 ,
is beyond-birthday secure in the multi-key setting, where ( K 1 , K 2 ) $ { 0 , 1 } 2 n and x { 0 , 1 } n .
Let H be an ϵ 1 -regular and ϵ 2 -AXU keyed hash family from T to { 0 , 1 } n . Then we can tweak SoEM 22 as
TPRF H K h 1 , H K h 2 P 1 , P 2 ( t , x ) = P 1 ( x H K h 1 ( t ) ) P 2 ( x H K h 2 ( t ) ) H K h 1 ( t ) H K h 2 ( t ) ,
where t T , x { 0 , 1 } n , and ( H K h 1 , H K h 2 ) $ H 2 .
To show the security of SoEM 22 in both multi-key and tweakable settings above, we only need to prove the BBB security of the following “unified” function
F f 1 , f 2 P 1 , P 2 ( t , x ) = P 1 ( x f 1 ( t ) ) P 2 ( x f 2 ( t ) ) f 1 ( t ) f 2 ( t ) ,
where P 1 , P 2 $ Perm ( n ) , ( f 1 , f 2 ) Func ( T , { 0 , 1 } n ) 2 is a good ( ϵ 1 , ϵ 2 ) -key-derivation pair, t T , and x { 0 , 1 } n .
Theorem 1.
Let n N , and ( f 1 , f 2 ) Func ( T , { 0 , 1 } n ) 2 be a good ( ϵ 1 , ϵ 2 ) -key-derivation pair. Consider the function F f 1 , f 2 P 1 , P 2 : T × { 0 , 1 } n { 0 , 1 } n defined in (14) based on two random permutations P 1 , P 2 $ Perm ( n ) . For any deterministic distinguisher D making at most p 1 queries to P 1 , p 2 queries to P 2 , and q queries to construction oracle F f 1 , f 2 P 1 , P 2 or Φ such that p 1 + p 2 + 3 q 2 n 1 , we have
Adv F f 1 , f 2 P 1 , P 2 u n i f y ( D ) 3 q p 1 p 2 ϵ 1 2 + ϵ 1 ( ϵ 2 q 2 + 2 q ) ( p 1 + p 2 ) 2 + 2 ϵ 2 2 q 3 + ϵ 2 q 3 / 2 + 4 q ( p 1 + p 2 + 2 q ) 2 2 2 n + 2 q ( p 1 + p 2 ) 2 n + 11 q 2 n .
In the multi-key setting, one sets T = [ m ] corresponding to m independent random keys, and randomly samples two independent random functions f 1 , f 2 $ Func ( [ m ] , { 0 , 1 } n ) . Then we can easily conclude that ( f 1 , f 2 ) is a good ( 2 n , 2 n ) -key-derivation pair. By this fact, one can obtain the following corollary.
Corollary 1.
Let n , m N . Consider the keyed function F K 1 , K 2 P 1 , P 2 : { 0 , 1 } n { 0 , 1 } n defined in (12) based on two random permutations P 1 , P 2 $ Perm ( n ) . For any deterministic distinguisher D making at most p 1 queries to P 1 , p 2 queries to P 2 , and totally q queries to F K 1 1 , K 2 1 P 1 , P 2 , , F K 1 m , K 2 m P 1 , P 2 (resp. m independent ideal random functions φ 1 , , φ m ) such that p 1 + p 2 + 3 q 2 n 1 , we have
Adv F K 1 , K 2 P 1 , P 2 m k ( D ) 3 p 1 p 2 q 2 2 n + q 2 ( p 1 + p 2 ) 2 2 n + 1 + 2 q 3 2 2 n + q 3 / 2 2 n + 4 q ( p 1 + p 2 + 2 q ) 2 2 2 n + 3 q ( p 1 + p 2 ) 2 n + 11 q 2 n .
Corollary 1 shows that the construction SoEM 22 in (12) is secure roughly up to p 1 = p 2 = q = O ( 2 2 n / 3 ) adversarial queries in the multi-key setting.
Similarly, given an ϵ 1 -regular and ϵ 2 -AXU keyed hash family H from T to { 0 , 1 } n , one can obtain a good ( ϵ 1 , ϵ 2 ) -key-derivation pair ( H K h 1 , H K h 2 ) for ( H K h 1 , H K h 2 ) $ H 2 , and finally conclude the following corollary.
Corollary 2.
Let n N , and H be an ϵ 1 -regular and ϵ 2 -AXU keyed hash family from T to { 0 , 1 } n . Consider the tweakable function TPRF H K h 1 , H K h 2 P 1 , P 2 : T × { 0 , 1 } n { 0 , 1 } n defined in (13) from two random permutations P 1 , P 2 $ Perm ( n ) . For any deterministic distinguisher D making at most p 1 queries to P 1 , p 2 queries to P 2 , and q queries to TPRF H K h 1 , H K h 2 P 1 , P 2 or Φ such that p 1 + p 2 + 3 q 2 n 1 , we have
Adv TPRF H K h 1 , H K h 2 P 1 , P 2 t w e a k ( D ) 3 q p 1 p 2 ϵ 1 2 + ϵ 1 ( ϵ 2 q 2 + 2 q ) ( p 1 + p 2 ) 2 + 2 ϵ 2 2 q 3 + ϵ 2 q 3 / 2 + 4 q ( p 1 + p 2 + 2 q ) 2 2 2 n + 2 q ( p 1 + p 2 ) 2 n + 11 q 2 n .
Assume that H is uniform (i.e., 2 n -regular) and XOR-universal (i.e., 2 n -AXU). Then Corollary 2 shows that TPRF H K h 1 , H K h 2 P 1 , P 2 in Equation (13) is secure roughly up to p 1 = p 2 = q = O ( 2 2 n / 3 ) adversarial queries. This means that TPRF H K h 1 , H K h 2 P 1 , P 2 is a beyond-birthday secure tweakable PRF.
Finally, let M denote a message space. Given an ϵ 1 -regular and ϵ 2 -AXU keyed hash family H from M to { 0 , 1 } n , we can construct a nonce based MAC (denoted by Sum 2 PMAC ), from two random permutations P 1 , P 2 $ Perm ( n ) and H , as
T = P 1 ( N H K h 1 ( M ) ) P 2 ( N H K h 2 ( M ) ) H K h 1 ( M ) H K h 2 ( M ) ,
where ( H K h 1 , H K h 2 ) $ H 2 , M M is message, and N { 0 , 1 } n is a nonce. Due to assumption of H , when we set T = M , then ( H K h 1 , H K h 2 ) is a good ( ϵ 1 , ϵ 2 ) -key-derivation pair. Therefore, the following corollary holds.
Corollary 3.
Let n N , and M be a message space. Let H be an ϵ 1 -regular and ϵ 2 -AXU keyed hash family from M to { 0 , 1 } n . Consider the nonce based MAC Sum 2 PMAC defined in (18) from two random permutations P 1 , P 2 $ Perm ( n ) . For any deterministic distinguisher D making at most p 1 queries to P 1 , p 2 queries to P 2 , and q evaluation queries, we have
Adv Sum 2 PMAC prf ( D ) 3 q p 1 p 2 ϵ 1 2 + ϵ 1 ( ϵ 2 q 2 + 2 q ) ( p 1 + p 2 ) 2 + 2 ϵ 2 2 q 3 + ϵ 2 q 3 / 2 + 4 q ( p 1 + p 2 + 2 q ) 2 2 2 n + 2 q ( p 1 + p 2 ) 2 n + 11 q 2 n .
Assume that for any message M M , one has | M | < n · l for some integer l N . Then the keyed hash family from M to { 0 , 1 } n can be instantiated by the Poly H K h defined in (10), which is l 2 n -regular and l 2 n -AXU. In this case, when one sets p 1 = p 2 = q , then Adv Sum 2 PMAC prf ( D ) in (19) can be bounded as
( 6 l 2 + 64 ) q 3 2 2 n + ( 3 l + 4 ) q 3 / 2 2 n + 11 q 2 n .
If l is a constant, then Sum 2 PMAC is a beyond-birthday secure MAC.
Proof of Theorem 1.
For convenience, we follow some notations in [16,17] in this proof. Let τ = ( Q F , Q P 1 , Q P 2 , ( f 1 , f 2 ) ) be an attainable transcript, where | Q F | = q , | Q P 1 | = p 1 , and | Q P 2 | = p 2 . In addition, we write these sets more clearly as:
Q F = { ( t 1 , x 1 , y 1 ) , , ( t q , x q , y q ) } , Q P 1 = { ( u 1 , 1 , v 1 , 1 ) , , ( u 1 , p 1 , v 1 , p 1 ) } , Q P 2 = { ( u 2 , 1 , v 2 , 1 ) , , ( u 2 , p 2 , v 2 , p 2 ) } .
We denote
U 1 = { u 1 { 0 , 1 } n : ( u 1 , v 1 ) Q P 1 } , V 1 = { v 1 { 0 , 1 } n : ( u 1 , v 1 ) Q P 1 } ,
and
U 2 = { u 2 { 0 , 1 } n : ( u 2 , v 2 ) Q P 2 } , V 2 = { v 2 { 0 , 1 } n : ( u 2 , v 2 ) Q P 2 } .
For each u { 0 , 1 } n , two associated sets can be defined as:
X u 1 = { ( t , x , y ) Q F : x f 1 ( t ) = u } , X u 2 = { ( t , x , y ) Q F : x f 2 ( t ) = u } .
Now we define four parameters for transcript τ = ( Q F , Q P 1 , Q P 2 , ( f 1 , f 2 ) ) as
α 1 = d e f | { ( t , x , y ) Q F : x f 1 ( t ) U 1 } | , α 2 = d e f | { ( t , x , y ) Q F : x f 2 ( t ) U 2 } | , β 1 = d e f | { ( t , x , y ) Q F : ( t , x , y ) ( t , x , y ) , x f 1 ( t ) = x f 1 ( t ) } | , β 2 = d e f | { ( t , x , y ) Q F : ( t , x , y ) ( t , x , y ) , x f 2 ( t ) = x f 2 ( t ) } | .
β 1 and β 2 can be also expressed as
β 1 = x { 0 , 1 } n : δ D 1 ( x ) > 1 δ D 1 ( x ) , β 2 = x { 0 , 1 } n : δ D 2 ( x ) > 1 δ D 2 ( x ) ,
where D 1 = { x f 1 ( t ) : ( t , x , y ) Q F } and D 2 = { x f 2 ( t ) : ( t , x , y ) Q F } .
An attainable transcript τ = ( Q F , Q P 1 , Q P 2 , ( f 1 , f 2 ) ) is said bad if any one of the following conditions is satisfied:
  • (B-1): i [ q ] , j [ p 1 ] , j [ p 2 ] for ( t i , x i , y i ) Q F , u 1 , j U 1 , and u 2 , j U 2 such that x i f 1 ( t i ) = u 1 , j and x i f 2 ( t i ) = u 2 , j .
  • (B-2): i [ q ] , j [ p 1 ] , j [ p 2 ] for ( t i , x i , y i ) Q F , ( u 1 , j , v 1 , j ) Q P 1 , and v 2 , j V 2 such that x i f 1 ( t i ) = u 1 , j and v 1 , j f 1 ( t i ) f 2 ( t i ) y i = v 2 , j .
  • (B-3): i [ q ] , j [ p 1 ] , j [ p 2 ] for ( t i , x i , y i ) Q F , v 1 , j V 1 , and ( u 2 , j , v 2 , j ) Q P 2 such that x i f 2 ( t i ) = u 2 , j and v 2 , j f 1 ( t i ) f 2 ( t i ) y i = v 1 , j .
  • (B-4): i , i [ q ] for ( t i , x i , y i ) ( t i , x i , y i ) Q F such that x i f 1 ( t i ) = x i f 1 ( t i ) and y i f 1 ( t i ) f 2 ( t i ) = y i f 1 ( t i ) f 2 ( t i ) .
  • (B-5): i , i [ q ] for ( t i , x i , y i ) ( t i , x i , y i ) Q F such that x i f 2 ( t i ) = x i f 2 ( t i ) and y i f 1 ( t i ) f 2 ( t i ) = y i f 1 ( t i ) f 2 ( t i ) .
  • (B-6): i , i [ q ] , j [ p 1 ] for ( t i , x i , y i ) ( t i , x i , y i ) Q F , and u 1 , j U 1 such that x i f 1 ( t i ) = u 1 , j and x i f 2 ( t i ) = x i f 2 ( t i ) .
  • (B-7): i , i [ q ] , j [ p 2 ] for ( t i , x i , y i ) ( t i , x i , y i ) Q F , and u 2 , j U 2 such that x i f 2 ( t i ) = u 2 , j and x i f 1 ( t i ) = x i f 1 ( t i ) .
  • (B-8): i , i , i [ q ] for distinct tuples ( t i , x i , y i ) , ( t i , x i , y i ) , ( t i , x i , y i ) Q F , such that x i f 1 ( t i ) = x i f 1 ( t i ) and x i f 2 ( t i ) = x i f 2 ( t i ) .
  • (B-9): i , i [ q ] , j , j [ p 1 ] for ( t i , x i , y i ) , ( t i , x i , y i ) Q F and ( u 1 , j , v 1 , j ) , ( u 1 , j , v 1 , j ) Q P 1 such that x i f 1 ( t i ) = u 1 , j , x i f 1 ( t i ) = u 1 , j , and f 1 ( t i ) f 2 ( t i ) v 1 , j y i = f 1 ( t i ) f 2 ( t i ) v 1 , j y i .
  • (B-10): i , i [ q ] , j , j [ p 2 ] for ( t i , x i , y i ) , ( t i , x i , y i ) Q F and ( u 2 , j , v 2 , j ) , ( u 2 , j , v 2 , j ) Q P 2 such that x i f 2 ( t i ) = u 2 , j , x i f 2 ( t i ) = u 2 , j , and f 1 ( t i ) f 2 ( t i ) v 2 , j y i = f 1 ( t i ) f 2 ( t i ) v 2 , j y i .
  • (B-11): α 1 q .
  • (B-12): α 2 q .
  • (B-13): β 1 q or β 2 q .
Otherwise, we call τ a good transcript.

3.1. Analysis of Bad Transcripts

The proportion of all bad transcripts in the ideal world is upper bounded by the following lemma.
Lemma 3.
Let T id be the probability distribution of transcript τ = ( Q F , Q P 1 , Q P 2 ,   ( f 1 , f 2 ) ) in the ideal world, where | Q P 1 | = p 1 , | Q P 2 | = p 2 , | Q F | = q , and ( f 1 , f 2 ) is a good ( ϵ 1 , ϵ 2 ) -key-derivation pair. Then we have
Pr [ T id Γ bad ] 3 q p 1 p 2 ϵ 1 2 + ϵ 1 ( ϵ 2 q 2 + 2 q ) ( p 1 + p 2 ) 2 + 2 ϵ 2 2 q 3 + q 2 n + ϵ 2 q 3 / 2 .
Proof. 
Here we assume that there exists no repeated items in Q P 1 , Q P 2 , and Q F w.l.o.g. Then for each distinct construction query ( t , x , y ) Q F , y is sampled uniformly and independently from { 0 , 1 } n in the ideal world. For each i [ 13 ] , the set of all transcripts satisfying (B-i) is denoted by Γ i . By union bound, one has
Pr [ T id Γ bad ] i = 1 13 Pr [ T id Γ i ] .
For each i [ 13 ] , the way to upper bound Pr [ T id Γ i ] is similar to that in [16,17,22]. Hence, we give the details in Appendix A. By combining these upper bounds together, the proof of Lemma 3 is finished.  □

3.2. Analysis of Good Transcripts

In Lemma 4, we show that the probability of any good transcript τ in the real world is close to its probability in the ideal world.
Lemma 4.
Let T id be the probability distribution of transcripts in the ideal world, and T re be the probability distribution in the real world. Then for any good transcript τ = ( Q F , Q P 1 , Q P 2 , ( f 1 , f 2 ) ) with parameters p 1 , p 2 , and q satisfying p 1 + p 2 + 3 q 2 n 1 , one has
Pr [ T re = τ ] Pr [ T id = τ ] 1 4 q ( p 1 + p 2 + 2 q ) 2 2 2 n 2 q ( p 1 + p 2 ) 2 n 10 q 2 n .
Proof. 
Given a good transcript τ , we define the following probability
p ( τ ) = def Pr [ P 1 , P 2 $ Perm ( n ) : F f 1 , f 2 P 1 , P 2 Q F | P 1 Q P 1 P 2 Q P 2 ] .
By a simple combinatorial argument, we have
Pr [ T re = τ ] Pr [ T id = τ ] = 2 n q p ( τ ) .
The next goal is to lower bound p ( τ ) . For convenience, define five subsets of Q F as follows:
Q U 1 = { ( t , x , y ) Q F : x f 1 ( t ) U 1 } , Q U 2 = { ( t , x , y ) Q F : x f 2 ( t ) U 2 } , Q X 1 = { ( t , x , y ) Q F : δ D 1 ( x f 1 ( t ) ) > 1 and x f 1 ( t ) U 1 } , Q X 2 = { ( t , x , y ) Q F : δ D 2 ( x f 2 ( t ) ) > 1 and x f 2 ( t ) U 2 } , Q 0 = { ( t , x , y ) Q F : δ D 1 ( x h 1 ( t ) ) = δ D 2 ( x f 2 ( t ) ) = 1 , x f 1 ( t ) U 1 , and x f 2 ( t ) U 2 } .
Note that | Q U 1 | = α 1 and | Q U 2 | = α 2 . The following proposition tells us that these sets form a partition of Q F .
Proposition 1.
Let τ Γ good be a good transcript. Then the sets ( Q U 1 , Q U 2 , Q X 1 , Q X 2 , Q 0 ) defined above are pairwise disjoint.
Proof. 
By definition, we have Q U 1 Q X 1 = , Q U 2 Q X 2 = , and Q U 1 Q 0 = Q U 2 Q 0 = Q X 1 Q 0 = Q X 2 Q 0 = . Since τ does not satisfy (B-1), we have Q U 1 Q U 2 = . Moreover, Q U 1 Q X 2 = (resp. Q U 2 Q X 1 = ) since τ does not satisfy (B-6) (resp. (B-7)). Finally, Q X 1 Q X 2 = holds due to the fact τ Γ 8 .  □
We use E U 1 , E U 2 , E X 1 , E X 2 , and E 0 to denote the events that F f 1 , f 2 P 1 , P 2 Q U 1 , Q U 2 , Q X 1 , Q X 2 , and Q 0 , respectively. Then F f 1 , f 2 P 1 , P 2 Q F is equivalent to E U 1 E U 2 E X 1 E X 2 E 0 . Hence, it holds that
p ( τ ) = Pr [ F f 1 , f 2 P 1 , P 2 Q F | P i Q P i , i = 1 , 2 ] = Pr [ E U 1 E U 2 E X 1 E X 2 E 0 | P i Q P i , i = 1 , 2 ] = p ( τ ) p ( τ ) ,
where
p ( τ ) = Pr [ E U 1 E U 2 | P i Q P i , i = 1 , 2 ] ,
and
p ( τ ) = Pr [ E X 1 E X 2 E 0 | E U 1 E U 2 ( P i Q P i , i = 1 , 2 ) ] .
The way to compute p ( τ ) and p ( τ ) , and the way to lower bound Pr [ T re = τ ] Pr [ T id = τ ] are similar to those in [16] so that we show the details in Appendix B.  □
Finally, by Lemmas 1, 3, and 4, Theorem 1 can be proved.  □

4. Multi-Key and Tweakable Secure PRFs from One Random Permutation

In this section, we first use one bidirectionally efficient random permutation P $ Perm ( n ) to construct beyond-birthday and multi-key secure PRFs with a parallelizable structure as
F K 1 , K 2 P ( x ) = P ( x K 1 ) P 1 ( x K 2 ) K 1 K 2
where ( K 1 , K 2 ) $ { 0 , 1 } 2 n is the key and x { 0 , 1 } n is the input.
Let H be an ϵ 1 -regular and ϵ 2 -AXU keyed hash family from T to { 0 , 1 } n . Then we can tweak the construction F K 1 , K 2 P in Equation (22) as
TPRF H K h 1 , H K h 2 P ( t , x ) = P ( x H K h 1 ( t ) ) P 1 ( x H K h 2 ( t ) ) H K h 1 ( t ) H K h 2 ( t ) ,
where ( H K h 1 , H K h 2 ) $ H 2 , t T , and x { 0 , 1 } n .
As mentioned before, one can simultaneously show that the above two constructions are beyond-birthday secure in the multi-key and the tweakable settings by proving the BBB security of the “unified”function,
F f 1 , f 2 P ( t , x ) = P ( x f 1 ( t ) ) P 1 ( x f 2 ( t ) ) f 1 ( t ) f 2 ( t ) ,
where ( f 1 , f 2 ) Func ( T , { 0 , 1 } n ) 2 is a good ( ϵ 1 , ϵ 2 ) -key-derivation pair, P $ Perm ( n ) , t T , and x { 0 , 1 } n .
Theorem 2.
Assume that n 6 and q 64 are two positive integers. Let ( f 1 , f 2 ) Func ( T , { 0 , 1 } n ) 2 be a good ( ϵ 1 , ϵ 2 ) -key-derivation pair, and P $ Perm ( n ) be a random permutation. Consider the function F f 1 , f 2 P : T × { 0 , 1 } n { 0 , 1 } n defined in Equation (24). For any deterministic distinguisher D making at most p queries to P and q queries to the construction oracle F f 1 , f 2 P or Φ such that p + 2 q + 6 q 2 n 1 , one has
Adv F f 1 , f 2 P u n i f y ( D ) ( 3 q p 2 + 2 q 2 p ) ϵ 1 2 + 2 q 3 ϵ 2 2 + 2 q 2 p ϵ 1 ϵ 2 + q 3 / 2 ϵ 2 + 2 p q ϵ 1 + 12 q 2 2 n / 3 + 4 q ( p + 2 q + 6 q ) 2 + q 3 2 2 n + 18 q 3 / 2 + 6 p q + 9 q 2 n + 16 q 2 n / 3 .
Same to Corollary 1, the following corollary holds.
Corollary 4.
Assume n 6 and q 64 are two positive integers. Let P $ Perm ( n ) be an n-bit random permutation. Consider the keyed function F K 1 , K 2 P : { 0 , 1 } n { 0 , 1 } n defined in (22). For any deterministic distinguisher D making at most p queries to P and at most totally q queries to F K 1 1 , K 2 1 P , , F K 1 m , K 2 m P (resp. m independent ideal random functions φ 1 , , φ m ) satisfying p + 2 q + 6 q 2 n 1 , we have
Adv F K 1 , K 2 P m k ( D ) 4 q ( p + 2 q + 6 q ) 2 2 2 n + 3 q 3 + 3 q p 2 + 4 p q 2 2 2 n + 19 q 3 / 2 + 8 p q + 9 q 2 n + 16 q 2 n / 3 + 12 q 2 2 n / 3 .
Similarly, given an ϵ 1 -regular and ϵ 2 -AXU keyed hash family H from T to { 0 , 1 } n , the following corollary holds.
Corollary 5.
Assume n 6 and q 64 . Let H be an ϵ 1 -regular and ϵ 2 -AXU keyed hash family from T to { 0 , 1 } n , and P $ Perm ( n ) be an n-bit random permutation. Consider the tweakable function TPRF H K h 1 , H K h 2 P : T × { 0 , 1 } n { 0 , 1 } n defined in (23). For any deterministic distinguisher D making at most p queries to P and q queries to TPRF H K h 1 , H K h 2 P or Φ such that p + 2 q + 6 q 2 n 1 , we have
Adv TPRF H K h 1 , H K h 2 P t w e a k ( D ) ( 3 q p 2 + 2 q 2 p ) ϵ 1 2 + 2 q 3 ϵ 2 2 + 2 q 2 p ϵ 1 ϵ 2 + q 3 / 2 ϵ 2 + 2 p q ϵ 1 + 12 q 2 2 n / 3 + 4 q ( p + 2 q + 6 q ) 2 + q 3 2 2 n + 18 q 3 / 2 + 6 p q + 9 q 2 n + 16 q 2 n / 3 .
Denote M as a message space. Let H be an ϵ 1 -regular and ϵ 2 -AXU keyed hash family from M to { 0 , 1 } n . Then we can construct a nonce based MAC denoted by Sum 1 PMAC , from one random permutation P $ Perm ( n ) as
T = P ( N H K h 1 ( M ) ) P 1 ( N H K h 2 ( M ) ) H K h 1 ( M ) H K h 2 ( M ) ,
where ( H K h 1 , H K h 2 ) $ H 2 , M M is message, and N { 0 , 1 } n is a nonce. In this case, ( H K h 1 , H K h 2 ) is a good ( ϵ 1 , ϵ 2 ) -key-derivation pair, and we can obtain the following corollary.
Corollary 6.
Assume n 3 and q 64 . Let H be an ϵ 1 -regular and ϵ 2 -AXU keyed hash family from M to { 0 , 1 } n . Consider the nonce based MAC Sum 1 PMAC defined in (28) based on a random permutation P $ Perm ( n ) and H . For any deterministic distinguisher D making at most p queries to P and q evaluation queries, we have
Adv Sum 1 PMAC prf ( D ) ( 3 q p 2 + 2 q 2 p ) ϵ 1 2 + 2 q 3 ϵ 2 2 + 2 q 2 p ϵ 1 ϵ 2 + q 3 / 2 ϵ 2 + 2 p q ϵ 1 + 12 q 2 2 n / 3 + 4 q ( p + 2 q + 6 q ) 2 + q 3 2 2 n + 18 q 3 / 2 + 6 p q + 9 q 2 n + 16 q 2 n / 3 .
Let M denote a message space, where for some l N , | M | < n · l holds for each message M M . Then, the keyed hash family from M to { 0 , 1 } n can be instantiated by the Poly H K h defined in (10), which is l 2 n -regular and l 2 n -AXU. In this setting, when l is set to a constant, then Sum 1 PMAC is a beyond-birthday secure MAC.
Proof of Theorem 2.
In this proof, we follow some notations in [16,17] for convenience. Let τ ¯ = ( Q ¯ F , Q ¯ P , ( f 1 , f 2 ) ) be an attainable transcript with | Q ¯ F | = q and | Q ¯ P | = p . We write these sets more clearly as follows:
Q ¯ F = { ( t 1 , x 1 , y 1 ) , , ( t q , x q , y q ) } , Q ¯ P = { ( u 1 , v 1 ) , , ( u p , v p ) } .
We also denote
U = { u 1 { 0 , 1 } n : ( u 1 , v 1 ) Q ¯ P } and V = { v 1 { 0 , 1 } n : ( u 1 , v 1 ) Q ¯ P }
as domain and range of Q ¯ P respectively. For each u { 0 , 1 } n , two associated sets can be defined as:
X ¯ u 1 = { ( t , x , y ) Q ¯ F : x f 1 ( t ) = u } and X ¯ u 2 = { ( t , x , y ) Q ¯ F : x f 2 ( t ) = u } .
Now we define four parameters for transcript τ ¯ = ( Q ¯ F , Q ¯ P , ( f 1 , f 2 ) ) as
α ¯ 1 = d e f | { ( t , x , y ) Q ¯ F : x f 1 ( t ) U } | , α ¯ 2 = d e f | { ( t , x , y ) Q ¯ F : x f 2 ( t ) V } | , β ¯ 1 = d e f | { ( t , x , y ) Q ¯ F : ( t , x , y ) ( t , x , y ) , x f 1 ( t ) = x f 1 ( t ) } | , β ¯ 2 = d e f | { ( t , x , y ) Q ¯ F : ( t , x , y ) ( t , x , y ) , x f 2 ( t ) = x f 2 ( t ) } | ,
where β ¯ 1 and β ¯ 2 can be also expressed as
β ¯ 1 = x { 0 , 1 } n : δ D ¯ 1 ( x ) > 1 δ D ¯ 1 ( x ) and β ¯ 2 = x { 0 , 1 } n : δ D ¯ 2 ( x ) > 1 δ D ¯ 2 ( x ) ,
where D ¯ 1 = { x f 1 ( t ) : ( t , x , y ) Q ¯ F } and D ¯ 2 = { x f 2 ( t ) : ( t , x , y ) Q ¯ F } .
An attainable transcript τ ¯ = ( Q ¯ F , Q ¯ P , ( f 1 , f 2 ) ) is said bad if any one of the following conditions is satisfied:
  • (C-1): i [ q ] and j , j [ p ] for ( t i , x i , y i ) Q ¯ F , u j U , and v j V such that x i f 1 ( t i ) = u j and x i f 2 ( t i ) = v j .
  • (C-2): i [ q ] and j , j [ p ] for ( t i , x i , y i ) Q ¯ F , ( u j , v j ) Q ¯ P , and u j U such that x i f 1 ( t i ) = u j and v j f 1 ( t i ) f 2 ( t i ) y i = u j .
  • (C-3): i [ q ] and j , j [ p ] for ( t i , x i , y i ) Q ¯ F , ( u j , v j ) Q ¯ P , and v j V such that x i f 2 ( t i ) = v j and u j f 1 ( t i ) f 2 ( t i ) y i = v j .
  • (C-4): i , i [ q ] and j [ p ] for ( t i , x i , y i ) ( t i , x i , y i ) Q ¯ F and ( u j , v j ) Q ¯ P such that x i f 1 ( t i ) = u j and v j f 1 ( t i ) f 2 ( t i ) y i = x i f 1 ( t i ) .
  • (C-5): i , i [ q ] and j [ p ] for ( t i , x i , y i ) ( t i , x i , y i ) Q ¯ F and ( u j , v j ) Q ¯ P such that x i f 2 ( t i ) = v j and u j f 1 ( t i ) f 2 ( t i ) y i = x i f 2 ( t i ) .
  • (C-6): i , i [ q ] and j [ p ] for ( t i , x i , y i ) ( t i , x i , y i ) Q ¯ F and u j U such that x i f 1 ( t i ) = u j and x i f 2 ( t i ) = x i f 2 ( t i ) .
  • (C-7): i , i [ q ] and j [ p ] for ( t i , x i , y i ) ( t i , x i , y i ) Q ¯ F and v j V such that x i f 2 ( t i ) = v j and x i f 1 ( t i ) = x i f 1 ( t i ) .
  • (C-8): i , i [ q ] for ( t i , x i , y i ) ( t i , x i , y i ) Q ¯ F such that x i f 1 ( t i ) = x i f 1 ( t i ) and f 1 ( t i ) f 2 ( t i ) y i = f 1 ( t i ) f 2 ( t i ) y i .
  • (C-9): i , i [ q ] for ( t i , x i , y i ) ( t i , x i , y i ) Q ¯ F such that x i f 2 ( t i ) = x i f 2 ( t i ) and f 1 ( t i ) f 2 ( t i ) y i = f 1 ( t i ) f 2 ( t i ) y i .
  • (C-10): i , i , and i [ q ] for pairwise distinct ( t i , x i , y i ) , ( t i , x i , y i ) , and ( t i , x i , y i ) Q ¯ F such that x i f 1 ( t i ) = x i f 1 ( t i ) and x i f 2 ( t i ) = x i f 2 ( t i ) .
  • (C-11): i , i [ p ] and j , j [ p ] for ( t i , x i , y i ) ( t i , x i , y i ) Q ¯ F and ( u j , v j ) , ( u j , v j ) Q ¯ P such that x i f 1 ( t i ) = u j , x i f 1 ( t i ) = u j and v j f 1 ( t i ) f 2 ( t i ) y i = v j f 1 ( t i ) f 2 ( t i ) y i .
  • (C-12): i , i [ p ] and j , j [ p ] for ( t i , x i , y i ) ( t i , x i , y i ) Q ¯ F and ( u j , v j ) , ( u j , v j ) Q ¯ P such that x i f 2 ( t i ) = v j , x i f 2 ( t i ) = v j and u j f 1 ( t i ) f 2 ( t i ) y i = u j f 1 ( t i ) f 2 ( t i ) y i .
  • (C-13): α ¯ 1 q .
  • (C-14): α ¯ 2 q .
  • (C-15): β ¯ 1 q or β ¯ 2 q .
  • (C-16): i , i , and i [ q ] for pairwise distinct ( t i , x i , y i ) , ( t i , x i , y i ) , and ( t i , x i , y i ) Q ¯ F such that f 1 ( t i ) f 2 ( t i ) y i = f 1 ( t i ) f 2 ( t i ) y i and f 1 ( t i ) f 2 ( t i ) y i = f 1 ( t i ) f 2 ( t i ) y i .
  • (C-17): For sets Q ¯ 0 = { ( t , x , y ) Q ¯ F : δ D ¯ 1 ( x f 1 ( t ) ) = δ D ¯ 2 ( x f 2 ( t ) ) = 1 , x f 1 ( t ) U , x f 2 ( t ) V } , U ^ = U { v f 1 ( t ) f 2 ( t ) y : ( t , x , y ) Q ¯ F , ( u , v ) Q ¯ P , x f 1 ( t ) = u U } { x f 1 ( t ) : ( t , x , y ) Q F , x f 1 ( t ) U } , and V ^ = V { u f 1 ( t ) f 2 ( t ) y : ( t , x , y ) Q ¯ F , ( u , v ) Q ¯ P , x f 2 ( t ) = v V } { x f 2 ( t ) : ( t , x , y ) Q ¯ F , x f 2 ( t ) V } derived from the transcript, D U ^ = d e f | { x i f 2 ( t i ) f 1 ( t i ) f 2 ( t i ) y i U ^ : ( t i , x i , y i ) ( t i , x i , y i ) Q ¯ 0 } | q 3 / 2 or D V ^ = d e f | { x i f 1 ( t i ) f 1 ( t i ) f 2 ( t i ) y i V ^ : ( t i , x i , y i ) ( t i , x i , y i ) Q ¯ 0 } | q 3 / 2 .
Otherwise, τ is said a good transcript.

4.1. Analysis of Bad Transcripts

Let Γ i be the set of all transcripts satisfying (C-i) for i [ 17 ] . The proportion of all bad transcripts in the ideal world can be upper bounded in the following lemma.
Lemma 5.
Let T id be the probability distribution of transcript τ ¯ = ( Q ¯ F , Q ¯ P ,   ( f 1 , f 2 ) ) in the ideal world, where | Q ¯ P | = p , | Q ¯ F | = q , and ( f 1 , f 2 ) is a good ( ϵ 1 , ϵ 2 ) -key-derivation pair. Then we have
Pr [ T id Γ bad ] ( 3 q p 2 + 2 q 2 p ) ϵ 1 2 + 2 q 3 ϵ 2 2 + 2 q 2 p ϵ 1 ϵ 2 + q 3 / 2 ϵ 2 + 2 p q ϵ 1 + q + 2 q ( p + q ) 2 n + q 3 2 2 n .
Proof. 
Let T id = ( Q ¯ F , Q ¯ P , ( f 1 , f 2 ) ) be any attainable transcript in the ideal world, where Q ¯ P includes p permutation pairs from the interaction between distinguisher D and P. For each distinct construction query ( t , x , y ) Q ¯ F , y is sampled uniformly and independently from { 0 , 1 } n . Without loss of generality, we assume that there exists no repeated items in Q ¯ F and Q ¯ P .
The probabilities of T id in Γ bad can be upper bounded as
Pr [ T id Γ bad ] i = 1 15 Pr [ T id Γ i ] Bad M 1 + Pr [ T id Γ 16 ] + Pr [ T id Γ 17 ] Bad M 2 .
For Bad M 1 , one can obtain the following upper bound
Bad M 1 ( 3 q p 2 + 2 q 2 p ) ϵ 1 2 + 2 q 3 ϵ 2 2 + 2 q 2 p ϵ 1 ϵ 2 + 2 p q ϵ 1 + q 3 / 2 ϵ 2 + q 2 n ,
and more details can be found in Appendix C.
For Bad M 2 , we need to study (C-16) and (C-17), respectively.
Bounding ( C - 16 ): For any three distinct construction queries ( t i , x i , y i ) , ( t i , x i , y i ) , and ( t i , x i , y i ) Q ¯ F , y i and y i are independently and uniformly sampled from { 0 , 1 } n . Hence, we have
Pr [ ( f 1 ( t i ) f 2 ( t i ) y i = f 1 ( t i ) f 2 ( t i ) y i ) ( f 1 ( t i ) f 2 ( t i ) y i = f 1 ( t i ) f 2 ( t i ) y i ) ] 1 2 2 n .
Since the number of all possible tuples for ( ( t i , x i , y i ) , ( t i , x i , y i ) , ( t i , x i , y i ) ) Q ¯ F × Q ¯ F × Q ¯ F is at most q 3 , by union bound, one has
Pr [ T id Γ 16 ] q 3 2 2 n .
Bounding ( C - 17 ): First, we have { ( t , x , y ) Q ¯ F : x f 1 ( t ) U } { ( t , x , y ) Q ¯ F : x f 1 ( t ) U } = (which means | U ^ | p + q ). Hence, by the definition of Q ¯ 0 , it holds that { ( t , x , y ) Q ¯ F : x f 1 ( t ) U } Q ¯ 0 = . Similarly, we also have { ( t , x , y ) Q ¯ F : x f 2 ( t ) V } { ( t , x , y ) Q ¯ F : x f 2 ( t ) V } = (which means | V ^ | p + q ) and { ( t , x , y ) Q ¯ F : x f 2 ( t ) V } Q ¯ 0 = . By combing these facts and the definitions of U ^ , V ^ , and Q ¯ 0 , the random value y for each ( t , x , y ) Q ¯ 0 in the ideal world is independent of any elements in U ^ and V ^ . Therefore, for each pair ( ( t i , x i , y i ) , ( t i , x i , y i ) ) Q ¯ 0 × Q ¯ 0 , one has
Pr [ x i f 2 ( t i ) f 1 ( t i ) f 2 ( t i ) y i U ^ ] | U ^ | 2 n p + q 2 n .
Then the expectation value of random variable D U ^ can be bounded as
E [ D U ^ ] ( ( t i , x i , y i ) , ( t i , x i , y i ) ) Q ¯ 0 2 : Pr [ x i f 2 ( t i ) f 1 ( t i ) f 2 ( t i ) y i U ^ ] | Q ¯ 0 | 2 ( p + q ) 2 n q 2 ( p + q ) 2 n .
By Markov’s inequality, we have
Pr [ D U ^ q 3 / 2 ] E [ D U ^ ] q 3 / 2 q ( p + q ) 2 n .
Similarly, it holds that
Pr [ D V ^ q 3 / 2 ] q ( p + q ) 2 n .
Therefore, one has
Pr [ T id Γ 17 ] 2 q ( p + q ) 2 n .
Finally, by combining the upper bounds on Bad M 1 and Bad M 2 together, by (30), the proof of Lemma 5 is finished.  □

4.2. Analysis of Good Transcripts

In this part, we prove that for any good transcript τ ¯ , the probability to sample it in the real world is close to that in the ideal world, and this result can be formally stated in the following lemma.
Lemma 6.
Assume that n 6 and q 64 . Let T id be the probability distribution of transcripts in the ideal world, and T re be in the real world. Then for any good transcript τ ¯ = ( Q ¯ F , Q ¯ P , ( f 1 , f 2 ) ) Γ good with parameters p and q satisfying p + 2 q + 6 q 2 n 1 , one has
Pr [ T re = τ ¯ ] Pr [ T id = τ ¯ ] 1 ϵ ,
where ϵ = 4 q ( p + 2 q + 6 q ) 2 2 2 n + 16 q 3 / 2 + 4 p q + 8 q 2 n + 16 q 2 n / 3 + 12 q 2 2 n / 3 .
Proof. 
Given a good transcript τ ¯ , we define the following probability
p ( τ ¯ ) = def Pr [ P $ Perm ( n ) : F f 1 , f 2 P Q ¯ F | P Q ¯ P ] .
By a simple combinatorial argument, it holds that
Pr [ T re = τ ¯ ] Pr [ T id = τ ¯ ] = 2 n q p ( τ ¯ ) .
We first introduce some subsets of Q ¯ F as follows:
Q ¯ U = { ( t , x , y ) Q ¯ F : x f 1 ( t ) U } , Q ¯ V = { ( t , x , y ) Q ¯ F : x f 2 ( t ) V } , Q ¯ X 1 = { ( t , x , y ) Q ¯ F : δ D ¯ 1 ( x f 1 ( t ) ) > 1 and x f 1 ( t ) U } , Q ¯ X 2 = { ( t , x , y ) Q ¯ F : δ D ¯ 2 ( x f 2 ( t ) ) > 1 and x f 2 ( t ) V } , Q ¯ 0 = { ( t , x , y ) Q ¯ F : δ D ¯ 1 ( x f 1 ( t ) ) = δ D ¯ 2 ( x f 2 ( t ) ) = 1 , x f 1 ( t ) U , and x f 2 ( t ) V } .
Note that | Q ¯ U | = α ¯ 1 , | Q ¯ V | = α ¯ 2 , and Q ¯ 0 has been defined in (C-17). In fact, these sets form a partition of Q ¯ F .
Proposition 2.
Let τ ¯ Γ good be a good transcript. Then ( Q ¯ U , Q ¯ V , Q ¯ X 1 , Q ¯ X 2 , Q ¯ 0 ) defined above are pairwise disjoint.
Proof. 
By the definition of these five subsets, it holds that Q ¯ U Q ¯ X 1 = , Q ¯ V Q ¯ X 2 = , and Q ¯ U Q ¯ 0 = Q ¯ V Q ¯ 0 = Q ¯ X 1 Q ¯ 0 = Q ¯ X 2 Q ¯ 0 = . Since τ ¯ does not satisfy (C-1), one has Q ¯ U Q ¯ V = . Besides, Q ¯ U Q ¯ X 2 = (resp. Q ¯ V Q ¯ X 1 = ) holds since τ ¯ does not satisfy (C-6) (resp. (C-7)). Finally, Q ¯ X 1 Q ¯ X 2 = since τ ¯ Γ 10 .   □
We use E ¯ U , E ¯ V , E ¯ X 1 , E ¯ X 2 , and E ¯ 0 to denote the events F f 1 , f 2 P Q ¯ U , Q ¯ V , Q ¯ X 1 , Q ¯ X 2 , and Q ¯ 0 , respectively. Note that F f 1 , f 2 P Q ¯ F is equivalent to E ¯ U E ¯ V E ¯ X 1 E ¯ X 2 E ¯ 0 . Therefore, it holds that
p ( τ ¯ ) = Pr [ P $ Perm ( n ) : F f 1 , f 2 P Q ¯ F | P Q ¯ P ] = Pr [ P $ Perm ( n ) : E ¯ U E ¯ V E ¯ X 1 E ¯ X 2 E ¯ 0 | P Q ¯ P ] = p ( τ ¯ ) · p ( τ ¯ ) ,
where
p ( τ ¯ ) = Pr [ P $ Perm ( n ) : E ¯ U E ¯ V | P Q ¯ P ] ,
and
p ( τ ¯ ) = Pr [ P $ Perm ( n ) : E ¯ X 1 E ¯ X 2 E ¯ 0 | E ¯ U E ¯ V ( P Q ¯ P ) ] .
The next goal is to lower bound p ( τ ¯ ) and p ( τ ¯ ) .
Lower Bounding p ( τ ¯ ) . Conditioned on P Q ¯ P , P is fixed on exactly p input-output pairs from U to V. For each ( t , x , y ) Q ¯ U , there exists a unique ( u , v ) Q ¯ P satisfying x f 1 ( t ) = u . Hence, P ( x f 1 ( t ) ) = P ( u ) = v . Then we define two sets:
U ¯ 1 = { P ( x f 1 ( t ) ) f 1 ( t ) f 2 ( t ) y : ( t , x , y ) Q ¯ U } , V ¯ 1 = { x f 2 ( t ) : ( t , x , y ) Q ¯ U } .
All values in U ¯ 1 (resp. V ¯ 1 ) are distinct since τ does not satisfy (C-11) (resp. (C-6)). Moreover, since τ ¯ Γ 2 and τ ¯ Γ 1 , one has U ¯ 1 U = and V ¯ 1 V = respectively.
For each ( t , x , y ) Q ¯ V , there exists a unique ( u , v ) Q ¯ P satisfying x f 2 ( t ) = v . In this case, P 1 ( x f 2 ( t ) ) = u . Then we can define two sets:
U ¯ 2 = { x f 1 ( t ) : ( t , x , y ) Q ¯ V } , V ¯ 2 = { P 1 ( x f 2 ( t ) ) f 1 ( t ) f 2 ( t ) y : ( t , x , y ) Q ¯ V } .
All elements in U ¯ 2 (resp. V ¯ 2 ) are distinct since τ ¯ does not satisfy (C-7) (resp. (C-12)). Due to the fact τ ¯ Γ 1 and τ ¯ Γ 3 , one has U ¯ 2 U = and V ¯ 2 V = , respectively. Moreover, U ¯ 2 U ¯ 1 = (resp. V ¯ 2 V ¯ 1 = ) since τ ¯ Γ 4 (resp. τ ¯ Γ 5 ). Besides, it holds that | U ¯ 1 | = | V ¯ 1 | = | Q ¯ U | = α ¯ 1 and | U ¯ 2 | = | V ¯ 2 | = | Q ¯ V | = α ¯ 2 . Therefore, one can obtain that
p ( τ ¯ ) = Pr [ P $ Perm ( n ) : E U E V | P Q ¯ P ] = 1 ( 2 n p ) α ¯ 1 + α ¯ 2 .
Now, we can define two disjoint collections U = def ( U , U ¯ 1 , U ¯ 2 ) and V = def ( V , V ¯ 1 , V ¯ 2 ) . In this case, P is fixed on exactly p + α ¯ 1 + α ¯ 2 input-output pairs from U U ¯ 1 U ¯ 2 to V V ¯ 1 V ¯ 2 .
Lower Bounding p ( τ ¯ ) . When conditioned on E ¯ U E ¯ V ( P Q ¯ P ) , we next lower bound the number of all possible “new” and distinct input-output pairs of P such that the event E ¯ X 1 E ¯ X 2 E ¯ 0 happens. First, one can define some multi-sets associated to Q ¯ X 1 and Q ¯ X 2 as follows:
U 3 = { x f 1 ( t ) : ( t , x , y ) Q ¯ X 1 } , U 5 = { x f 1 ( t ) : ( t , x , y ) Q ¯ X 2 } , V 4 = { x f 2 ( t ) : ( t , x , y ) Q ¯ X 1 } , V 6 = { x f 2 ( t ) : ( t , x , y ) Q ¯ X 2 } .
Let α 3 = | U 3 | , α 4 = | V 4 | , α 5 = | U 5 | , and α 6 = | V 6 | . For convenience, we rewrite these sets as:
U 3 = { u 3 , 1 , , u 3 , α 3 } , U 5 = { u 5 , 1 , , u 5 , α 5 } , V 4 = { v 4 , 1 , , v 4 , α 4 } , V 6 = { v 6 , 1 , , v 6 , α 6 } .
Let V 3 = P ( U 3 ) , U 4 = P 1 ( V 4 ) , V 5 = P ( U 5 ) , and U 6 = P 1 ( V 6 ) . These sets can be written more clearly as:
V 3 = { P ( x f 1 ( t ) ) : ( t , x , y ) Q ¯ X 1 } , V 5 = { P ( x f 1 ( t ) ) : ( t , x , y ) Q ¯ X 2 } , U 4 = { P 1 ( x f 2 ( t ) ) : ( t , x , y ) Q ¯ X 1 } , U 6 = { P 1 ( x f 2 ( t ) ) : ( t , x , y ) Q ¯ X 2 } .
Recall that D ¯ 1 = { x f 1 ( t ) : ( t , x , y ) Q ¯ F } and D ¯ 2 = { x f 2 ( t ) : ( t , x , y ) Q ¯ F } . Then, we get
α 3 x { 0 , 1 } n : δ D ¯ 1 ( x ) > 1 1 x { 0 , 1 } n : δ D ¯ 1 ( x ) > 1 δ D ¯ 1 ( x ) 2 = β ¯ 1 2 q 2 , α 4 i = 1 α 3 δ D ¯ 1 ( u 3 , i ) x { 0 , 1 } n : δ D ¯ 1 ( x ) > 1 δ D ¯ 1 ( x ) = β ¯ 1 q .
Similarly, it also holds that α 6 q 2 and α 5 q . Since τ ¯ Γ 10 , there exists no repeated items in V 4 and U 5 . Hence, one can conclude that α 4 = | Q ¯ X 1 | and α 5 = | Q ¯ X 2 | . Now we define two multi-sets associated to Q ¯ 0 as
U 7 = { x f 1 ( t ) : ( t , x , y ) Q ¯ 0 } , V 8 = { x f 2 ( t ) : ( t , x , y ) Q ¯ 0 } .
By the definition of Q ¯ 0 , there exists no repeated items in U 7 and V 8 . Based on these two sets, one can define two corresponding sets as:
V 7 = P ( U 7 ) = { P ( x f 1 ( t ) ) : ( t , x , y ) Q ¯ 0 } , U 8 = P 1 ( V 8 ) = { P 1 ( x f 2 ( t ) ) : ( t , x , y ) Q ¯ 0 } .
Set U + = ( U 3 , U 5 , U 7 ) and V + = ( V 4 , V 6 , V 8 ) as two set collections. Then we can conclude the following proposition.
Proposition 3.
With notations as above, one has
(i) 
All sets in U + (resp. V + ) are disjoint, i.e., U 3 U 5 = , U 3 U 7 = , and U 5 U 7 = (resp. V 4 V 6 = , V 4 V 8 = , and V 6 V 8 = ).
(ii) 
U + is inner disjoint with U , and V + is inner disjoint with V .
Proof. 
We first prove (i). From the fact τ ¯ Γ 10 , we have U 3 U 5 = . By the definition of Q ¯ X 1 and Q ¯ 0 , one can conclude that U 3 U 7 = . U 5 U 7 = holds due to the fact τ ¯ Γ 10 , and the disjoint property of Q ¯ X 1 and Q ¯ 0 . We can conclude that V 4 V 6 = , V 4 V 8 = , and V 6 V 8 = in a similar way.
Next we prove (ii) by enumerating all possible cases. For U 3 , the definition of Q ¯ X 1 means that U 3 U = ; U 3 U ¯ 1 = comes from the fact τ ¯ Γ 4 ; U 3 U ¯ 2 = holds due to the disjoint property between Q ¯ X 1 and Q ¯ V , and the fact τ ¯ Γ 7 . For U 5 , U 5 U = comes from the fact τ ¯ Γ 6 , and the definition of Q ¯ X 2 ; U 5 U ¯ 1 = comes from the fact τ ¯ Γ 4 ; By the disjoint property between Q ¯ X 2 and Q ¯ V , and the fact τ ¯ Γ 7 , we have U 5 U ¯ 2 = . For U 7 , the definition of Q ¯ 0 means U 7 U = ; U 7 U ¯ 1 = comes from the fact that τ ¯ Γ 4 ; By the disjoint property between Q ¯ 0 and Q ¯ V , and the fact τ ¯ Γ 7 , we has U 7 U ¯ 2 = .
For V 4 , V 4 V = comes from the fact τ ¯ Γ 7 , and the definition of Q ¯ X 1 ; V 4 V ¯ 1 = can be derived from the disjoint property between Q ¯ X 1 and Q ¯ U , and the fact τ ¯ Γ 6 ; The fact τ ¯ Γ 5 means V 4 V ¯ 2 = . For V 6 , V 6 V = holds from definition of Q ¯ X 2 ; V 6 V 1 = comes from the definition of Q ¯ X 2 , and the fact τ ¯ Γ 6 ; The fact τ ¯ Γ 5 means V 6 V ¯ 2 = . For V 8 , V 8 V = comes from definition of Q ¯ 0 ; V 8 V ¯ 1 = holds due to the disjoint property between Q ¯ 0 and Q ¯ U , and the fact τ ¯ Γ 6 ; Finally the fact τ ¯ Γ 5 means V 8 V ¯ 2 = .   □
Now we define two disjoint union sets U + + = U U ¯ 1 U ¯ 2 U 3 U 5 U 7 (which equals to U ^ in (C-17)), and V + + = V V ¯ 1 V ¯ 2 V 4 V 6 V 8 (which equals to V ^ in (C-17)).
Let q ¯ = | Q ¯ 0 | = q ( | Q ¯ U | + | Q ¯ V | + | Q ¯ X 1 | + | Q ¯ X 2 | ) = q ( α ¯ 1 + α ¯ 2 + α 4 + α 5 ) (actually, q ¯ = | U 7 | = | V 8 | ) and M = q ¯ 2 n / 3 . Then it holds that q ¯ 2 M q ¯ / 2 if n 6 . Next we try to sample “new” values for V 7 and U 8 by allowing that there exist many construction queries ( t , x , y ) , ( t , x , y ) Q ¯ 0 such that P ( x f 1 ( t ) ) f 1 ( t ) f 2 ( t ) y = x f 1 ( t ) or P 1 ( x f 2 ( t ) ) f 1 ( t ) f 2 ( t ) y = x f 2 ( t ) holds. In the first case, we can obtain three maps like
{ x f 1 ( t ) P x f 1 ( t ) f 1 ( t ) f 2 ( t ) y , x f 1 ( t ) P x f 2 ( t ) , x f 2 ( t ) f 1 ( t ) f 2 ( t ) y P x f 2 ( t ) .
In the second case, we have
{ x f 1 ( t ) P x f 1 ( t ) f 1 ( t ) f 2 ( t ) y , x f 1 ( t ) P x f 2 ( t ) , x f 2 ( t ) f 1 ( t ) f 2 ( t ) y P x f 2 ( t ) .
If x f 2 ( t ) f 1 ( t ) f 2 ( t ) y U + + and x f 1 ( t ) f 1 ( t ) f 2 ( t ) y V + + , or x f 2 ( t ) f 1 ( t ) f 2 ( t ) y U + + and x f 1 ( t ) f 1 ( t ) f 2 ( t ) y V + + , then the above permutation maps are compatible with Q ¯ F and Q ¯ P . Intuitively, when we consider the above “collision” maps, there would be as many permutations chosen to be compatible with Q ¯ F and Q ¯ P as possible so that our construction can achieve BBB security.
Conditioned on E ¯ U E ¯ V ( P Q ¯ P ) , we next describe all possible permutations satisfying E X 1 E X 2 E 0 , and finally compute and lower bound p ( τ ¯ ) .
For each α [ M ] , we define the following set
S = { ( ( σ 1 , ξ 1 ) , ( σ 1 , ξ 1 ) ) , , ( ( σ α , ξ α ) , ( σ α , ξ α ) ) } ,
where for each 1 k α , one has σ k = x k f 1 ( t k ) (resp. ξ k = x k f 2 ( t k ) ) for some query ( t k , x k , y k ) Q ¯ 0 and σ k = x k f 1 ( t k ) (resp. ξ k = x k f 2 ( t k ) ) for another query ( t k , x k , y k ) Q ¯ 0 .
Definition 2.
We say S = { ( ( σ 1 , ξ 1 ) , ( σ 1 , ξ 1 ) ) , , ( ( σ α , ξ α ) , ( σ α , ξ α ) ) } a “good” set if the following four conditions are all satisfied
(1) 
x k f 2 ( t k ) f 1 ( t k ) f 2 ( t k ) y k U + + ,
(2) 
x k f 1 ( t k ) f 1 ( t k ) f 2 ( t k ) y k V + + ,
(3) 
x k f 2 ( t k ) f 1 ( t k ) f 2 ( t k ) y k x k f 2 ( t k ) f 1 ( t k ) f 2 ( t k ) y k , for any k < k ,
(4) 
x k f 1 ( t k ) f 1 ( t k ) f 2 ( t k ) y k x k f 1 ( t k ) f 1 ( t k ) f 2 ( t k ) y k , for any k < k .
The next lemma shows that for each α [ M ] , the number of all possible “good” sets derived from Q ¯ 0 is close to ( q ¯ ) 2 α / α ! .
Lemma 7.
Assume that q 64 and n 6 . Let α be an integer with 0 α M = q ¯ 2 n / 3 . Let N S ( α ) be the number of all “good” sets derived from Q ¯ 0 . Then we have
N S ( α ) ( q ¯ ) 2 α α ! 1 ϵ 0 ,
where ϵ 0 = 6 q 2 2 n / 3 + 16 q 2 n / 3 .
Proof. 
We count all possible pairs in a “good” set step by step as follows. First, we decide all possible pairs for ( ( σ 1 , ξ 1 ) , ( σ 1 , ξ 1 ) ) . There are q ¯ ( q ¯ 1 ) possible pairs to be chosen for ( ( σ 1 , ξ 1 ) , ( σ 1 , ξ 1 ) ) . Since τ Γ 17 , there are at most 2 q 3 / 2 pairs not satisfying the first two conditions in Definition 2. Then we can choose at least q ¯ ( q ¯ 1 ) 2 q 3 / 2 possible pairs for ( ( σ 1 , ξ 1 ) , ( σ 1 , ξ 1 ) ) .
After choosing ( σ 1 , ξ 1 ) , ( σ 1 , ξ 1 ) , we decide all possible ( ( σ 2 , ξ 2 ) , ( σ 2 , ξ 2 ) ) in the following way. We first choose ( σ 2 , ξ 2 ) from the remaining q ¯ 2 possible pairs, and then choose the corresponding pair ( σ 2 , ξ 2 ) outside of ( σ 1 , ξ 1 ) , ( σ 1 , ξ 1 ) , and ( σ 2 , ξ 2 ) to satisfy all four conditions in Definition 2. To satisfy the last two conditions 3 ) and 4 ) in Definition 2, σ 2 and ξ 2 should chosen such that
{ ξ 2 ξ 1 f 1 ( t 1 ) f 2 ( t 1 ) y 1 f 1 ( t 2 ) f 2 ( t 2 ) y 2 , σ 2 σ 1 f 1 ( t 1 ) f 2 ( t 1 ) y 1 f 1 ( t 2 ) f 2 ( t 2 ) y 2 .
In this case, from the definition of Q ¯ 0 and the fact τ ¯ Γ 16 , it excludes at most 3 possibilities to be chosen for ( σ 2 , ξ 2 ) . Then there are at least ( q ¯ 2 ) ( q ¯ 6 ) possibilities to be chosen for ( ( σ 2 , ξ 2 ) , ( σ 2 , ξ 2 ) ) , when we only consider the last two conditions in Definition 2. Finally, from the fact τ Γ 17 , there are at most 2 q 3 / 2 pairs to be removed for all possibilities ( ( σ 2 , ξ 2 ) , ( σ 2 , ξ 2 ) ) if we want them to satisfy the first two conditions 1 ) and 2 ) in Definition 2. Overall, there are at least ( q ¯ 2 ) ( q ¯ 6 ) 2 q 3 / 2 possible pairs to be chosen for ( ( σ 2 , ξ 2 ) , ( σ 2 , ξ 2 ) ) .
After choosing k 1 pairs ( ( σ 1 , ξ 1 ) , ( σ 1 , ξ 1 ) ) , …, ( ( σ k 1 , ξ k 1 ) , ( σ k 1 , ξ k 1 ) ) , there are at least ( q ¯ 2 k ) ( q ¯ 5 k 1 ) 2 q 3 / 2 possible pairs to be chosen for ( ( σ k , ξ k ) , ( σ k , ξ k ) ) by repeating the above step.
When we finish the choice of all possible cases for ( ( ( σ 1 , ξ 1 ) , ( σ 1 , ξ 1 ) ) , , ( ( σ α , ξ α ) , ( σ α , ξ α ) ) ) satisfying all four conditions in Definition 2, one can conclude that
N S ( α ) 1 α ! k = 0 α 1 ( ( q ¯ 2 k ) ( q ¯ 5 k 1 ) 2 q 3 / 2 ) ,
where the term α ! appears because the set S is unordered.
Furthermore, N S ( α ) can be lower bounded as follows
N S ( α ) 1 α ! k = 0 α 1 ( ( q ¯ 2 k ) ( q ¯ 5 k 1 ) 2 q 3 / 2 ) ( q ¯ ) 2 α α ! k = 0 α 1 ( q ¯ 2 k ) ( q ¯ 5 k 1 ) 2 q 3 / 2 ( q ¯ 2 k ) ( q ¯ 2 k 1 ) ( q ¯ ) 2 α α ! k = 0 α 1 1 3 k q ¯ 6 k 2 + 2 q 3 / 2 ( q ¯ 2 k ) ( q ¯ 2 k 1 ) ( i ) ( q ¯ ) 2 α α ! k = 0 α 1 1 3 k q ¯ + 2 q 3 / 2 ( q ¯ 2 M ) 2 ( q ¯ ) 2 α α ! 1 3 q ¯ M 2 / 2 + 2 q 3 / 2 M ( q ¯ 2 M ) 2 ( i i ) ( q ¯ ) 2 α α ! 1 6 q ¯ M 2 + 8 q 3 / 2 M q ¯ 2 ( i i i ) ( q ¯ ) 2 α α ! 1 6 q ¯ 2 2 n / 3 8 q 3 / 2 q 2 n / 3 ( i v ) ( q ¯ ) 2 α α ! 1 6 q 2 2 n / 3 16 q 2 n / 3 ,
where (i) follows as q ¯ 2 k , q 2 k 1 q ¯ 2 α q ¯ 2 M , (ii) follows as q ¯ 2 M > q ¯ / 2 , (iii) follows as M q ¯ 2 n / 3 , and (iv) follows as q / 2 q 4 q q ¯ if q > 64 .   □
For a fixed α with 0 α M and a corresponding “good” set
S = { ( ( σ 1 , ξ 1 ) , ( σ 1 , ξ 1 ) ) , , ( ( σ α , ξ α ) , ( σ α , ξ α ) ) } ,
the following assignment (34) for P is well-defined by the definition of S:
k [ α ] { σ k P σ k f 1 ( t k ) f 2 ( t k ) y k , σ k P ξ k , ξ k f 1 ( t k ) f 2 ( t k ) y k P ξ k .
Furthermore, based on the “good” set S, we define two subsets of U 7 and V 8 as
U 7 , 1 = d e f { σ 1 = x 1 f 1 ( t 1 ) , σ 1 = x 1 f 1 ( t 1 ) , , σ α = x α f 1 ( t α ) , σ α = x α f 1 ( t α ) } , V 8 , 1 = d e f { ξ 1 = x 1 f 2 ( t 1 ) , ξ 1 = x 1 f 2 ( t 1 ) , , ξ α = x α f 2 ( t α ) , ξ α = x α f 2 ( t α ) } .
Besides, we can also denote two additional sets as
U 7 , 1 = d e f { ξ 1 f 1 ( t 1 ) f 2 ( t 1 ) y 1 , , ξ α f 1 ( t α ) f 2 ( t α ) y α } , V 8 , 1 = d e f { σ 1 f 1 ( t 1 ) f 2 ( t 1 ) y 1 , , σ α f 1 ( t α ) f 2 ( t α ) y α } ,
where U 7 , 1 U + + = (resp. V 8 , 1 V + + = ) and all items in U 7 , 1 (resp. V 8 , 1 ) are distinct. After the assignment (34) for P, P is fixed on 3 α input-ouput pairs from U 7 , 1 U 7 , 1 to V 8 , 1 V 8 , 1 . In addition, we can define the corresponding co-subset of U 7 , 1 and V 8 , 1 as U 7 , 2 = d e f U 7 \ U 7 , 1 and V 8 , 2 = d e f V 8 \ V 8 , 2 , respectively.
Until now, the random permutation P is fixed on p input-output pairs from U to V, α ¯ 1 input-output pairs from U ¯ 1 to V ¯ 1 , α ¯ 2 input-output pairs from U ¯ 2 to V ¯ 2 , and 3 α input-output pairs from U 7 , 1 U 7 , 1 to V 8 , 1 V 8 , 1 . Based on these facts, the next work is to choose all other possible compatible items for V 3 = P ( U 3 ) , U 4 = P 1 ( V 4 ) , V 5 = P ( U 5 ) , U 6 = P 1 ( V 6 ) , V 7 , 2 = P ( U 7 , 2 ) and U 8 , 2 = P 1 ( V 8 , 2 ) to extend the fixed input-output pairs of P.
Note that once the items in V 3 = P ( U 3 ) are fixed, the corresponding items in U 4 = P 1 ( V 4 ) are uniquely determined since these two sets are both derived from Q ¯ X 1 . Similarly, the items in V 5 = P ( U 5 ) (resp. V 7 , 2 = P ( U 7 , 2 ) ) uniquely determine the items in U 6 = P 1 ( V 6 ) (resp. U 8 , 2 = P 1 ( V 8 , 2 ) ). Then we sample all possible items for these sets through three steps.
Step I . Construct V 3 = P ( U 3 ) and U 4 = P 1 ( V 4 ) .
Let U 3 + = U + + U 7 , 1 and V 3 + = V + + V 8 , 1 . The size of U 3 + is Δ 1 = p + α ¯ 1 + α ¯ 2 + α 3 + α 5 + q ¯ + α , and the size of V 3 + is Δ 2 = p + α ¯ 1 + α ¯ 2 + α 4 + α 6 + q ¯ + α . Recall that X ¯ u 1 = { ( t , x , y ) Q ¯ F : x f 1 ( t ) = u } and X ¯ u 2 = { ( t , x , y ) Q ¯ F : x f 2 ( t ) = u } . Let N 1 ( α ) be the number of distinct tuples ( v 3 , 1 , , v 3 , α 3 ) in { 0 , 1 } n \ V 3 + such that the following two conditions are satisfied
(i)
k [ α 3 ] , for each ( t , x , y ) X ¯ u 3 , k 1 where u 3 , k U 3 , v 3 , k f 1 ( t ) f 2 ( t ) y U 3 + .
(ii)
k , k [ α 3 ] with k < k , for each ( t , x , y ) X ¯ u 3 , k 1 , v 3 , k f 1 ( t ) f 2 ( t ) y v 3 , k f 1 ( t ) f 2 ( t ) y should be satisfied for each ( t , x , y ) X ¯ u 3 , k 1 .
Now we count the number of all possible distinct tuples ( v 3 , 1 , , v 3 , α 3 ) { 0 , 1 } n \ V 3 + satisfying these two conditions. First, one has | { 0 , 1 } n \ V 3 + | = 2 n ( p + α ¯ 1 + α ¯ 2 + α 4 + α 6 + q ¯ + α ) . The first condition can remove at most ( p + α ¯ 1 + α ¯ 2 + α 3 + α 5 + q ¯ + α ) | X ¯ u 3 , k 1 | items for each k, and the second condition can exclude at most | X ¯ u 3 , k 1 | ( | X ¯ u 3 , 1 1 | + + | X ¯ u 3 , k 1 1 | ) α 4 · | X ¯ u 3 , k 1 | values for each choice of v 3 , k . By the choice of v 3 , k above, we obtain that
N 1 ( α ) k = 0 α 3 1 2 n Δ 2 k ( Δ 1 + α 4 ) · | X ¯ u 3 , k + 1 1 | .
Let V 3 = { v 3 , 1 , , v 3 , α 3 } and U 4 = { v 3 , k f 1 ( t ) f 2 ( t ) y : k [ α 3 ] , ( t , x , y ) X ¯ u 3 , k 1 } . The first condition ensures that U 4 is disjoint with U 3 + . Items in U 4 are distinct due to the second condition and the fact τ ¯ Γ 8 . This fact tells us that for each k [ α 3 ] and ( t , x , y ) ( t , x , y ) X ¯ u 3 , k 1 , it holds that x f 1 ( t ) = x f 1 ( t ) = u 3 , k but f 1 ( t ) f 2 ( t ) y f 1 ( t ) f 2 ( t ) y , which means that v 3 , k f 1 ( t ) f 2 ( t ) y v 3 , k f 1 ( t ) f 2 ( t ) y . Moreover, items in V 3 are distinct, and V 3 is disjoint with V 3 + by the choice of ( v 3 , 1 , , v 3 , α 3 ) . Let U 4 + = U 3 + U 4 , and V 4 + = V 3 + V 3 . The size of U 4 + is Δ 3 = Δ 1 + α 4 , and the size of V 4 + is Δ 4 = Δ 2 + α 3 .
Step I I . Construct V 5 = P ( U 5 ) , and U 6 = P 1 ( V 6 ) .
Recall that V 6 = { v 6 , 1 , , v 6 , α 6 } . Let N 2 ( α ) be the number of all distinct tuples ( u 6 , 1 , , u 6 , α 6 ) in { 0 , 1 } n \ U 4 + satisfying the following two conditions:
(i)
k [ α 6 ] , for each ( t , x , y ) X ¯ v 6 , k 2 , u 6 , k f 1 ( t ) f 2 ( t ) y V 4 + .
(ii)
k , k [ α 6 ] with k < k , for each ( t , x , y ) X v 6 , k 2 , u 6 , k f 1 ( t ) f 2 ( t ) y u 6 , k f 1 ( t ) f 2 ( t ) y should be satisfied for each ( t , x , y ) X v 6 , k 2 .
Now we count the number of all possible distinct tuples ( u 6 , 1 , , u 6 , α 6 ) { 0 , 1 } n \ U 4 + satisfying these two conditions. Similarly, one has | { 0 , 1 } n \ U 4 + | = 2 n ( p + α ¯ 1 + α ¯ 2 + α 3 + α 5 + q ¯ + α + α 4 ) . The first condition can remove at most ( p + α ¯ 1 + α ¯ 2 + α 4 + α 6 + q ¯ + α + α 3 ) · | X ¯ v 6 , k 2 | values for each k, and the second condition can exclude at most ( | X ¯ v 6 , 1 2 | + + | X ¯ v 6 , k 1 2 | ) · | X ¯ v 6 , k 2 | α 5 · | X ¯ v 6 , k 2 | items for each choice of u 6 , k . By the choice of ( u 6 , k ) k [ α 6 ] , we obtain that
N 2 ( α ) k = 0 α 6 1 2 n Δ 3 k ( Δ 4 + α 5 ) · | X ¯ v 6 , k 2 | .
Let U 6 = P 1 ( V 6 ) = d e f { u 6 , 1 , , u 6 , α 6 } , and V 5 = P ( U 5 ) = d e f { u 6 , k f 1 ( t ) f 2 ( t ) y : k [ α 6 ] , ( t , x , y ) X v 6 , k 2 } . It holds that items in P 1 ( V 6 ) are distinct. Furthermore, P 1 ( V 6 ) is disjoint with U 4 + by the choice of ( u 6 , 1 , , u 6 , α 6 ) . Let U 5 + = U 4 + U 6 , and V 5 + = V 4 + V 5 . The size of U 5 + is Δ 5 = Δ 3 + α 6 , and the size of V 5 + is Δ 6 = Δ 4 + α 5 .
Step I I I . Construct V 7 , 2 = P ( U 7 , 2 ) , and U 8 , 2 = P 1 ( V 8 , 2 ) .
Let q ¯ = q ¯ 2 α ( q ¯ = | U 7 , 2 | = | V 8 , 2 | ). Let m be the number of all distinct tweaks appearing in Q ¯ F , and then we use t ¯ 1 , , t ¯ m to denote these m distinct tweaks. We denote Q 0 , i ˜ = { ( t ¯ i , x , y ) Q ¯ 0 : x f 1 ( t ¯ i ) U 7 , 2 x f 2 ( t ¯ i ) V 8 , 2 } and q ¯ i = | Q 0 , i ˜ | . In this case, it holds that q ¯ = i = 1 m q ¯ i . For convenience to count, we denote Q 0 ˜ = i = 1 m Q 0 , i ˜ and rewrite the items in Q 0 ˜ indexed by the m distinct tweaks as
Q 0 ˜ = { ( t ¯ 1 , x 1 , 1 , y 1 , 1 ) , , ( t ¯ 1 , x 1 , q ¯ 1 , y 1 , q ¯ 1 ) , , ( t ¯ m , x m , 1 , y m , 1 ) , , ( t ¯ m , x m , q ¯ m , y m , q ¯ m ) } .
For i = 1 , , m and j = 1 , , q ¯ i , denote
u 7 , i , j = x i , j f 1 ( t ¯ i ) and v 8 , i , j = x i , j f 2 ( t ¯ i ) .
For convenience, U 7 , 2 and V 8 , 2 can be written as U 7 , 2 = { u 7 , i , j } 1 i m , 1 j q ¯ i and V 8 , 2 = { v 8 , i , j } 1 i m , 1 j q ¯ i , respectively. Let ( v 7 , i , j ) 1 i m , 1 j q ¯ i be all possible different tuples in { 0 , 1 } n \ V 5 + such that the following two conditions are satisfied.
(i)
For each i = 1 , , m and j = 1 , , q ¯ i , v 7 , i , j f 1 ( t ¯ i ) f 2 ( t ¯ i ) y i , j U 5 + .
(ii)
For each i = 1 , , m and j = 1 , , q ¯ i , v 7 , i , j f 1 ( t ¯ i ) f 2 ( t ¯ i ) y i , j is distinct from the values v 7 , k , l f 1 ( t ¯ k ) f 2 ( t ¯ k ) y k , l for k < i and l [ q ¯ k ] . Furthermore, v 7 , i , j f 1 ( t ¯ i ) f 2 ( t ¯ i ) y i , j should be distinct from the values v 7 , i , j f 1 ( t ¯ i ) f 2 ( t ¯ i ) y i , j for j [ q ¯ i ] with j < j .
Except these two conditions, each v 7 , i , j must be different from each other. By a simple computation, one has | V 5 + | = | U 5 + | = p + q ¯ + α , where p = p + α ¯ 1 + α ¯ 2 + α 3 + α 4 + α 5 + α 6 and q ¯ = q ( α ¯ 1 + α ¯ 2 + α 4 + α 5 ) . So | { 0 , 1 } n \ V 5 + | = 2 n ( p + q ¯ + α ) . Now we bound the number of all possible distinct tuples ( v 7 , i , j ) 1 i m , 1 j q ¯ i satisfying these two conditions. The first condition excludes at most p + q ¯ + α values, and the second condition excludes at most k = 1 i 1 q ¯ k j + 1 values for each choice of v 7 , i , j . Furthermore, v 7 , i , j should not be same as any one of previous k = 1 i 1 q ¯ k j + 1 items. By combining these facts, one can conclude that
N 0 ( α ) i = 1 m j = 0 q ¯ i 1 ( 2 n 2 p 2 q ¯ 2 α 2 k = 1 i 1 q ¯ k 2 j ) .
Overall, by combining (33), (35), (36), and (37), one has
p ( τ ¯ ) = 0 α M N S ( α ) · N 1 ( α ) · N 2 ( α ) · N 0 ( α ) ( 2 n p α ¯ 1 α ¯ 2 ) α 3 + α 4 + α 5 + α 6 + 2 q ¯ + 3 α .
By combining (32) and (38), we have
p ( τ ¯ ) = 0 α M N S ( α ) · N 1 ( α ) · N 2 ( α ) · N 0 ( α ) ( 2 n p ) α ¯ 1 + α ¯ 2 + α 3 + α 4 + α 5 + α 6 + 2 q ¯ + 3 α .
Recall that
Pr [ T re = τ ¯ ] Pr [ T id = τ ¯ ] = 2 n q p ( τ ¯ ) .
By combining (39) and (40), we conclude that
Pr [ T re = τ ¯ ] Pr [ T id = τ ¯ ] 0 α M 2 n q · N S ( α ) · N 1 ( α ) · N 2 ( α ) · N 0 ( α ) ( 2 n p ) α ¯ 1 + α ¯ 2 + α 3 + α 4 + α 5 + α 6 + 2 q + 3 α = 0 α M N 1 ( α ) 2 n p α 3 R 1 ( α ) · N 2 ( α ) 2 n p α 3 α 6 R 2 ( α ) · 2 n ( q q ¯ ) 2 n p α 3 α 6 α ¯ 1 + α ¯ 2 + α 4 + α 5 1 ( * ) · 2 n q ¯ · N S ( α ) · N 0 ( α ) 2 n p α ¯ 1 α ¯ 2 α 3 α 4 α 5 α 6 2 q ¯ + 3 α R 0 ( α ) ,
where ( * ) follows as q q ¯ = α ¯ 1 + α ¯ 2 + α 4 + α 5 .
Lower bounds on R 1 ( α ) , R 2 ( α ) , and R 0 ( α ) are given in Appendix D, and the results are showed as follows:
R 1 ( α ) 1 ϵ 1 , where ϵ 1 = 8 q 3 / 2 2 n + 2 p q 2 n + 4 q 2 n .
R 2 ( α ) 1 ϵ 2 , where ϵ 2 = 8 q 3 / 2 2 n + 2 p q 2 n + 4 q 2 n .
R 0 ( α ) ( 1 ϵ 0 ) · ( 1 ϵ 3 ) · ( 1 ϵ 4 ) · Hyp 2 n p , q ¯ , q ¯ ( α ) ,
where ϵ 0 = 6 q 2 2 n / 3 + 16 q 2 n / 3 , ϵ 3 = 4 q 2 2 n / 3 , and ϵ 4 = 4 q ( p + 2 q + 6 q ) 2 2 2 n .
Putting (42), (43), and (44) into (41), we obtain
Pr [ T re = τ ¯ ] Pr [ T id = τ ¯ ] ( 1 ϵ 0 ) ( 1 ϵ 1 ) ( 1 ϵ 2 ) ( 1 ϵ 3 ) ( 1 ϵ 4 ) 0 α M Hyp 2 n p , q ¯ , q ¯ ( α ) .
The last term in (45) can be bounded as
0 α M Hyp 2 n p , q ¯ , q ¯ ( α ) = 1 α > q ¯ / 2 n / 3 Hyp 2 n p , q ¯ , q ¯ ( α ) ( v ) 1 E [ Hyp 2 n p , q ¯ , q ¯ ( α ) ] q ¯ / 2 n / 3 = 1 ( q ¯ ) 2 ( 2 n p ) q ¯ / 2 n / 3 = 1 q ¯ · 2 n 3 2 n p ( v i ) 1 2 q 2 2 n / 3 ,
where ( v ) follows as Markov’s inequality and ( v i ) follows as 2 n p 2 n p 6 q 2 n 1 which comes from the assumption p + 6 q p + 6 q + 2 q 2 n 1 and the fact q ¯ q . Let ϵ 5 = 2 q 2 2 n / 3 . Then we can write (45) as
Pr [ T re = τ ¯ ] Pr [ T id = τ ¯ ] ( 1 ϵ 0 ) ( 1 ϵ 1 ) ( 1 ϵ 2 ) ( 1 ϵ 3 ) ( 1 ϵ 4 ) ( 1 ϵ 5 ) ( 1 ϵ 0 ϵ 1 ϵ 2 ϵ 3 ϵ 4 ϵ 5 ) .
Combing all these facts together, the proof of Lemma 6 is finished.  □
Finally, by Lemmas 1, 5 and 6, Theorem 2 follows.  □

5. Conclusions

In this paper, we first prove the BBB security of the construction SoEM 22 in the multi-key setting, and further tweak this construction. When the bidirectionally efficient public random permutations are considered, we build the parallelizable beyond-birthday secure PRFs from one permutation in the multi-key setting, and also tweak this new construction while preserving BBB security. By a slight modification of two tweakable PRFs, we obtain two parallelizable nonce based MACs for variable length messages. In fact, the constructions mentioned above come from sum of two Even-Mansours. It is natural to generalize SoEM 22 to sum of s Even-Mansours, namely
F K 1 , , K s P 1 , , P s ( x ) = P 1 ( x K 1 ) K 1 P s ( x K s ) K s ,
where P 1 , , P s $ Perm ( n ) are s independent random permutations, and K 1 , , K s are s n-bit uniformly random strings. Obliviously, this generalization is at least as secure as SoEM 22 even in the multi-key setting. However, the detailed analysis of its security is not easy to see, and we leave it as a future work.

Author Contributions

Writing—original draft, J.N.; Writing—review & editing, P.Z. and H.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported in part by the National Natural Science Foundation of China (Nos. 61632013 and 61972370), and by Fundamental Research Funds for Central Universities in China (No. WK3480000007).

Informed Consent Statement

Informed consent was obtained from all authors included in the study.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A. Upper Bound on Pr [ T id Γ bad ] in Lemma 3

For each i [ 13 ] , we upper bound Pr [ T id Γ i ] as follows.
Bounding ( B - 1 ), ( B - 2 ), and ( B - 3 ): First, we consider (B-1). For any ( t i , x i , y i ) Q F , u 1 , j U 1 , and u 2 , j U 2 , by the ϵ 1 -regular property of ( f 1 , f 2 ) , one has
Pr [ ( f 1 ( t i ) = x i u 1 , j ) ( f 2 ( t i ) = x i u 2 , j ) ] ϵ 1 2 .
Since the number of all possible tuples for ( ( t i , x i , y i ) , u 1 , j , u 2 , j ) i [ q ] , j [ p 1 ] , j [ p 2 ] is q p 1 p 2 , by union bound, it holds that
Pr [ T id Γ 1 ] q p 1 p 2 ϵ 1 2 .
Similarly, we can bound the probabilities of (B-2) and (B-3) as
Pr [ T id Γ 2 ] q p 1 p 2 ϵ 1 2 and Pr [ T id Γ 3 ] q p 1 p 2 ϵ 1 2 .
Bounding ( B - 4 ) and ( B - 5 ): For any two distinct queries ( t i , x i , y i ) ( t i , x i , y i ) Q F , by the ϵ 2 -AXU property of pair ( f 1 , f 2 ) , we have
Pr [ ( f 1 ( t i ) f 1 ( t i ) = x i x i ) ( f 2 ( t i ) f 2 ( t i ) = f 1 ( t i ) f 1 ( t i ) y i y i ) ] ϵ 2 2 .
Since there are q ( q 1 ) / 2 possible unordered pairs for { ( t i , x i , y i ) , ( t i , x i , y i ) } i i [ q ] , by union bound, one can obtain that
Pr [ T id Γ 4 ] ϵ 2 2 q 2 2 , and similarly , Pr [ T id Γ 5 ] ϵ 2 2 q 2 2 .
Bounding ( B - 6 ) and ( B - 7 ): For any two distinct construction queries ( t i , x i , y i ) ( t i , x i , y i ) Q F and any u 1 , j U 1 , by the ϵ 1 -regular and ϵ 2 -AXU properties of ( f 1 , f 2 ) , we have
Pr [ ( f 1 ( t i ) = x i u 1 , j ) ( f 2 ( t i ) f 2 ( t i ) = x i x i ) ] ϵ 1 ϵ 2 .
Then, summing over all ( t i , x i , y i ) ( t i , x i , y i ) Q F and u 1 , j U 1 , one has
Pr [ T id Γ 6 ] ϵ 1 ϵ 2 q 2 p 1 2 , and similarly , Pr [ T id Γ 7 ] ϵ 1 ϵ 2 q 2 p 2 2 .
Bounding ( B - 8 ): For any ( t i , x i , y i ) , ( t i , x i , y i ) , ( t i , x i , y i ) Q F with ( t i , x i , y i ) ( t i , x i , y i ) and ( t i , x i , y i ) ( t i , x i , y i ) , by the ϵ 2 -AXU property of ( f 1 , f 2 ) , one concludes that
Pr [ ( f 1 ( t i ) f 1 ( t i ) = x i x i ) ( f 2 ( t i ) f 2 ( t i ) = x i x i ) ] ϵ 2 2 .
Note that the above inequality also holds for the case t i = t i (resp. t i = t i ) since we have x i x i (resp. x i x i ) i.e., x i x i = 0 (resp. x i x i = 0 ). It is easy to count that the number of all possible ( t i , x i , y i ) , ( t i , x i , y i ) , ( t i , x i , y i ) is at most q 3 , which means that
Pr [ T id Γ 8 ] ϵ 2 2 q 3 .
Bounding ( B - 9 ), ( B - 10 ), ( B - 11 ), and ( B - 12 ): We deal with bad conditions (B-9) and (B-11) together by using the fact that
Pr [ T id Γ 9 Γ 11 ] Pr [ T id Γ 11 ] + Pr [ T id Γ 9 \ Γ 11 ] .
We first consider how to upper bound Pr [ T id Γ 11 ] . For the random variable α 1 = | { ( t , x , y ) Q F : x f 1 ( t ) U 1 } | (the randomness from the choice of f 1 ), its expectation value can be computed as
E [ α 1 ] ( t , x , y ) Q F : u 1 U 1 : Pr [ x f 1 ( t ) = u 1 ] ϵ 1 q p 1 ,
due to the ϵ 1 -regular property of ( f 1 , f 2 ) . By Markov’s inequality, one has
Pr [ T id Γ 11 ] E [ α 1 ] q ϵ 1 q p 1 .
Under the condition α 1 q , there are at most q / 2 pairs { ( ( t i , x i , y i ) , u 1 , j ) , ( ( t i , x i , y i ) ,   u 1 , j ) } such that x i f 1 ( t i ) = u 1 , j and x i f 1 ( t i ) = u 1 , j where ( t i , x i , y i ) ( t i , x i , y i ) Q F and ( u 1 , j , v 1 , j ) , ( u 1 , j , v 1 , j ) Q P 1 . In this case, the corresponding y i and y i are two independently uniform random variables over { 0 , 1 } n so that we have
Pr [ v 1 , j f 1 ( t i ) f 2 ( t i ) y i = v 1 , j f 1 ( t i ) f 2 ( t i ) y i ] 1 2 n .
By summing over all the q / 2 possible pairs, one can obtain that
Pr [ T id Γ 9 \ Γ 11 ] q 2 n + 1 .
Finally, it holds that
Pr [ T id Γ 9 Γ 11 ] ϵ 1 q p 1 + q 2 n + 1 .
Similarly, we obtain
Pr [ T id Γ 10 Γ 12 ] ϵ 1 q p 2 + q 2 n + 1 .
Bounding ( B - 13 ): To bound Pr [ β 1 q ] , we first define the random variable T F = | { ( ( t , x , y ) , ( t , x , y ) ) Q F × Q F : ( t , x , y ) ( t , x , y ) , x f 1 ( t ) = x f 1 ( t ) } | . By definition of β 1 , one has
β 1 = | { ( t , x , y ) Q F : ( t , x , y ) ( t , x , y ) , x f 1 ( t ) = x f 1 ( t ) } | T F .
Hence, E [ β 1 ] E [ T F ] . We can compute the expectation value of T F as
E [ T F ] = ( t , x , y ) ( t , x , y ) : Pr [ x f 1 ( t ) = x f 1 ( t ) ] ϵ 2 q 2 2
from the ϵ 2 -AXU property of ( f 1 , f 2 ) . By Markov’s inequality, one has
Pr [ β 1 q ] E [ β 1 ] q E [ T F ] q ϵ 2 q 3 / 2 2 , and similarly , Pr [ β 2 q ] ϵ 2 q 3 / 2 2 .
Finally, we obtain
Pr [ T id Γ 13 ] = Pr [ ( β 1 q ) ( β 2 q ) ] ϵ 2 q 3 / 2 .

Appendix B. More Details in Proof of Lemma 4

Lower Bounding p ( τ ) . Conditioned on P 1 Q P 1 and P 2 Q P 2 , P 1 (resp. P 2 ) is fixed on exactly p 1 (resp. p 2 ) input-output pairs. For each ( t , x , y ) Q U 1 , there exists a unique ( u 1 , v 1 ) Q P 1 satisfying x f 1 ( t ) = u 1 so that P 1 ( x f 1 ( t ) ) = P 1 ( u 1 ) = v 1 . Then we can define two corresponding multi-sets as:
U ˜ 2 = { x f 2 ( t ) : ( t , x , y ) Q U 1 } , V ˜ 2 = { P 1 ( x f 1 ( t ) ) f 1 ( t ) f 2 ( t ) y : ( t , x , y ) Q U 1 } .
Note that all values in U ˜ 2 (resp. V ˜ 2 ) are distinct since otherwise τ would satisfy (B-6) (resp. (B-9)). Then it holds that | U ˜ 2 | = | V ˜ 2 | = | Q U 1 | = α 1 . Moreover, since τ Γ 1 and τ Γ 2 , one conclude that U 2 U ˜ 2 = and V 2 V ˜ 2 = , respectively. Then we get
Pr [ E U 1 | P 2 Q P 2 ] = 1 ( 2 n p 2 ) α 1 .
Similarly, for each ( t , x , y ) Q U 2 , there exists a unique ( u 2 , v 2 ) Q P 2 satisfying x f 2 ( t ) = u 2 , which means P 2 ( x f 2 ( t ) ) = v 2 . Then two corresponding multi-sets can be defined as:
U ˜ 1 = { x f 1 ( t ) : ( t , x , y ) Q U 2 } , V ˜ 1 = { P 2 ( x f 2 ( t ) ) f 1 ( t ) f 2 ( t ) y : ( t , x , y ) Q U 2 } .
All values in U ˜ 1 (resp. V ˜ 1 ) are distinct since otherwise τ would satisfy (B-7) (resp. (B-10)). Then one has | U ˜ 1 | = | V ˜ 1 | = | Q U 2 | = α 2 . Moreover, since τ Γ 1 and τ Γ 3 , it holds that U 1 U ˜ 1 = and V 1 V ˜ 1 = , respectively. Hence,
Pr [ E U 2 | P 1 Q P 1 ] = 1 ( 2 n p 1 ) α 2 .
By combing (A1) and (A2), one can conclude that
p ( τ ) = 1 ( 2 n p 2 ) α 1 ( 2 n p 1 ) α 2 .
Now it holds that | U ˜ 1 | = | V ˜ 1 | = α 2 and | U ˜ 2 | = | V ˜ 2 | = α 1 . Then we define four disjoint collections U 1 = def ( U 1 , U ˜ 1 ) , V 1 = def ( V 1 , V ˜ 1 ) , U 2 = def ( U 2 , U ˜ 2 ) , and V 2 = def ( V 2 , V ˜ 2 ) . Notice that when conditioned on E U 1 E U 2 ( P i Q P i , i = 1 , 2 ) , P 1 is fixed on exactly p 1 + α 2 input-output pairs and P 2 is fixed on exactly p 2 + α 1 input-output pairs.
Lower Bounding p ( τ ) . Conditioned on E U 1 E U 2 ( P i Q P i , i = 1 , 2 ) we next lower bound the number of all possible “new” and distinct input-output pairs of P 1 and P 2 such that the event E X 1 E X 2 E 0 happens. We first define four multi-sets derived from Q X 1 and Q X 2 as:
U 1 , 1 = { x f 1 ( t ) : ( t , x , y ) Q X 1 } , U 2 , 1 = { x f 1 ( t ) : ( t , x , y ) Q X 2 } , U 1 , 2 = { x f 2 ( t ) : ( t , x , y ) Q X 1 } , U 2 , 2 = { x f 2 ( t ) : ( t , x , y ) Q X 2 } .
The size of four sets above can be denoted as α 1 , 1 = | U 1 , 1 | , α 1 , 2 = | U 1 , 2 | , α 2 , 1 = | U 2 , 1 | , and α 2 , 2 = | U 2 , 2 | . We also denote four additional sets as V 1 , 1 = P ( U 1 , 1 ) , V 1 , 2 = P ( U 1 , 2 ) , V 2 , 1 = P ( U 2 , 1 ) , and V 2 , 2 = P ( U 2 , 2 ) , which can be wrote more clearly as:
V 1 , 1 = { P ( x f 1 ( t ) ) : ( t , x , y ) Q X 1 } , V 2 , 1 = { P ( x f 1 ( t ) ) : ( t , x , y ) Q X 2 } , V 1 , 2 = { P ( x f 2 ( t ) ) : ( t , x , y ) Q X 1 } , V 2 , 2 = { P ( x f 2 ( t ) ) : ( t , x , y ) Q X 2 } .
For convenience, we rewrite U 1 , 1 and U 2 , 2 as:
U 1 , 1 = { u 1 , 1 , , u 1 , α 1 , 1 } , U 2 , 2 = { u 2 , 1 , , u 2 , α 2 , 2 } .
Recall that D 1 = { x f 1 ( t ) : ( t , x , y ) Q F } and D 2 = { x f 2 ( t ) : ( t , x , y ) Q F } . Then α 1 , 1 and α 1 , 2 can be bounded as:
α 1 , 1 x { 0 , 1 } n : δ D 1 ( x ) > 1 1 x { 0 , 1 } n : δ D 1 ( x ) > 1 δ D 1 ( x ) 2 = β 1 2 q 2 , α 1 , 2 i = 1 α 1 , 1 δ D 1 ( u 1 , i ) x { 0 , 1 } n : δ D 1 ( x ) > 1 δ D 1 ( x ) = β 1 q .
Similarly, we obtain α 2 , 2 q 2 and α 2 , 1 q . From the fact τ Γ 8 , one has that any items in the U 1 , 2 (resp. U 2 , 1 ) are distinct so that α 1 , 2 = | Q X 1 | (resp. α 2 , 1 = | Q X 2 | ) holds. Finally, we define two multi-sets derived from Q 0 as
U 0 1 = { x f 1 ( t ) : ( t , x , y ) Q 0 } and U 0 2 = { x f 2 ( t ) : ( t , x , y ) Q 0 } .
Due to the definition of Q 0 , it holds that any items in U 0 1 (resp. U 0 2 ) are distinct. We can also denote two additional sets as
V 0 1 = P ( U 0 1 ) = { P ( x f 1 ( t ) ) : ( t , x , y ) Q 0 } , V 0 2 = P ( U 0 2 ) = { P ( x f 2 ( t ) ) : ( t , x , y ) Q 0 } .
Let q = def | Q 0 | = q ( | Q U | + | Q V | + | Q X 1 | + | Q X 2 | ) = q ( α 1 + α 2 + α 1 , 2 + α 2 , 1 ) (besides, q = | U 0 1 | = | U 0 2 | ). Let m be the number of all distinct tweaks appearing in Q F , and then we use t ^ 1 , , t ^ m to denote these m distinct tweaks. Furthermore, write Q 0 , i as a set consisting of all the query-response tuples indexed by the tweak t ^ i in Q 0 and denote q i = | Q 0 , i | ( q i might be zero for some i). Then it holds that Q 0 = i = 1 m Q 0 , i and respectively q = i = 1 m q i . For convenience to count, we rearrange the items in Q 0 as
Q 0 = { ( t ^ 1 , x 1 , 1 , y 1 , 1 ) , , ( t ^ 1 , x 1 , q 1 , y 1 , q 1 ) , , ( t ^ m , x m , 1 , y m , 1 ) , , ( t ^ m , x m , q m , y m , q m ) } .
For i = 1 , , m and j = 1 , , q i , we denote
u ^ 1 , i , j = x i , j f 1 ( t ^ i ) and u ^ 2 , i , j = x i , j f 2 ( t ^ i ) .
For convenience to describe, we rewrite the sets U 0 1 and U 0 2 as
U 0 1 = { u ^ 1 , i , j : 1 i m , 1 j q i } and U 0 2 = { u ^ 2 , i , j : 1 i m , 1 j q i } .
Let U 1 + = ( U 1 , 1 , U 2 , 1 , U 0 1 ) and U 2 + = ( U 2 , 2 , U 1 , 2 , U 0 2 ) . Then the following proposition holds.
Proposition A1.
With notations as above, we have
(i) 
All sets in U 1 + (resp. U 2 + ) are disjoint, i.e., U 1 , 1 U 2 , 1 = , U 1 , 1 U 0 1 = , and U 2 , 1 U 0 1 = (resp. U 2 , 2 U 1 , 2 = , U 2 , 2 U 0 2 = , and U 1 , 2 U 0 2 = ).
(ii) 
U 1 + is inner disjoint with U 1 and U 2 + is inner disjoint with U 2 .
Proof. 
We first prove (i). From the fact τ Γ 8 , one can conclude that U 1 , 1 U 2 , 1 = . By definition of Q X 1 and Q 0 , U 1 , 1 U 0 1 = holds. By combining the fact τ Γ 8 and the disjoint property of Q X 2 and Q 0 , one has U 2 , 1 U 0 1 = . We can conclude that U 2 , 2 U 1 , 2 = , U 2 , 2 U 0 2 = , and U 1 , 2 U 0 2 = in a similar way.
Next we prove (ii) by enumerating all possible cases. For U 1 , 1 , the definition of Q X 1 means that U 1 , 1 U 1 = ; U 1 , 1 U ˜ 1 = comes from the fact τ Γ 7 . For U 2 , 1 , U 2 , 1 U 1 = holds due to the fact τ Γ 6 ; U 2 , 1 U ˜ 1 = can be obtained from the fact τ Γ 8 and the disjoint property between Q X 2 and Q U 2 . For U 0 1 , the definition of Q 0 means U 0 1 U 1 = ; U 0 1 U ˜ 1 = holds for the reason that τ Γ 7 and Q 0 is disjoint with Q U 2 .
For U 2 , 2 , the definition of Q X 2 means that U 2 , 2 U 2 = ; U 2 , 2 U ˜ 2 = comes from the fact τ Γ 6 . For U 1 , 2 , one has U 1 , 2 U 2 = since τ Γ 7 ; U 1 , 2 U ˜ 2 = holds due to the fact τ Γ 8 and the disjoint property between Q X 1 and Q U 1 . For U 0 2 , one has U 0 2 U 2 = by the definition of Q 0 ; U 0 2 U ˜ 2 = holds for the reason that τ Γ 6 and Q 0 is disjoint with Q U 1 .   □
Until now P is fixed on p 1 input-output pairs from U 1 to V 1 , α 2 input-output pairs from U ˜ 1 from V ˜ 1 , p 2 input-output pairs from U 2 to V 2 , and α 1 input-output pairs from U ˜ 2 to V ˜ 2 . Based on these facts, the next work is to choose other possible compatible items for V 1 , 1 = P 1 ( U 1 , 1 ) , V 2 , 1 = P 1 ( U 2 , 1 ) , V 0 1 = P 1 ( U 0 1 ) , V 1 , 2 = P 2 ( U 1 , 2 ) , V 2 , 2 = P 2 ( U 2 , 2 ) , and V 0 2 = P 2 ( U 0 2 ) to extend the fixed input-output pairs of permutations P 1 and P 2 , respectively.
Note that once the items in V 1 , 1 = P 1 ( U 1 , 1 ) are fixed, then the corresponding items in V 1 , 2 = P 2 ( U 1 , 2 ) are uniquely determined since these two sets are both derived from Q X 1 . Similarly, the choices for items in V 2 , 2 = P 2 ( U 2 , 2 ) (resp. V 0 1 = P 1 ( U 0 1 ) ) uniquely determine the items in V 2 , 1 = P 1 ( U 2 , 1 ) (resp. V 0 2 = P 2 ( U 0 2 ) ). Then we sample all possible items for these sets through three steps.
Step I . Construct V 1 , 1 = P 1 ( U 1 , 1 ) and V 1 , 2 = P 2 ( U 1 , 2 ) .
Recall that X u 1 = { ( t , x , y ) Q F : x f 1 ( t ) = u } and U 1 , 1 = { u 1 , 1 , , u 1 , α 1 , 1 } . Let N X 1 be the number of α 1 , 1 -wise tuples of distinct values ( v 1 , 1 , , v 1 , α 1 , 1 ) in { 0 , 1 } n \ V 1 V ˜ 1 satisfying the following two conditions:
(i)
For each i [ α 1 , 1 ] and each ( t , x , y ) X u 1 , i 1 , v 1 , i f 1 ( t ) f 2 ( t ) y V 2 V ˜ 2 .
(ii)
For each i [ α 1 , 1 ] and ( t , x , y ) X u 1 , i 1 , v 1 , i f 1 ( t ) f 2 ( t ) y is distinct from the values v 1 , j f 1 ( t ) f 2 ( t ) y , for j < i and ( t , x , y ) X u 1 , j 1 .
Now we count the number of all possible distinct tuples ( v 1 , 1 , , v 1 , α 1 , 1 ) in { 0 , 1 } n \ V 1 V ˜ 1 satisfying the above two conditions. First, we have | { 0 , 1 } n \ V 1 V ˜ 1 | = 2 n ( p 1 + α 2 ) . The first condition can remove at most ( | V 2 | + | V ˜ 2 | ) · | X u 1 , i 1 | = ( p 2 + α 1 ) · | X u 1 , i 1 | values, and the final condition can exclude at most | X u 1 , i 1 | · j = 1 i 1 | X u 1 , j 1 | α 1 , 2 · | X u 1 , i 1 | values for each choice of v 1 , i . By combining above facts, one gets that
N X 1 i = 1 α 1 , 1 ( 2 n p 1 α 2 ( i 1 ) ( p 2 + α 1 + α 1 , 2 ) | X u 1 , i 1 | ) .
In Condition (ii), for each i [ α 1 , 1 ] and ( t , x , y ) ( t , x , y ) X u 1 , i 1 , it holds that v 1 , i f 1 ( t ) f 2 ( t ) y v 1 , i f 1 ( t ) f 2 ( t ) y (which is equivalent to f 1 ( t ) f 2 ( t ) y f 1 ( t ) f 2 ( t ) y ) from the fact τ Γ 4 . After choosing any tuple of distinct values v 1 , i { 0 , 1 } n \ V 1 V ˜ 1 such that Conditions (i) and (ii) hold, we define two corresponding sets as follows:
V 1 , 1 = { v 1 , 1 , , v 1 , α 1 , 1 } , V 1 , 2 = { v 1 , i f 1 ( t ) f 2 ( t ) y : i = 1 , , α 1 , 1 a n d ( t , x , y ) X u 1 , i 1 } .
From the above discussion, we know that all values in V 1 , 1 are distinct, and all values in V 1 , 2 are also distinct. By the choice of v 1 , i , it holds that V 1 , 1 ( V 1 V ˜ 1 ) = and V 1 , 2 ( V 2 V ˜ 2 ) = . After this step, P 1 is fixed on α 1 , 1 input-output pairs from U 1 , 1 to V 1 , 1 , and P 2 is fixed on α 1 , 2 input-output pairs from U 1 , 2 to V 1 , 2 .
Step I I . Construct V 2 , 2 = P 2 ( U 2 , 2 ) and V 2 , 1 = P 1 ( U 2 , 1 ) .
We next deal with Q X 2 . Recall that U 2 , 2 = { u 2 , 1 , , u 2 , α 2 , 2 } and X u 2 = { ( t , x , y ) Q F : x f 2 ( t ) = u } . Let N X 2 be the number of α 2 , 2 -wise tuples of distinct values ( v 2 , 1 , , v 2 , α 2 , 2 ) in { 0 , 1 } n \ V 2 V ˜ 2 V 1 , 2 such that the following two conditions hold:
(i)
For each i [ α 2 , 2 ] and each ( t , x , y ) X u 2 , i 2 , v 2 , i f 1 ( t ) f 2 ( t ) y V 1 V ˜ 1 V 1 , 1 .
(ii)
For each i [ α 2 , 2 ] and ( t , x , y ) X u 2 , i 2 , v 2 , i f 1 ( t ) f 2 ( t ) y is distinct from the values v 2 , j f 1 ( t ) f 2 ( t ) y , for j < i and ( t , x , y ) X u 2 , j 2 .
Now we count the number of all possible distinct tuples ( v 2 , 1 , , v 2 , α 2 , 2 ) in { 0 , 1 } n \ V 2 V ˜ 2 V 1 , 2 satisfying above two conditions. It is easy to see that | { 0 , 1 } n \ V 2 V ˜ 2 V 1 , 2 | = 2 n ( p 2 + α 1 + α 1 , 2 ) . The first condition can remove at most ( | V 1 | + | V ˜ 1 | + | V 1 , 1 | ) · | X u 2 , i 2 | = ( p 1 + α 2 + α 1 , 1 ) · | X u 2 , i 2 | values, and the final condition can exclude at most | X u 2 , i 2 | · j = 1 i 1 | X u 2 , j 2 | α 2 , 1 · | X u 2 , i 2 | values for each choice of v 2 , i . Then we can bound N X 2 as
N X 2 i = 1 α 2 , 2 ( 2 n p 2 α 1 α 1 , 2 ( i 1 ) ( p 1 + α 2 + α 1 , 1 + α 2 , 1 ) | X u 2 , i 2 | ) .
In Condition (ii), for each i and ( t , x , y ) ( t , x , y ) X u 2 , i 2 , it holds that v 2 , i f 1 ( t ) f 2 ( t ) y v 2 , i f 1 ( t ) f 2 ( t ) y (which is equivalent to f 1 ( t ) f 2 ( t ) y f 1 ( t ) f 2 ( t ) y ) since otherwise τ would satisfy Condition (B-5). Similarly, we define two sets as:
V 2 , 2 = { v 2 , 1 , , v 2 , α 2 , 2 } , V 2 , 1 = { v 2 , i f 1 ( t ) f 2 ( t ) y : i = 1 , , α 2 , 2 and ( t , x , y ) X u 2 , i 2 } .
By the discussion above, all values in V 2 , 1 are distinct and all values in V 2 , 2 are also distinct. Then V 2 , 1 ( V 1 V ˜ 1 V 1 , 1 ) = and V 2 , 2 ( V 2 V ˜ 2 V 1 , 2 ) = hold from the choice of v 2 , i . After this step, P 2 is fixed on α 2 , 2 input-output pairs from U 2 , 2 to V 2 , 2 , and P 1 is fixed on α 2 , 1 input-output pairs from U 2 , 1 to V 2 , 1 .
Step I I I . Construct V 0 1 = P 1 ( U 0 1 ) and V 0 2 = P 2 ( U 0 2 ) .
It remains to sample all possible compatible values in V 0 1 and V 0 2 . First, we denote p 1 and p 2 as
p 1 = | V 1 V ˜ 1 V 1 , 1 V 2 , 1 | = p 1 + α 2 + α 1 , 1 + α 2 , 1 , p 2 = | V 2 V ˜ 2 V 2 , 2 V 1 , 2 | = p 2 + α 1 + α 1 , 2 + α 2 , 2 .
Recall that U 0 1 = { u ^ 1 , i , j : 1 i m , 1 j q i } and U 0 2 = { u ^ 2 , i , j : 1 i m , 1 j q i } . Let N 0 be the number of q -wise tuples of distinct values ( v ^ 1 , i , j ) 1 i m , 1 j q i in { 0 , 1 } n \ V 1 V ˜ 1 V 1 , 1 V 2 , 1 such that the following two conditions hold:
(i)
For each i = 1 , , m and j = 1 , , q i , v ^ 1 , i , j f 1 ( t ^ i ) f 2 ( t ^ i ) y i , j V 2 V ˜ 2 V 1 , 2 V 2 , 2 .
(ii)
For each i = 1 , , m and j = 1 , , q i , v ^ 1 , i , j f 1 ( t ^ i ) f 2 ( t ^ i ) y i , j is distinct from the values v ^ 1 , k , l f 1 ( t ^ k ) f 2 ( t ^ k ) y k , l for k < i and l [ q k ] . Furthermore, v ^ 1 , i , j f 1 ( t ^ i ) f 2 ( t ^ i ) y i , j should also be distinct from the values v ^ 1 , i , j f 1 ( t ^ i ) f 2 ( t ^ i ) y i , j with j < j .
Except these two conditions, each v ^ 1 , i , j must be chosen distinctly from each other. First, one has | { 0 , 1 } n \ V 1 V ˜ 1 V 1 , 1 V 2 , 1 | = 2 n p 1 . Then we count the number of all possible distinct tuples ( v ^ 1 , i , j ) 1 i m , 1 j q i satisfying above two conditions. The first condition can exclude at most p 2 values, and the second condition can exclude at most k = 1 i 1 q k j + 1 values for each choice of v ^ 1 , i , j . Furthermore, v ^ 1 , i , j should not be same to previous k = 1 i 1 q k j + 1 items. Based on these facts, one can obtain that
N 0 i = 1 m j = 1 q i ( 2 n p 1 p 2 2 k = 1 i 1 q k 2 ( j 1 ) ) .
Until now, we have chosen N X 1 · N X 2 · N 0 possible values for ( v 1 , i ) 1 i α 1 , 1 , ( v 2 , i ) 1 i α 2 , 2 , and ( v ^ 1 , i , j ) 1 i m , 1 j q i satisfying all above conditions. By this way, when conditioned on E U 1 E U 2 ( P i Q P i , i = 1 , 2 ) , the event E X 1 E X 2 E 0 happens means that P 1 (resp. P 2 ) is fixed on exactly α 1 , 1 + α 2 , 1 + q (resp. α 1 , 2 + α 2 , 2 + q ) “new” input-output pairs from U 1 , 1 U 2 , 1 U 0 1 (resp. U 2 , 2 U 1 , 2 U 0 2 ) to V 1 , 1 V 2 , 1 V 0 1 (resp. V 2 , 2 V 1 , 2 V 0 2 ). Finally, we conclude that
p ( τ ) N X 1 · N X 2 · N 0 ( 2 n p 1 α 2 ) α 1 , 1 + α 2 , 1 + q ( 2 n p 2 α 1 ) α 1 , 2 + α 2 , 2 + q .
From (A3) and (A7), one has
p ( τ ) N X 1 · N X 2 · N 0 ( 2 n p 1 ) α 2 + α 1 , 1 + α 2 , 1 + q ( 2 n p 2 ) α 1 + α 1 , 2 + α 2 , 2 + q .
Combining (21) and (A8), we get
Pr [ T re = τ ] Pr [ T id = τ ] N X 1 · N X 2 · N 0 · 2 n q ( 2 n p 1 ) α 2 + α 1 , 1 + α 2 , 1 + q ( 2 n p 2 ) α 1 + α 1 , 2 + α 2 , 2 + q = N X 1 2 n p 1 α 2 α 1 , 1 R X 1 · N X 2 2 n p 2 α 1 α 1 , 2 α 2 , 2 R X 2 · N 0 · 2 n q 2 n p 1 q 2 n p 2 q R 0 · 2 n ( q q ) 2 n p 1 α 2 · 2 n p 1 α 2 α 1 , 1 α 2 , 1 · 2 n p 2 α 1 + α 1 , 2 1 ( * * ) ,
where ( * * ) can be obtained from the fact 2 n p 1 α 2 · 2 n p 1 α 2 α 1 , 1 α 2 , 1 · 2 n p 2 α 1 + α 1 , 2 2 n ( α 2 + α 2 , 1 + α 1 + α 1 , 2 ) = 2 n ( q q ) .
First, R X 1 can be bounded as follows:
R X 1 i = 1 α 1 , 1 ( 2 n p 1 α 2 ( i 1 ) ( p 2 + α 1 + α 1 , 2 ) | X u 1 , i 1 | ) ( 2 n p 1 α 2 ) α 1 , 1 i = 1 α 1 , 1 1 ( p 2 + α 1 + α 1 , 2 ) | X u 1 , i 1 | 2 n p 1 α 2 ( i 1 ) 1 ( p 2 + α 1 + α 1 , 2 ) i = 1 α 1 , 1 | X u 1 , i 1 | 2 n p 1 α 2 α 1 , 1 = 1 ( p 2 + α 1 + α 1 , 2 ) α 1 , 2 2 n p 1 α 2 α 1 , 1 1 2 q ( p 2 + 2 q ) 2 n ,
where the last equality holds from the fact α 1 q , α 1 , 2 q , and p 1 + α 2 + α 1 , 1 p 1 + 2 q p 1 + p 2 + 3 q 2 n 1 .
Next, we can bound R X 2 as
R X 2 i = 1 α 2 , 2 ( 2 n p 2 α 1 α 1 , 2 ( i 1 ) ( p 1 + α 2 + α 1 , 1 + α 2 , 1 ) | X u 2 , i 2 | ) ( 2 n p 2 α 1 α 1 , 2 ) α 2 , 2 i = 1 α 2 , 2 1 ( p 1 + α 2 + α 1 , 1 + α 2 , 1 ) | X u 2 , i 2 | 2 n p 2 α 1 α 1 , 2 α 2 , 2 1 ( p 1 + α 2 + α 1 , 1 + α 2 , 1 ) i = 1 α 2 , 2 | X u 2 , i 2 | 2 n p 2 α 1 α 1 , 2 α 2 , 2 = 1 ( p 1 + α 2 + α 1 , 1 + α 2 , 1 ) α 2 , 1 2 n p 2 α 1 α 1 , 2 α 2 , 2 1 2 q ( p 1 + 3 q ) 2 n ,
where the last equality holds from the fact α 2 q , α 1 , 1 q , α 2 , 1 q , and p 2 + α 1 + α 1 , 2 + α 2 , 2 p 2 + 3 q p 1 + p 2 + 3 q 2 n 1 .
Finally, R 0 can be bounded in the following way:
R 0 i = 1 m 2 n q i · j = 0 q i 1 ( 2 n p 1 p 2 2 k = 1 i 1 q k 2 j ) ( 2 n p 1 ) q ( 2 n p 2 ) q = i = 1 m 2 n q i · j = 0 q i 1 ( 2 n p 1 p 2 2 k = 1 i 1 q k 2 j ) 2 n p 1 k = 1 i 1 q k q i 2 n p 2 k = 1 i 1 q k q i = i = 1 m j = 0 q i 1 2 n ( 2 n p 1 p 2 2 k = 1 i 1 q k 2 j ) 2 n p 1 k = 1 i 1 q k j 2 n p 2 k = 1 i 1 q k j ( a ) i = 1 m 1 4 q i ( p 1 + k = 1 i q k ) ( p 2 + k = 1 i q k ) 2 2 n ( b ) i = 1 m 1 4 q i ( p 1 + p 2 + 2 q ) 2 2 2 n ( c ) 1 4 q ( p 1 + p 2 + 2 q ) 2 2 2 n 1 4 q ( p 1 + p 2 + 2 q ) 2 2 2 n ,
where ( a ) holds by Lemma 2 when one sets A = q i , B = p 1 + k = 1 i 1 q k , and C = p 2 + k = 1 i 1 q k such that A + B p 1 + q = p 1 + q + α 1 , 1 α 1 , 2 α 1 p 1 + q + α 1 , 1 p 1 + 2 q + p 2 2 n 1 and A + C p 2 + q + α 2 , 2 p 1 + 2 q + p 2 2 n 1 , ( b ) follows as p 1 + k = 1 i q k p 1 + q p 1 + q + α 1 , 1 p 1 + 2 q + p 2 and p 2 + k = 1 i q k p 2 + q p 2 + q + α 2 , 2 p 1 + 2 q + p 2 , and ( c ) follows as q = k = 1 m q k .
We finally lower bound Pr [ T re = τ ] Pr [ T id = τ ] , from (A9), (A10), (A11), and (A12), as
Pr [ T re = τ ] Pr [ T id = τ ] 1 4 q ( p 1 + p 2 + 2 q ) 2 2 2 n 2 q ( p 1 + p 2 ) 2 n 10 q 2 n .

Appendix C. Upper Bound on Bad M 1

In this part, we upper bound each term Pr [ T id Γ i ] for i [ 15 ] one by one.
Bounding ( C - 1 ), ( C - 2 ), and ( C - 3 ): For any ( t i , x i , y i ) Q ¯ F and ( u j , v j ) , ( u j , v j ) Q ¯ P , by the ϵ 1 -regular property of ( f 1 , f 2 ) , one has
Pr [ ( f 1 ( t i ) = x i u j ) ( f 2 ( t i ) = x i v j ) ] ϵ 1 2 .
Since the number of all possible tuples for ( ( t i , x i , y i ) , u j , v j ) is at most q p 2 , by union bound, it holds that
Pr [ T id Γ 1 ] q p 2 ϵ 1 2 .
Similarly, we can bound the probabilities of (C-2) and (C-3) as
Pr [ T id Γ 2 ] q p 2 ϵ 1 2 and Pr [ T id Γ 3 ] q p 2 ϵ 1 2 .
Bounding ( C - 4 ) and ( C - 5 ): For any fixed construction queries ( t i , x i , y i ) , ( t i , x i , y i ) Q ¯ F , and ( u j , v j ) Q ¯ P , by the same reason as above, we have
Pr [ ( f 1 ( t i ) = x i u j ) ( f 2 ( t i ) = v j f 1 ( t i ) y i x i f 1 ( t i ) ) ] ϵ 1 2 .
Since there are at most q 2 p possible unordered pairs for { ( t i , x i , y i ) , ( t i , x i , y i ) , ( u j , v j ) } , by union bound, one obtains that
Pr [ T id Γ 4 ] q 2 p ϵ 1 2 , and similarly , Pr [ T id Γ 5 ] q 2 p ϵ 1 2 .
Bounding ( C - 6 ) and ( C - 7 ): For any fixed distinct construction queries ( t i , x i , y i ) , ( t i , x i , y i ) Q ¯ F and u j U , from the ϵ 1 -regular and ϵ 2 -AXU properties of ( f 1 , f 2 ) , one has
Pr [ ( f 1 ( t i ) = x i u j ) ( f 2 ( t i ) f 1 ( t i ) = x i x i ) ] ϵ 1 ϵ 2 .
Since there are at most q 2 p possible unordered pairs for { ( t i , x i , y i ) , ( t i , x i , y i ) , u j } , by union bound, it holds that
Pr [ T id Γ 6 ] q 2 p ϵ 1 ϵ 2 , and similarly , Pr [ T id Γ 7 ] q 2 p ϵ 1 ϵ 2 .
Bounding ( C - 8 ) and ( C - 9 ): For any two distinct construction queries ( t i , x i , y i ) , ( t i , x i , y i ) Q ¯ F , one can conclude
Pr [ ( f 1 ( t i ) f 1 ( t i ) = x i x i ) ( f 2 ( t i ) f 2 ( t i ) = f 1 ( t i ) f 1 ( t i ) y i y i ) ] ϵ 2 2
from the ϵ 2 -AXU property of ( f 1 , f 2 ) . In particular, when t i = t i , the above probability is in fact zero since in this case we have f 1 ( t i ) f 1 ( t i ) = 0 but x i x i . Then by summing over all q 2 possible unordered pairs { ( t i , x i , y i ) , ( t i , x i , y i ) } , one has
Pr [ T id Γ 8 ] q 2 · ϵ 2 2 q 2 ϵ 2 2 2 , and similarly , Pr [ T id Γ 9 ] q 2 ϵ 2 2 2 .
Bounding ( C - 10 ): For any ( t i , x i , y i ) , ( t i , x i , y i ) , and ( t i , x i , y i ) Q ¯ F with ( t i , x i , y i ) ( t i , x i , y i ) and ( t i , x i , y i ) ( t i , x i , y i ) , one can conclude, from the ϵ 2 -AXU property of ( f 1 , f 2 ) , that
Pr [ ( f 1 ( t i ) f 1 ( t i ) = x i x i ) ( f 2 ( t i ) f 2 ( t i ) = x i x i ) ] ϵ 2 2
Note that the number of all possible tuples { ( t i , x i , y i ) , ( t i , x i , y i ) , ( t i , x i , y i ) } is at most q 3 so that one has
Pr [ T id Γ 10 ] q 3 ϵ 2 2 .
Bounding ( C - 11 ), ( C - 12 ), ( C - 13 ), and ( C - 14 ): We deal with bad conditions (C-11) and (C-13) together by using the fact that
Pr [ T id Γ 11 Γ 13 ] Pr [ T id Γ 13 ] + Pr [ T id Γ 11 \ Γ 13 ] .
We first consider how to upper bound Pr [ T id Γ 13 ] . Recall that α ¯ 1 = | { ( t , x , y ) Q ¯ F : x f 1 ( t ) U } | . Then the expectation value of α ¯ 1 can be computed as
E [ α ¯ 1 ] = ( t , x , y ) Q ¯ F : u U : Pr [ x f 1 ( t ) = u ] p q ϵ 1
due to the ϵ 1 -regular property of ( f 1 , f 2 ) . By Markov’s inequality, one has
Pr [ T id Γ 13 ] E [ α ¯ 1 ] q = p q ϵ 1 .
Under the condition α ¯ 1 q , there are at most q / 2 pairs { ( ( t i , x i , y i ) , u j ) , ( ( t i , x i , y i ) , u j ) } such that x i f 1 ( t i ) = u j and x i f 1 ( t i ) = u j where ( t i , x i , y i ) ( t i , x i , y i ) Q ¯ F and ( u j , v j ) , ( u j , v j ) Q ¯ P . In this case, since the random variables y i and y i are independently and uniformly distributed over { 0 , 1 } n , one can conclude that
Pr [ v j f 1 ( t i ) f 2 ( t i ) y i = v j f 1 ( t i ) f 2 ( t i ) y i ] 1 2 n .
By summing over all these q / 2 possible pairs, we have
Pr [ T id Γ 11 \ Γ 13 ] q 2 n + 1 .
and so that it holds that
Pr [ T id Γ 11 Γ 13 ] p q ϵ 1 + q 2 n + 1 .
Similarly, we can obtain that
Pr [ T id Γ 12 Γ 14 ] p q ϵ 1 + q 2 n + 1 .
Bounding ( C - 15 ): To upper bound Pr [ T id Γ 15 ] , we first define the random variable T ¯ F = | { ( ( t , x , y ) , ( t , x , y ) ) Q ¯ F × Q ¯ F : ( t , x , y ) ( t , x , y ) , x f 1 ( t ) = x f 1 ( t ) } | . By definition of β ¯ 1 , it holds that
β ¯ 1 = | { ( t , x , y ) Q ¯ F : ( t , x , y ) ( t , x , y ) , x f 1 ( t ) = x f 1 ( t ) } | T ¯ F .
Thus, E [ β ¯ 1 ] E [ T ¯ F ] . Then the expectation value of T ¯ F can be bounded as
E [ T ¯ F ] = ( t , x , y ) ( t , x , y ) Q ¯ F 2 : Pr [ x f 1 ( t ) = x f 1 ( t ) ] q 2 ϵ 2 2
from the ϵ 2 -AXU property of ( f 1 , f 2 ) . By Markov’s inequality, we have
Pr [ β ¯ 1 q ] E [ β 1 ] q E [ T ¯ F ] q q 3 / 2 ϵ 2 2 .
Similarly, one has
Pr [ β ¯ 2 q ] q 3 / 2 ϵ 2 2 .
Finally, by combining the above two facts, it holds that
Pr [ T id Γ 15 ] Pr [ ( β ¯ 1 q ) ( β ¯ 2 q ) ] q 3 / 2 ϵ 2 .

Appendix D. More Details in Proof of Lemma 6

First we have
R 1 ( α ) k = 0 α 3 1 2 n ( q α 5 + α 6 + α ) p k ( p + α + q + α 3 ) | X ¯ u 3 , k + 1 1 | k = 0 α 3 1 2 n p k k = 0 α 3 1 1 q α 5 + α 6 + α 2 n p k ( p + α + q + α 3 ) | X ¯ u 3 , k + 1 1 | 2 n p k k = 0 α 3 1 1 q + α 6 + α 2 n p α 3 ( p + α + q + α 3 ) | X ¯ u 3 , k + 1 1 | 2 n p α 3 1 α 3 ( q + α 6 + α ) 2 n p α 3 ( p + α + q + α 3 ) k = 0 α 3 1 | X ¯ u 3 , k + 1 1 | 2 n p α 3 ( d ) 1 2 α 3 ( q + α 6 + α ) 2 n 2 ( p + α + q + α 3 ) α 4 2 n ( e ) 1 2 q ( q + q + q / 2 n 3 ) 2 n 2 ( p + q / 2 n 3 + q + q ) q 2 n = 1 4 q 3 / 2 2 n 2 p q 2 n 4 q 2 n 4 q 3 / 2 2 4 n 3 1 8 q 3 / 2 2 n 2 p q 2 n 4 q 2 n ,
where ( d ) follows as p + α 3 p + q 2 n 1 so that 2 n p α 3 > 2 n 1 , and ( e ) follows as α 3 , α 4 , α 6 q and α M q / 2 n 3 .
Then, the item R 2 ( α ) can be bounded as
R 2 ( α ) k = 0 α 6 1 2 n ( p + α 3 + q + α ) k ( p + q + α 3 + α 6 + α ) | X ¯ v 6 , k + 1 2 | k = 0 α 6 1 2 n p α 3 k k = 0 α 6 1 1 q + α 2 n p α 3 k ( p + q + α 3 + α 6 + α ) | X ¯ v 6 , k + 1 2 | 2 n p α 3 k ( f ) 1 2 ( q + α ) α 6 2 n 2 ( p + q + α 3 + α 6 + α ) k = 0 α 6 1 | X ¯ v 6 , k + 1 2 | 2 n 1 2 ( q + α ) α 6 2 n 2 ( p + q + α 3 + α 6 + α ) α 5 2 n ( g ) 1 2 ( q + q / 2 n 3 ) q 2 n 2 ( p + q + 2 q + q / 2 n 3 ) q 2 n 1 8 q 3 / 2 2 n 2 p q 2 n 4 q 2 n ,
where ( f ) follows as p + α 3 + k p + α 3 + α 6 p + 2 q 2 n 1 so that 2 n p k > 2 n 1 and ( g ) follows as α 3 , α 5 , α 6 q and α M q / 2 n 3 .
Finally, R 0 ( α ) can be bounded in the following.
R 0 ( α ) = 2 n q ¯ · N S ( α ) · N 0 ( α ) 2 n p 2 q ¯ + 3 α ( q ¯ ) 2 α α ! · ( 1 ϵ 0 ) · N 0 ( α ) · 2 n q ¯ 2 n p 2 q ¯ + 3 α = ( 1 ϵ 0 ) · ( q ¯ ) 2 α α ! · 2 n q ¯ · i = 1 m j = 0 q ¯ i 1 ( 2 n 2 p 2 q ¯ 2 α 2 k = 1 i 1 q ¯ k 2 j ) 2 n p q ¯ + α + q ¯ = ( 1 ϵ 0 ) · ( q ¯ ) 2 α ( q ¯ ) α ( q ¯ ) α · 2 n q ¯ · i = 1 m j = 0 q ¯ i 1 ( 2 n 2 p 2 q ¯ 2 α 2 k = 1 i 1 q ¯ k 2 j ) 2 n p q ¯ q ¯ + α 2 n p q ¯ q ¯ + α · Hyp 2 n p , q ¯ , q ¯ ( α ) = ( 1 ϵ 0 ) · ( q ¯ ) 2 α ( q ¯ ) α ( q ¯ ) α B 1 ( α ) · ( 2 n ) 2 α 2 n p q ¯ α 2 1 · Hyp 2 n p , q ¯ , q ¯ ( α ) · 2 n q ¯ · i = 1 m j = 0 q ¯ i 1 ( 2 n 2 p 2 q ¯ 2 α 2 k = 1 i 1 q ¯ k 2 j ) 2 n p q ¯ α q ¯ 2 B 2 ( α )
For B 1 ( α ) , we have
B 1 ( α ) ( h ) ( q ¯ 2 M ) 2 α ( q ¯ ) 2 α = 1 2 M q ¯ 2 α 1 4 M α q ¯ 1 4 α 2 n / 3 ( j ) 1 4 q 2 2 n / 3 ,
where ( h ) follows as q i q 2 M for 0 i 2 α 2 M and ( q ¯ ) α ( q ¯ ) α and ( j ) follows as α M q 2 n / 3 .
We then bound the B 2 ( α ) as
B 2 ( α ) = 2 n ( i = 1 m q ¯ i ) i = 1 m j = 0 q ¯ i 1 ( 2 n 2 p 2 q ¯ 2 α 2 k = 1 i 1 q ¯ k 2 j ) i = 1 m 2 n p q ¯ α k = 1 i 1 q ¯ k q ¯ i 2 = i = 1 m 2 n q ¯ i j = 0 q ¯ i 1 ( 2 n 2 p 2 q ¯ 2 α 2 k = 1 i 1 q ¯ k 2 j ) 2 n p q ¯ α k = 1 i 1 q ¯ k q ¯ i 2 = i = 1 m j = 0 q ¯ i 1 2 n ( 2 n 2 p 2 q ¯ 2 α 2 k = 1 i 1 q ¯ k 2 j ) 2 n p q ¯ α k = 1 i 1 q ¯ k j 2 ( k ) i = 1 m 1 4 q ¯ i ( p + q ¯ + α + k = 1 i q ¯ k ) 2 2 2 n i = 1 m 1 4 q ¯ i ( p + 2 q ¯ ) 2 2 2 n ( l ) 1 4 q ¯ ( p + 2 q ¯ ) 2 2 2 n 1 4 q ( p + 2 q + 6 q ) 2 2 2 n ,
where ( k ) follows as Lemma 2 when we set N = 2 n , A = q ¯ i and B = C = p + q ¯ + α + k = 1 i 1 q ¯ k where it satisfies A + B = A + C = p + q ¯ + α + k = 1 i q ¯ k p + 2 q ¯ p + 2 q + 6 q 2 n 1 from the assumption and ( l ) follows as q ¯ = i = 1 m q ¯ i .

References

  1. Bonilla, L.L.; Alvaro, M.; Carretero, M. Chaos-based true random number generators. J. Math. Ind. 2016, 7, 191. [Google Scholar] [CrossRef] [Green Version]
  2. Trejo, J.M.A.; Calude, C.S. A new quantum random number generator certified by value indefiniteness. Theor. Comput. Sci. 2021, 862, 3–13. [Google Scholar] [CrossRef]
  3. Blum, M.; Micali, S. How to Generate Cryptographically Strong Sequences of Pseudo-Random Bits. SIAM J. Comput. 1984, 13, 850–864. [Google Scholar] [CrossRef]
  4. Yao, A.C.C. Theory and Applications of Trapdoor Functions. In Proceedings of the 23rd Annual Symposium on Foundations of Computer Science (SFCS 1982), Chicago, IL, USA, 3–5 November 1982. [Google Scholar]
  5. Goldreich, O.; Goldwasser, S.; Micali, S. How to Construct Random Functions. In Proceedings of the 25th Annual Symposium onFoundations of Computer Science, Singer Island, FL, USA, 24–26 October 1984. [Google Scholar]
  6. Håstad, J.; Impagliazzo, R.; Levin, L.A.; Luby, M. Construction of a Pseudo-Random Generator From Any One-Way Function. SIAM J. Comput. 1993, 28, 12–24. [Google Scholar]
  7. Naor, M.; Reingold, O.; Rosen, A. Pseudorandom Functions and Factoring. SIAM J. Comput. 2002, 31, 1383–1404. [Google Scholar] [CrossRef]
  8. Naor, M.; Reingold, O. Number-theoretic constructions of efficient pseudo-random functions. J. ACM 2004, 51, 231–262. [Google Scholar] [CrossRef]
  9. Banerjee, A.; Peikert, C.; Rosen, A. Pseudorandom Functions and Lattices. In Advances in Cryptology—EUROCRYPT 2012; Pointcheval, D., Johansson, T., Eds.; Springer: Berlin/Heidelberg, Germany, 2012; Volume 7237, pp. 719–737. [Google Scholar]
  10. Boneh, D.; Lewi, K.; Montgomery, H.W.; Raghunathan, A. Key Homomorphic PRFs and Their Applications. In Advances in Cryptology—CRYPTO 2013, Part I; Canetti, R., Garay, J.A., Eds.; Springer: Berlin/Heidelberg, Germany, 2013; Volume 8042, pp. 410–428. [Google Scholar]
  11. Banerjee, A.; Peikert, C. New and Improved Key-Homomorphic Pseudorandom Functions. In Advances in Cryptology—CRYPTO 2014, Part I; Garay, J.A., Gennaro, R., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; Volume 8616, pp. 353–370. [Google Scholar]
  12. Bellare, M.; Krovetz, T.; Rogaway, P. Luby-Rackoff Backwards: Increasing Security by Making Block Ciphers Non-invertible. In Advances in Cryptology—EUROCRYPT’98; Nyberg, K., Ed.; Springer: Berlin/Heidelberg, Germany, 1998; Volume 1403, pp. 266–280. [Google Scholar]
  13. Cogliati, B.; Seurin, Y. EWCDM: An Efficient, Beyond-Birthday Secure, Nonce-Misuse Resistant MAC. In Advances in Cryptology—CRYPTO 2016, Part I; Robshaw, M., Katz, J., Eds.; Springer: Berlin/Heidelberg, Germany, 2016; Volume 9814, pp. 121–149. [Google Scholar]
  14. Mennink, B.; Neves, S. Encrypted Davies-Meyer and Its Dual: Towards Optimal Security Using Mirror Theory. In Advances in Cryptology—CRYPTO 2017, Part III; Katz, J., Shacham, H., Eds.; Springer: Berlin/Heidelberg, Germany, 2017; Volume 10403, pp. 556–583. [Google Scholar]
  15. Chen, Y.L.; Lambooij, E.; Mennink, B. How to Build Pseudorandom Functions from Public Random Permutations. In Advances in Cryptology—CRYPTO 2019, Part I; Boldyreva, A., Micciancio, D., Eds.; Springer: Berlin/Heidelberg, Germany, 2019; Volume 11692, pp. 266–293. [Google Scholar]
  16. Cogliati, B.; Lampe, R.; Seurin, Y. Tweaking Even-Mansour Ciphers. In Advances in Cryptology—CRYPTO 2015, Part I; Gennaro, R., Robshaw, M.J.B., Eds.; Springer: Berlin/Heidelberg, Germany, 2015; Volume 9215, pp. 189–208. [Google Scholar]
  17. Dutta, A. Minimizing the Two-Round Tweakable Even-Mansour Cipher. In Advances in Cryptology—ASIACRYPT 2020, Part I; Moriai, S., Wang, H., Eds.; Springer: Berlin/Heidelberg, Germany, 2020; Volume 12491, pp. 601–629. [Google Scholar]
  18. Chakraborti, A.; Nandi, M.; Talnikar, S.; Yasuda, K. On the Composition of Single-Keyed Tweakable Even-Mansour for Achieving BBB Security. IACR Trans. Symm. Cryptol. 2020, 2020, 1–39. [Google Scholar] [CrossRef]
  19. Dutta, A.; Nandi, M.; Talnikar, S. Permutation Based EDM: An Inverse Free BBB Secure PRF. IACR Trans. Symmetric Cryptol. 2021, 2021, 31–70. [Google Scholar] [CrossRef]
  20. Chen, S.; Steinberger, J.P. Tight Security Bounds for Key-Alternating Ciphers. In Advances in Cryptology—EUROCRYPT 2014; Nguyen, P.Q., Oswald, E., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; Volume 8441, pp. 327–350. [Google Scholar] [CrossRef] [Green Version]
  21. Patarin, J. The “Coefficients H” Technique (Invited Talk). In Selected Areas in Cryptography. SAC 2008; Avanzi, R.M., Keliher, L., Sica, F., Eds.; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5381, pp. 328–345. [Google Scholar] [CrossRef] [Green Version]
  22. Chen, S.; Lampe, R.; Lee, J.; Seurin, Y.; Steinberger, J.P. Minimizing the Two-Round Even-Mansour Cipher. In Advances in Cryptology—CRYPTO 2014, Part I; Garay, J.A., Gennaro, R., Eds.; Springer: Berlin/Heidelberg, Germany, 2014; Volume 8616, pp. 39–56. [Google Scholar] [CrossRef] [Green Version]
  23. Minematsu, K.; Iwata, T. Building Blockcipher from Tweakable Blockcipher: Extending FSE 2009 Proposal. In Processings of 13th IMA International Conference on Cryptography and Coding (IMACC 2011); Chen, L., Ed.; Springer: Berlin/Heidelberg, Germany, 2011; Volume 7089, pp. 391–412. [Google Scholar]
Figure 1. Graphical representation of the motivation to define bad cases for the transcript in the ideal world, which corresponds to the bad conditions from (C-1) to (C-12) in Section 4. In this graph, the same color in different lines means that there exists a collision between these places.
Figure 1. Graphical representation of the motivation to define bad cases for the transcript in the ideal world, which corresponds to the bad conditions from (C-1) to (C-12) in Section 4. In this graph, the same color in different lines means that there exists a collision between these places.
Entropy 23 01296 g001
Figure 2. The illustration of the RP-based keyed function F K 1 , K 2 P 1 , , P r in the multi-key setting, where the distinguisher D interacts with the real oracle at left, and with the ideal oracle at right.
Figure 2. The illustration of the RP-based keyed function F K 1 , K 2 P 1 , , P r in the multi-key setting, where the distinguisher D interacts with the real oracle at left, and with the ideal oracle at right.
Entropy 23 01296 g002
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Nan, J.; Zhang, P.; Hu, H. Constructions of Beyond-Birthday Secure PRFs from Random Permutations, Revisited. Entropy 2021, 23, 1296. https://doi.org/10.3390/e23101296

AMA Style

Nan J, Zhang P, Hu H. Constructions of Beyond-Birthday Secure PRFs from Random Permutations, Revisited. Entropy. 2021; 23(10):1296. https://doi.org/10.3390/e23101296

Chicago/Turabian Style

Nan, Jiehui, Ping Zhang, and Honggang Hu. 2021. "Constructions of Beyond-Birthday Secure PRFs from Random Permutations, Revisited" Entropy 23, no. 10: 1296. https://doi.org/10.3390/e23101296

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop