Cryptographic security is usually defined as a guarantee that holds except when a bad event with negligible probability occurs, and nothing is guaranteed in that bad case. However, in settings where such failure can happen with substantial probability, one needs to provide guarantees even for the bad case. A typical example is where a (possibly weak) password is used instead of a secure cryptographic key to protect a session, the bad event being that the adversary correctly guesses the password. In a situation with multiple such sessions, a per-session guarantee is desired: any session for which the password has not been guessed remains secure, independently of whether other sessions have been compromised. A new formalism for stating such gracefully degrading security guarantees is introduced and applied to analyze the examples of password-based message authentication and password-based encryption. While a natural per-message guarantee is achieved for authentication, the situation of password-based encryption is more delicate: a per-session confidentiality guarantee only holds against attackers for which the distribution of password-guessing effort over the sessions is known in advance. In contrast, for more general attackers without such a restriction, a strong, composable notion of security cannot be achieved.
Human-memorable passwords represent one of the most widely deployed security mechanisms in practice. They are used to authenticate human users in order to grant them access to various resources such as their computer accounts, encrypted files, web services, and many more. Despite well-known problems associated with this mechanism, its practicality and simplicity from the users’ perspective is the main cause of its persisting prevalence. As an example, more than 90% of Google users employ passwords as the only authentication mechanism for accessing their accounts [28]. Acknowledging this situation, it is important that security engineers, including designers of cryptographic protocols, have a precise understanding of the security guarantees that passwords provide, especially for multiple sessions. We use the general term session here to refer to one use of a password in a protocol, such as one encryption and decryption in password-based encryption, or one login to a server.1
This is also referred to as the multi-user setting in the literature, but we prefer the term session here since the same user can participate in multiple sessions.
There has been significant effort in formalizing the use of passwords, but the standard provable-security approach in cryptography, focusing on a single session, falls short of modeling the expected guarantees. The main reason for this is that passwords, in contrast to cryptographic keys, can be guessed by the attacker with a probability that can hardly be considered insignificant in the analysis (independently of whether a concrete or asymptotic security approach is being used). This is because they are chosen by the users, and therefore typically do not contain sufficient entropy. When inferring the security guarantees for multiple sessions via the standard hybrid argument, these substantial terms from the analyses of the individual sessions accumulate, and may render the overall statement trivial.
To obtain practically relevant statements about systems that allow for many sessions with passwords, one cannot resign on all security guarantees as soon as any password is guessed. Ideally, one would instead hope that as long as not all passwords were broken, the sessions with passwords that are still safe from the attacker enjoy a non-reduced degree of security. This simple yet important observation has been emphasized before, most notably in the work of Bellare et al. [6] on multi-instance security. At a very high level, their definition aims at ensuring that, in a setting where the security of each single session cannot be guaranteed, the amount of work needed for breaking many sessions cannot be amortized, i.e., it grows (linearly) with the number of sessions attacked.
This approach, while bringing to light a problem of great practical relevance, still suffers from certain shortcomings that can be illustrated on the example of password-based cryptography. By focusing only on the number of sessions that can be broken, multi-instance security cannot capture the intuition that sessions protected by strong passwords should be less vulnerable than sessions protected by weak passwords. Indeed, as the resulting guarantees are in the form of a global upper bound on the number of sessions that can be broken, they do not give any specific guarantee for a session whose password was not guessed, independently of whether other sessions were compromised.
From a broader perspective, a setting with multiple sessions relying on passwords can be seen as an instance of a scenario where the considered resource (e.g., a webmail server) can be gradually weakened by the adversary (e.g., by guessing the passwords in some of the sessions), while it is still expected to provide some security guarantees (e.g., for the other sessions) after such weakening.
Contributions of this work
This paper develops a technique for modeling resources that are available to parties and used in protocols or applications and can be gradually weakened (referred to as “downgrading”). Later, the technique is applied to password-based cryptography in the random oracle model, for analyzing the security of schemes that use password-derived keys. This work is a corrected and extended version of the conference paper with the same title [14].
Downgradable resources. The first contribution is a natural and intuitive formalization of settings where a considered resource can be potentially downgraded by the actions of an attacker, but still maintains some security guarantees afterwards. While there are many possible ways to analyze such settings, the proposed formalization allows for the natural decoupling of the descriptions of (1) the resource’s behavior at various “levels” of the downgrade; and (2) the mechanism that controls how the system is currently downgraded (as a response to the actions of the attacker). This modularity allows for simpler analyses of a wide range of resources that can be seen in this way, with the concrete case of password-based cryptography being discussed below. The technique is, however, more general, and may also find applications in other scenarios where guarantees may degrade gradually, such as the failure of (some) computational assumptions.
The modeling as proposed is carried out in the constructive cryptography framework [20,22] and does not require any modifications of its security definitions. A similar approach will be possible in any simulation-based framework, although in particular an analogy in the universal composability framework [9] will require care in bounding the number of machine instances in the formalization of the concrete type of statement discussed here.
Applications to password-based cryptography. The second contribution consists of applying the above modeling approach to several settings that involve multiple sessions using cryptographic keys derived from hashing passwords in the random oracle model. The potential downgrading considered here corresponds to guessing the passwords in some of the sessions.
Idealizing the hash function as a random oracle, a natural expectation for any such setting is that one obtains a per-session guarantee, i.e. that as long as the attacker does not guess a password in a particular session, the security guarantees provided in this session remain identical to the case where a perfect key is used (i.e., chosen uniformly at random from a large key space). In particular, the security guarantees of one session are not influenced by other sessions, such as by other users’ poor choice of a password.2
While this strong isolation between different sessions is naturally expected for password-based encryption, it may be less so in other settings with shared resources such as access to a common server, where shared data may be exposed or access with user permissions may enable privilege-escalation attacks.
This intuitive view is not generally correct. The reason of this breakdown (which is a variant of the commitment problem that occurs in adaptive attacks on public-key encryption) is explained below, and a series of results discussed below draws a map of settings that do/do not succumb to this problem:
Password-based MACs. If the password-derived keys are used by a MAC to authenticate insecure channels, per-session message authentication is achieved.
Single-session PBE. For password-based (symmetric) encryption (PBE), obtaining a composable statement (i.e., in a simulation-based framework) is much more delicate even in a single-session case. The reason for this is that, roughly speaking, the simulator in the ideal world is expected to produce a simulated ciphertext upon every encryption and without any knowledge of the actual plaintext. However, if the distinguisher later guesses the underlying password, and hence can derive the encryption key, it can easily decrypt the simulated ciphertext and compare the result to the (known) plaintext. But the simulated ciphertext essentially committed the simulator to a message (or a small subset of the message space), so the check will fail with overwhelming probability. Nonetheless, in the single-session setting, PBE is still secure in the expected sense.
Multi-session PBE. In line with the motivation, the desired result would be to obtain per-session confidentiality, an analogue of the above single-session statement for the setting with multiple sessions. Surprisingly, lifting this positive result to the multi-session setting is unachievable. Roughly speaking, any construction of r secure channels from r authenticated channels and the corresponding r password-derived keys will suffer from a simulation problem analogous to the single-session case described above. Yet, in the multi-session case, the simulation problem provably cannot be overcome.
Multi-session PBE with local assumptions. To side-step the above impossibility statement, the next result considers the setting of password-based encryption under an additional assumption that the number of adversarial password guesses in each of the sessions is a priori known.
While this assumption seems implausible in general, there may be specific settings in which the validity of the per-session bounds can be argued. The paper shows that the assumption of local bounds is sufficient to overcome the commitment problem, and proves that the intuitively expected guarantees described above are indeed achieved. The simulator constructed in the proof, however, depends on the password distribution.
Salting.Salting is widely used as a domain-separation technique for hash functions, and can be understood as constructing from a single hash function multiple hash functions that can be used in different sessions. It is, however, shown that salting leads to a setting where the adversary’s resources spent in the sessions can only be bounded globally. Together with the above result, this implies that salting cannot be used together with PBE for obtaining independent sessions.
PBE scheme from PKCS #5. Finally, it is observed that the arguments underlying the above impossibility result in items 3 and 5 apply to the password-based encryption as standardized in PKCS #5 [17].
Composability. Overall, the results shown in this paper yield a characterization of when password-derived keys can be used in a composable simulation-based security framework for the task of secure communication. The aim for strong, composable security guarantees is motivated by the particular relevance of password-based cryptography in the Internet, where various cryptographic schemes are used concurrently and as building blocks of larger protocols. The impossibility results are therefore also stated with respect to this strong and general definition; they do not rule out more specific and restricted security definitions that may be sufficient for certain applications.
Related work
Beyond the work on multi-instance security by Bellare et al. [6] that was discussed in the introduction above, there are large amounts of literature on passwords. On the empirical side, the weaknesses of passwords in practice were studied e.g. in [26].
For password-derived keys, most provable-security works focused on the single-session setting, analyzing ways to augment the key-derivation process to slow down offline brute-force password-guessing attacks. Techniques to achieve this include salting (which was introduced in a scenario with multiple users but without a provable-security analysis) [17], iteration [6,13,24,30], and hashing with moderately hard-to-compute functions [2,11,27]. However, the security analyses of those works have a different aim from this one as none of them considers the multi-session scenario. A notable, already mentioned exception is [6] which studied key derivation functions proposed in PKCS #5 [17] and did focus on security in a setting with multiple users.
A key-recovery security definition for password-based encryption was given in [1], but here also only single-session security was considered.
Finally, a separate line of work aims at realizing password-authenticated key exchange (PAKE) protocols [5,10,15,18] that prevent the possibility of offline password-guessing attacks and result in keys that can then safely be used for encryption or authentication. While some of these results are obtained in a composable, simulation-based framework and hence extend naturally to the multi-session case, the protocols are intrinsically interactive and cannot be used in non-interactive password-based settings such as the ones discussed in this work.
Structure of this paper
Section 2 contains preliminaries such as notational conventions and definitions that are needed for the technical sections. Section 3 introduces the formal model of downgradable systems that is used to model the failure of security guarantees, such as through a guessed password. The first application appears in Section 4, where we discuss the key-derivation from a password via a hash function that is modeled as a random oracle. Section 5 shows that using these password-derived keys in MACs achieves the desired per-session guarantee, namely that each authentication is individually secure unless the corresponding password is guessed. Section 6 discusses the more intricate case of password-based encryption, showing that while for a single session PBE satisfies the expected security guarantee, achieving a per-session guarantee for multiple sessions is impossible if only a global bound on the attacker’s resources is known. Yet, if one assumes a stronger, local bound, then security becomes possible. The section also shows that the salting technique for separating the domain of a hash function only leads to a global bound on the attacker’s resources. Finally, Section 7 sets the results shown in this work into a broader perspective.
Preliminaries
Basic notation
Sets are denoted by calligraphic letters or capital Greek letters (e.g., ). Throughout this paper, only discrete random variables will be considered. A discrete random variable will be denoted by an upper-case letter X, its range by the corresponding calligraphic letter , and a realization of the random variable X will be denoted by the corresponding lower-case letter x. Unless stated otherwise, denotes a random variable X selected independently and uniformly at random from . A tuple of r integers will be denoted by a vector symbol . The set of bit strings of finite length is denoted and denotes the concatenation of two bit strings x and y. The empty bit string is denoted ◇, while ◆ is used as an error symbol.
Systems
Many cryptographic primitives (e.g. block ciphers, MAC schemes, random functions) can be described as -random systems [23] taking inputs and generating for each input an output . In full generality, such an output depends probabilistically on all the previous inputs as well as all the previous outputs . Three distinct types of random systems will be considered: resources, converters and distinguishers.
Resources and converters. Resources that can be accessed by multiple parties can be viewed as random systems with multiple interfaces and formalized by making an interface identifier an explicit part of the input (or output). The resources in this work have three interfaces, which are naturally labeled by elements of the set , for Alice’s, Bob’s and Eve’s interface, respectively. As a notational convention, generic resources are generally denoted by upper-case bold-face letters, such as R or S, and specific resources are denoted by upper-case sans-serif words, such as for a shared secret key resource or for an authenticated channel resource.
A strategy (or protocol machine) employed locally by a party is modeled by a converter, which can also be viewed as a random system with two interfaces: an inside interface and an outside interface, denoted by and , respectively. In this view, the inside interface is attached to the i-interface of a resource and models how the scheme makes use of this resource, where , while the outside interface of the converter becomes the i-interface of the composite system and models how the scheme can be used in applications and higher-level protocols. A protocol then corresponds to a pair of converters, one for each honest party. Converters are denoted by lower-case Greek letters (e.g., ) or in sans-serif fonts (e.g., ). The set of all converters is denoted by Σ. Attaching the inside interface of a converter α to the i-interface of a resource R is denoted by and the resulting system is again a resource. There is an identity converter , which satisfies . Any two converters α and β can be composed sequentially, denoted , by connecting the inside interface of β to the outside interface of α. It can then be shown that the operations described are such that , and that the application of converters at different interfaces h and i commute in the sense that .
For two resources R and S, their parallel composition is denoted by . For each interface , the i-interface of R and S are merged and become the sub-interfaces of the i-interface of , which are denoted by and , respectively. A converter α that connects to the i-interface of has two inside sub-interfaces, denoted by and , where the first one connects to and the second one to . Any two converters α and β can also be taken in parallel, denoted , which can be defined such that . These parallel composition operations and associated notations extend to the case of more than two systems in a straightforward manner.
Distinguishers and reductions. A natural notion of similarity for resources is based on the concept of distinguishing. Intuitively, a distinguisher D can be viewed as a random system that connects to all the interfaces of a resource R, interacts with this resource, and at the end of this random experiment outputs a single bit denoted B. The probability that the bit B is 1 in this experiment is written as . For two resources R and S, the distinguishing advantage of a distinguisher D in telling apart R from S is then defined as
The resources R and S are said to be equivalent, denoted , if for all distinguishers D. A distinguisher D emulating a converter α at interface induces a new distinguisher, denoted , defined by .
The proofs in this paper will often reduce one distinguishing problem to another one. That is, a distinguisher D trying to tell apart two resources U and V is transformed into a new distinguisher whose task is instead to distinguish the resource R from S. Such a reduction is done by exhibiting a reduction systemC which translates one setting into the other. More formally, such a reduction system C is a converter (with one inside and one outside interface), where the inside interface of C connects to the merged interfaces of the resource R, denoted , and the outside interface of C can be accessed by a distinguisher. To reduce the task of distinguishing U from V to that of R and S, one exhibits a reduction system C such that and . For all distinguishers D it then follows that , where the last equality comes from the fact that C can also be thought of as being part of the distinguisher.
Games
A central tool in deriving an indistinguishability proof between two systems is to characterize both systems as being equivalent until a certain condition arises [7,23]. Thus, being able to distinguish both systems requires to provoke this condition, and one is then interested in upper-bounding the probability of this event. Interacting with a random system in order to provoke a certain condition is naturally modeled by defining an additional monotone binary output (MBO) on the original system, where the binary output is monotone in the sense that it is initially set to 0 and that, once it has turned to 1, it can not turn back to 0. An -system where the second output component is monotone is often indicated by using a system symbol with a hat, such as . In this context, the system is often referred to as a game, where winning the game means setting the MBO to 1, where are the values of the MBO after rounds of interaction.
For an -system with an MBO, the -system obtained from by ignoring the MBO will usually be referred to as R (i.e., simply omitting the hat). Two -systems and with an MBO are said to be game equivalent, denoted , if they behave identically as long as they are not won.
Given a distinguisher D and an -system with an MBO, denote by the probability that D provokes the MBO in the random experiment formed by D interacting with . In this context, D will often be referred to as a game winner.
Letandbe two games such that. Then, for any distinguisherD
The construction notion in the (Alice, Bob, Eve)-setting
The security of protocols is formalized by the following notion of construction, which was introduced in the work of Maurer [20] and is a special case of the abstract cryptography framework developed by Maurer and Renner [22]. To be considered secure, a protocol must satisfy two requirements. First, the protocol must construct the desired resource in a setting where no attacker is present. This condition is referred to as the availability or correctness condition and excludes trivial protocols. Second, the protocol must also construct the desired resource when the adversary is present, which is referred to as the security condition. This condition requires that everything the adversary can achieve in the real-world system (i.e., the assumed resource together with the protocol) he can also accomplish in the ideal-world system (i.e., the desired resource with the simulator). The two conditions are stated with respect to pairs of resources , where stands for the resource R when no adversary is present. (Formally, for some converter γ modeling the actions of a non-malicious adversary.)
Let and be two functions mapping each distinguisher D to a real number in . A two-party protocol constructs a pair of resources from an assumed pair of resources relative to simulator and within , denoted , if
for all distinguishers D.
In many construction statements in this paper, the distinguisher may access the real- and ideal-world systems only in a restricted manner; for instance, the number of queries allowed at a certain interface of a system may be bounded. This is formalized by having the system return fixed “error” symbols to queries at all interfaces after such a bound is exceeded. The bound may be defined in a resource or in one of the converters, and is signified by outputting a value ⊤.
An important property of Definition 2 is its composability. Intuitively, if a resource S is used in the construction of a larger system, then the composability implies that S can be replaced by without affecting the security of the composed system. Availability and security are preserved under sequential or parallel composition. More details can be found in [20,29].
All the constructions stated in this paper are such that the availability condition is trivially satisfied, it is therefore omitted from now onwards. That is, the notation will be used for , where (respectively, ) is implicitly understood from R (respectively, S).
Symmetric cryptographic schemes
Message authentication. A message authentication code (MAC) scheme with message space , key space , and tag space is defined as a pair , where is a (possibly probabilistic) function taking as input a key and a message to produce a tag , and is a deterministic function taking as input a key , a message and a tag to output a bit asserting the validity of the input tag u. A MAC scheme is correct if , for all keys and all messages .
A MAC scheme is considered weakly unforgeable under chosen-message attack (WUF-CMA) if it is computationally infeasible, even when given access to an oracle producing valid tags for chosen messages, to generate a valid tag for a fresh message that was not queried before to the oracle. The associated security game, denoted is detailed in Alg. 1.
WUF-CMA game
IND-CPA system
Symmetric encryption. A symmetric encryption scheme with message space , key space , and ciphertext space is defined as a pair , where is a (possibly probabilistic) function taking as input a key and a message to produce a ciphertext , and is a deterministic function taking as input a key and a ciphertext to output a plaintext . The output of can also be the error symbol ◆ to indicate an invalid ciphertext. An encryption scheme is correct if , for all keys and all messages .
The security of an encryption scheme can be defined using the “real or random” version of indistinguishability under chosen-plaintext attack (IND-CPA), which matches more closely constructive security definitions involving the comparison of a “real” system with an “ideal” one. Relations to other notions of IND-CPA follow from the work of Bellare et al. [3]. An encryption scheme is said to be IND-CPA-secure if no efficient distinguisher can tell apart the system , which encrypts input messages, from the system , which encrypts random messages of the same length as the input messages. The system is described in Alg. 2, where stands for messages of length ℓ in .
Transformable systems
This section presents a new approach to modeling systems that can be gradually transformed, in a way that clearly separates the effects of the transformation from how it can be provoked. This separation is formalized by splitting into core systems that describe the behavior and triggers that model the condition provoking a transformation. The methodology is then applied to describe concrete resources, keys and secure channels, that can be downgraded to an “insecure” mode.
Core systems and triggers
As a warm-up example, consider a key obtained by hashing a secret password shared between two users Alice and Bob. Idealizing the hash function as a random oracle, the resulting key is completely random from the perspective of any third party Eve unless she also queried the random oracle on the same input; in other words, unless she correctly guessed the password. Hence, if one models the key obtained by this process as a resource, one can consider two separate parts of it. The first part specifies the behavior of the resource before and after the transformation (a “strong” version gives the key only to Alice and Bob, a “weak” version also gives it to Eve); the second part triggers one of these two versions based on Eve’s actions (providing a password-guessing game for her, triggering the weaker version as soon as she wins).
In general, a transformable system is therefore the combination of two random systems: a core and a trigger system. The core system specifies how it behaves as an internal switch value changes, while the trigger system specifies how this switch value can be changed. More formally, a core system S is simply an -random system, where the set of inputs is partitioned into two sets and with . The set is the set of “normal” inputs, while is the set of possible switch values, such as in the example above. A trigger system T is a -random system which outputs a switch value. Elements of are called trigger values and correspond to password guesses in the example above.
Let and be four discrete sets such that and . An -random system S and a -random system T form an -random system, denoted , defined as follows. On input , the system outputs , where y is the output of the system S when queried on the input x. On input , the system outputs , where is the output of S when queried on the output of the system T which was queried on the original input t (see Fig. 1). The random system will be referred to as a transformable system, the random system S as a core system, and the random system T as a trigger system.
A transformable system formed by combining a core system S with a trigger system T. “Normal” inputs are processed directly by S, while trigger values go instead first through the system T whose output is then used as an input to the system S.
Note that a transformable system is just a particular type of a random system, hence any security definition applying to random systems (e.g. the construction notion of Definition 2) also applies to transformable systems.
Fixed switches. Given an -core system S, it will be sometimes convenient to argue about the behavior of S for a particular fixed switch value . This is achieved through , the -random system obtained by initializing S as follows: the switch value s is initially input to S and its resulting output is discarded. In other words, corresponds to the system S where the value of its switch is fixed from the beginning to s and cannot be changed. In particular, the input space of is only and not . Given a random variable S over , the term denotes the system selected at random in according to S.
Downgradable keys and downgradable secure channels
The core systems considered in this paper are actually resources, i.e., random systems with 3 interfaces and for Alice, Bob, and Eve, respectively, where the switch values are controlled via the interface . Formally, this interface is modeled as being split into two sub-interfaces: (for “normal” inputs/outputs) and (for switch values). Resources obtained by fixing the switch of such core resources to a particular value will no longer have this interface . Typically, Eve will not have a direct access to the interface of the core resource, instead she will only be allowed to access a trigger system T, which itself produces the switch values. Neither Alice nor Bob have access to T. Such a core resource combined with a trigger system will be called a downgradable resource.
Downgradable key resources and downgradable secure channels are examples of such resources that will be used throughout the paper. These resources are parameterized (among other) by a fixed number r of sessions. Intuitively, these resources provide a graceful deterioration of security by associating each session with a password and guaranteeing that a session remains secure as long as its password is not guessed, irrespectively of the state of other sessions. The corresponding core resources are described first, followed by the trigger systems.
(Key).
The core resource for r sessions takes as switch at interface an r-bit string which specifies for each session whether it is “broken” () or not (). Alice and Bob can retrieve a uniform and independent key for a given session, while Eve can only retrieve it if the session is marked as “broken”. The resource is specified in Alg. 3. Each of the r sessions corresponds to a single use of a password. The re-use of passwords is modeled by password distributions that output multiple copies of the same password. (To match the formal definition of a random system, which provides an output for each received input, the core resources and should output a dummy message at the -interface every time a switch value is input at the -interface. This technicality is omitted here and below for the sake of clarity.)
(Secure channel).
The core resource for r sessions also takes as switch value at interface an r-bit string which specifies for each session whether or not confidentiality is “broken”. The resource allows Alice to send one message per session to Bob. Eve learns nothing about the transmitted message but its length, unless this session was marked as “broken”, in which case the message is leaked to her. The channel does not allow Eve to inject any message, regardless of the value of the switch, and is formalized in Alg. 4.
(Local and global password-guessing triggers).
Eve will not be allowed to influence the switch values of or directly, instead she will have to interact with a trigger system which captures the guessing of per-session passwords. Two different such trigger systems will be important in this work; in both of them the number of guesses allowed to Eve is restricted. These two systems differ in whether the restriction on the number of guesses is local to each session or global over all r sessions. They are referred to as local and global (password-guessing) triggers and denoted by and , respectively.
Formally, both triggers are parameterized by a password distribution over (where is a set of passwords) and the number of password guesses allowed, either locally for each of the sessions (a tuple ) or globally (a parameter q). Both and initially sample r passwords according to . When a password guess for the jth session is received, both triggers change the state of this session to “broken” if the password guess is correct and their respective constraint on the number of password-guessing queries is satisfied. Both triggers and are only accessible by Eve and are detailed in Algs. 5 and 6.
Core resource
Core resource
Local trigger
Global trigger
Combining the core systems and triggers given above via Definition 3 leads to four downgradable resources: two with local restrictions, and , where the number of password-guessing queries is restricted per session; and two with a global restriction, and , where only the total number of password-guessing queries is limited. To simplify the notation, the parameters , q, will often be omitted when clear from the context. The results presented in the next sections hold for any distribution of r passwords, including correlated distributions, unless explicitly stated otherwise.
Password-based key derivation
The simple protocol for deriving a key from a password via hashing as considered in Section 3 can be proven to construct, from a pre-distributed password and a random-oracle in each session, a downgradable key resource. Multiple independent random oracles can be constructed from a single one via salting (i.e., domain separation), a point that will be discussed in Section 6.4.
More formally, the shared passwords are modeled as an explicit resource denoted . It is parameterized by a joint distribution of r passwords. The resource first samples from the distribution to obtain r passwords and then outputs at interface whenever it receives as input at the same interface i. Note that Eve does not learn anything about the sampled passwords except for the a priori known distribution .
Each hash function is modeled as a random oracle available to all parties, denoted by . Notably, the restriction on Eve’s computational power is modeled by a restriction on the number of invocations of the random oracles that she is allowed to do. (For a rationale behind this choice and how it allows to model complexity amplification via iteration, see [13].) This is useful for modeling either a tuple of random oracles with local restrictions denoted , where each random oracle has its own upper bound on the number of adversarial queries it allows; or a tuple of random oracles with one global restriction denoted , where at most q adversarial queries are allowed in total.
The key-derivation protocol consists of both parties applying a converter . Upon a key request for the jth session, queries to retrieve the shared password for this session, then queries the jth random oracle on and returns its output.
The following simple lemma shows that the protocol , where each party simply applies the converter , allows users to obtain downgradable keys in the sense of Section 3.2.
For the key derivation protocoldescribed above, there exist simulatorsandsuch that for all distributionsof r passwords, for all integersand q, it holds that
The simulators and emulate r random oracles mostly by lazy sampling. More precisely, upon an adversarial query x made to the jth random oracle, the simulators forward x as a password guess for the jth session to the trigger or at their interface and then try to retrieve the key associated with that session by querying their -interface. If the password guess was correct, then the simulators output the retrieved key as a simulated output of the random oracle, and otherwise they just sample a uniform n-bit string. The simulators and are described in Alg. 7.
The simulation is perfect in both settings, independently of whether the random oracles are locally or globally restricted. □
Simulators and , respectively
This lemma is very similar to [6, Theorem 3.3], which additionally provides the passwords in clear to the distinguisher.
Password-based message authentication
Password-derived keys can be used for message authentication using MACs. This section shows that such a construction meets the intuitive expectation that in a multi-user setting, as long as a password for a particular session is not guessed, the security (in this case: authenticity) in that session is maintained at the same level as if a perfectly random key was used. The real and the ideal experiment involved in the construction statement are depicted in Fig. 2.
Left: The assumed resource, a downgradable key and an insecure channel , with protocol converters and attached to interfaces and , denoted . Right: The constructed downgradable unordered authenticated channel with simulator attached to interface , denoted . Simulator must emulate Eve’s interface in the left picture, i.e., key retrieval queries at , trigger queries at and the insecure channel at .
Assumed resources. The construction statement shown below assumes the availability of a password-derived key and an insecure communication channel for each of the r considered sessions. Password-derived keys are modeled by the downgradable resource which can be constructed e.g. via one of the statements in Lemma 7 (here T stands for either or ). The insecure channels are formalized as the resource which forwards any message sent by Alice to Eve, while any message injected by Eve is forwarded to Bob.
MAC schemes as protocols. Recall the definition of a MAC scheme stated in Section 2.5. Given a MAC scheme , the protocol for Alice and Bob works in the natural way (their converters are denoted by and , respectively). When receives as input a message m for the jth session consisting of a pair , it retrieves the key associated to this session from the downgradable key resource , computes the tag and outputs to the insecure channel the pair . On the other end of the channel, whenever receives a message and a tag for some session, consisting of a pair , it first retrieves the key associated to this session from , computes and outputs only if the verification succeeds.3
Note that in practice the verification protocol would typically output an error symbol in case the verification did not succeed instead of not outputting anything. Our explanations in Section 5 would also hold in that scenario if the systems used are modified appropriately to output such an error symbol whenever necessary. We therefore omit this technicality.
Constructed resource. The channel that Alice and Bob obtain by using the protocol guarantees that any message that Bob receives for a particular session must have been sent before by Alice, unless this session was “broken.” This (core) unordered authenticated channel, denoted takes an r-bit string as a switch value, specifying for each session j whether it is broken (), in which case Eve can send any message to Bob for this particular session, or not (), in which case the messages that Eve can send to Bob for session j are limited to those that Alice already sent. The channel does not offer any secrecy, every message input by Alice is directly forwarded to Eve independently of the current switch value, while the switch value of a particular session can also be retrieved by Eve. Note that the unordered authenticated channel , similarly to a MAC scheme, only aims to prevent Eve from being able to inject a fresh message, it does not a priori prevent the injection of a legitimate message multiple times, the reordering of legitimate messages, or the loss of some messages.
The next theorem proves that if the MAC scheme employed is WUF-CMA secure, then the protocol constructs an unordered authenticated channel , where is described in Alg. 8, from a downgradable key resource and an insecure channel , for any trigger system . The real and the ideal experiment involved in the constructions statement are represented in Fig. 2. The arguments used in the proof of Theorem 8 could easily be extended to the case of any trigger T with output space and bit-wise non-decreasing output.
Channel
Simulator
Reduction
Letbe a correct MAC scheme and consider the associated protocol. Then, there exists a simulatordescribed in Alg.
9
such that for every distributionof r passwords, every tuple of r integersand any integer q, and any trigger,where, for every distinguisherD, where the reduction systemdepends on the triggerTand is described below in the proof.
The simulator initially selects for each session j a key uniformly at random and uses it to either compute tags, whenever a message is received at its -interface, or to verify the tag of a message, whenever an injection query is input at its -interface. The simulator forwards any password guessing query to the trigger of the resource and outputs the selected key only if the password associated with this session was broken. The simulator is described in more details in Alg. 9.
In order to have shorter notations within the proof, the real system will be denoted by and the ideal system will be denoted by , where . Observe that the only difference between the systems and is that if a fresh message is injected by Eve together with a successfully forged tag, such a message is always output at Bob’s interface in the system , whereas in such a message is only output if the password associated with that session was previously guessed. A monotone binary output must be added to the systems and , to obtain the corresponding games and , defined as follows: the MBO becomes 1 as soon as is input to the -interface such that the message was never input to the -interface before, the tag is valid (i.e., ), and the jth password was not guessed (). Then, the previous observation implies that and together with Lemma 1 it holds that
for all distinguishers D.
The task of winning the game can now be reduced to the task of winning the WUF-CMA security game described in Alg. 1. To do so, consider a sequence of reduction systems , where each reduction has 5 outside sub-interfaces (labeled and ) and connects at its inside interface to the WUF-CMA game , for all . The basic idea of the reduction is to forward any tag or verification query for session to the system connected at its inside interface, while other sessions are handled locally. The reduction also emulates internally the trigger T, which in the case of or corresponds to first sampling r passwords according to and then to appropriately count the number of password-guessing queries, in order to keep track of which session should be considered “broken”. Key retrieval queries are handled as usual, excepted for session for which the error symbol ◆ is always returned. A more formal description of the reduction system is given in Alg. 10.
Consider a distinguisher D interacting with the game in order to provoke its MBO. Let be the event that in this random experiment the distinguisher D won the game by finding a forgery for a fixed session j, i.e., was input at the -interface such that was never input to the -interface before, the tag is valid (i.e., ), and the jth password was not guessed (), for some message and tag . The probability that this event happens in this random experiment is denoted . Note that winning the game involves provoking one of the events , for some session , and thus
Now fix the randomness used in the random experiment (consisting of the randomness of the distinguisher D, the r keys used for tagging, the r passwords and the randomness of the algorithm ). Conditioned on this randomness, any transcript of queries which provokes the event in also wins the game . Moreover, in such a transcript the password associated with the jth session is not guessed () and thus such a transcript happens with the same probability in the random experiment . Hence,
for all sessions . The previous equations implies that the reduction , which consists in selecting a session uniformly at random in and then implementing the reduction is such that
for all distinguishers D. □
Password-based encryption
This section investigates the use of password-derived keys for symmetric encryption. In a multi-session setting, one may expect that as long as a password for a particular session is not guessed, the confidentiality in that session is maintained. This would, roughly speaking, correspond to a construction of (downgradable) secure channels from authenticated channels and password-derived keys. This desired construction is described in greater detail below, referring to Fig. 3 for the depictions of the real and the ideal experiment.
Left: The assumed resource, a downgradable key and an authenticated channel , with protocol converters and attached to interfaces and , denoted . Right: The desired downgradable secure channel with simulator σ attached to interface , denoted . The simulator σ must emulate Eve’s interface in the left picture, i.e., key retrieval queries at , trigger queries at and the authenticated channel at .
Assumed resources. These construction statements assume the availability of a password-derived key and an authenticated communication channel for each of the r sessions. Password-derived keys are modeled by the downgradable resource , where T typically stands for either or . Note that if the assumed authenticated channel were , which can for example be obtained by using MAC schemes as described in Section 5, then the overall channel resulting from doing encryption (the exact protocol is described in greater detail in the paragraph below) on top of it would necessarily have to encompass a mechanism to decide when a message is delivered to Bob based on Eve’s actions (since Eve can drop or try to inject messages in the channel ).
To avoid such a technicality, the construction statements below will instead assume an authenticated communication channel without any weakness, denoted . The channel takes as input a pair at Alice’s interface , corresponding to a ciphertext c to be transmitted for the jth session, and outputs at both Eve’s interface and Bob’s interface . Eve can neither replay messages nor drop those coming from Alice. For convenience, it is also assumed that at most one message is transmitted per session, but the results can easily be extended to the case of multiple messages per session. The channel is described in Alg. 11.
Channel
Encryption schemes as protocols. Recall the definition of an encryption scheme stated in Section 2.5. Given an encryption scheme , the protocol for Alice and Bob again works in the natural way (their converters are denoted and , respectively). Both and expect two resources at their respective inside interface : a downgradable key resource at their interface and an authenticated communication channel at their interface . The converter takes as input a pair at its outside interface , corresponding to a message m to be transmitted for the jth session. It retrieves the shared secret key for this session by inputting at its -interface, computes the ciphertext and finally outputs to the channel at its -interface. Similarly, when a pair is input to the -interface of the converter , corresponding to an encrypted message sent for the jth session, the converter retrieves the shared secret key for this session (by inputting at its -interface) and outputs at its -interface. Throughout this section, the underlying encryption scheme will be assumed to be correct.
Constructed resource. The channel that Alice and Bob wish to obtain by using the protocol is the downgradable resource described in Section 3.2, which guarantees that any message sent by Alice for a particular session is transmitted confidentially to Bob, unless this session was “broken”.
The goal of password-based encryption can then be loosely phrased as achieving the following construction
for some simulator σ and “reasonable” distinguishing advantage ε.
PBE for a single session
The first focus is on PBE with a single session. This will serve as an introduction to the study of the multi-session setting, given in Sections 6.2 and 6.3.
In the particular case of a single session, the local password-guessing trigger and the global one are actually identical for any distribution of a single password and any number q of password-guessing queries. To be consistent with what lies ahead in Section 6.3, the notation will be used in this section. In the considered special case, the exponent r indicating the number of sessions and the index j of the session associated with any input or output can also be omitted, thus simplifying the notation.
The aim of this section is to construct the downgradable secure channel from a downgradable key and an authenticated channel using the protocol . According to Definition 2, this requires finding a simulator σ such that the systems and represented in Fig. 3 with , are indistinguishable.
The commitment problem. In the real world, whenever a message m is input at Alice’s interface , the corresponding ciphertext is output at Eve’s interface . On the other hand, in the ideal world only the length of the transmitted message m is output by the channel to the simulator σ. The simulator must therefore emulate that a ciphertext was sent by only knowing the length of the transmitted message and not the message m itself.
A naïve simulation strategy could start as follows. The simulator σ initially selects a key k uniformly at random and emulates the transmission of a ciphertext by encrypting a fresh random message v of the correct length under key k, while password-guessing queries are simply forwarded to the trigger of the downgradable channel .
However, this approach does not work. To see this, consider what happens when the password is guessed and the session is broken (which, depending on , may happen with a large probability). In the real world, the distinguisher can retrieve the key k used for encryption and check that the previously seen ciphertext c is indeed an encryption of the transmitted message m. In contrast, in the ideal world the simulator σ can retrieve the transmitted message m, but note that it cannot output the key k that it chose at the beginning to simulate encryption since is a random message which (with overwhelming probability) is different from the actual transmitted message m. The simulator σ must therefore “decommit” by finding a key such that the decryption of the simulated ciphertext c under that key yields the transmitted plaintext m, i.e., . However, it is not hard to see that unless the key space of the encryption scheme contains as many keys as there are messages (which is only true for impractical schemes such as the one-time pad), it is highly unlikely that such a key even exists and the simulation therefore fails.
Brute-force to the rescue. The previous paragraph only shows that one particular simulation strategy fails. The source of the commitment problem is that the simulator σ only breaks the session after having output the simulated ciphertext. The key insight is that this does not have to be the case.
To prevent the simulation breakdown, one can instead consider a different simulator which, in contrast to σ, tries to break the session before having to output any ciphertext. So, instead of faithfully forwarding the q password-guessing queries, the simulator initially exhausts all of the allowed q queries to optimally brute-force the session by querying the q most likely passwords. If this initial brute-force step fails, simply encrypts a random message of the correct length and declares any password guess as incorrect so that the actual key used to simulate the encryption is never output. However, if the initial brute-force step succeeds, has access to the transmitted message and can therefore perfectly simulate the corresponding ciphertext, while password-guessing queries can be appropriately “scaled up” to match the guessing probability of the real world. In this case, the key used to simulate encryption can obviously be output since the ciphertext produced is an actual encryption of the transmitted message. Intuitively, this simulation strategy is successful because password-guessing queries made by are never output to a distinguisher.
In this setting with a single session, password-based encryption is therefore possible with respect to the simulation strategy sketched above.
(Informal).
For every distributionof a single password and every integer q, there exists a simulatorsuch thatwhere the distinguishing advantage ε can be reduced to the IND-CPA security of the underlying encryption scheme.
The generalization of the above statement for r sessions is discussed in Section 6.3. This corollary then follows by taking in Theorem 15.
General impossibility of PBE
The positive result for a single session can in general not be lifted to multiple sessions. In fact, there is a distinguisher that distinguishes the systems and depicted in Fig. 3, for any trigger system T with output space and any simulator σ, with an advantage that will not be negligible in most settings. The lower bound depends on the properties of the trigger system T and while giving a clear impossibility result for some triggers, for others it becomes moot. In particular, while it gives a strong bound for the case of the global password-guessing trigger , the bound is inconclusive for the local trigger and independently distributed passwords, where in Section 6.3 it is shown that password-based encryption is actually possible.
The core of the impossibility result lies in exploiting the commitment problem explained in Section 6.1. The simulator there avoids this commitment problem by trying to break the session associated with the plaintext before having to output the corresponding ciphertext. This works out if σ follows the optimal strategy for breaking this particular session, since an arbitrary distinguisher would not be able to do better. However, since σ does not a priori know which session will have to be “decommitted”, the simulator σ must be able to follow the optimal strategy for each session. This might be possible depending on the trigger system T (such as in the case of with independent passwords), but in general following the optimal strategy for a particular session may prevent σ from following the optimal strategy for another session. This is the case for the trigger where following the optimal strategy for a particular session consists of exhausting all the q allowed password-guessing queries on this session.
The high level idea of the distinguisher is therefore to first force the simulator to be committed to a ciphertext in every session; and second, to pick a session uniformly at random and to follow the optimal strategy to break it. To avoid the commitment problem, the simulator must in contrast try to break the maximum number of sessions before simulating the ciphertexts since it does not know which session will be chosen by the distinguisher.
Some further notation is needed to quantify more precisely the distinguishing advantage achieved by . Let T denote an arbitrary trigger system with output space , and consider a distinguisher D interacting with the trigger T alone. Note in particular that such a distinguisher sees the output of T. The interaction of the distinguisher D with the trigger T defines a random experiment, and denotes the event that the jth session is “broken”, i.e., T output at least once an r-bit string with , for all . The probability that this event happens in this random experiment is denoted and it will be convenient to see it as a function of both j and D. To do so, let denote the set of distinguishers for T and consider the function , where , for all and .
In the following, denote by the average of the maximum probability in breaking a particular session, while denotes the maximum average probability of breaking all sessions,
Note that , for every and , and thus . In other words, measures the success of an optimal strategy for breaking a known randomly chosen session j, while measures the success of an optimal strategy for breaking an unknown randomly chosen session. Knowing in advance which session will be “attacked” is a clear advantage that is measured by the difference .
Distinguisher
Letbe a correct encryption scheme with key spaceand message space, and consider the associated protocol. LetTbe a trigger system with output spaceand letdenote a non-empty set of messages of fixed length ℓ in, for some integer ℓ. Then, for anythere exists a distinguisherdescribed in Alg.
12
such that for all simulators σ it holds thatwhere, withanddefined in (
1
).
Some comments on the lower bound obtained in (2) are in order. If there are almost as many keys as messages, such as in the one-time pad, then the bound in (2) becomes trivial. (Note that if the encryption scheme is the one-time pad, then password-based encryption is obviously possible since there is no “commitment” problem: doing the xor of a given ciphertext and of a given message leads to the appropriate key.) However, most encryption schemes used in practice have significantly less keys than messages and in this case the dominant term in (2) is , which quantifies for a trigger system T the advantage that can be obtained on average by knowing which session will be “attacked”.
For example, if is a distribution of r independent passwords, then will typically be large. For such a distribution, the optimal guessing strategy for a particular session consists of querying the q most likely passwords for this session. Thus, following the optimal strategy for a particular session reduces the number of globally available password-guessing queries and prevents following the same guessing strategy for another session. An obvious exception is if the passwords are cryptographic keys, i.e., they are uniformly distributed over some large space, then the “passwords” are unguessable and is negligible.
In contrast for the same distribution of r independent passwords, the quantity will be null for the local password-guessing trigger , for any number of password-guessing queries . This is because the optimal strategy can be executed for each session, since for this trigger each session is truly independent.
Depending on the trigger system T, the distinguisher given in Alg. 12 may not necessarily be efficient, since it must be able to implement the optimal strategy for an arbitrary session of its choice. Nonetheless, it is worth mentioning that in the particular case where the trigger system is , computing the optimal guessing strategy for a particular session is “easy” if the passwords are independently distributed. One simply queries the q most likely passwords for this session. Clearly, this assumes that the distinguisher knows the password distribution , and is able to sort the passwords according to their respective probability to determine the q most likely for a particular session.
The main idea of the distinguisher is to exploit the advantage quantified by in knowing in advance which session is going to be “attacked”. In order to have shorter notations within the proof, let denote the system , while denotes , for some simulator σ.
In a first step, the distinguisher selects r messages of length ℓ uniformly at random, one for each session, and sends them at the -interface to observe the corresponding ciphertexts at the -interface, which are real encryptions when interacting with or simulated encryptions when interacting with instead. Distinguisher selects uniformly at random a particular session . then tries to break it by “running” an ε-optimal strategy for that particular session, where
for all . “Running” consists of the following three steps. First, the trigger value t output by is forwarded to the interface , which when interacting with corresponds to querying the trigger T on t. Second, distinguisher outputs 1 if this query t resulted in breaking the session and the key retrieved allows to decrypt the ciphertext to the original message . Otherwise, if the session is still not broken, distinguisher queries the interface to retrieve a switch value , which when interacting with corresponds to the last switch value output by T, and feed it to to obtain the next trigger value. Overall, distinguisher outputs 1 if and only if it managed to break session and the decryption of the ciphertext with the retrieved key matches the original message. Distinguisher is given in more details in Alg. 12.
The next step is to lower-bound the distinguishing advantage . Note that when interacts with , the distinguisher breaks a given session with probability at least . If session is broken, then always outputs 1 by correctness of the encryption scheme. Thus,
In contrast, when distinguisher interacts with , the event that matters is whether the simulator σ managed to break the session before sending the ciphertext , and later distinguisher chooses the session . In the random experiment , let be the event that the session j was broken at least once (the trigger T output at least once a switch value with ) before simulator σ outputs the simulated ciphertext , for all . We will denote the complementary event by .
Note that if the simulator σ in S manages to break the chosen session before having sent the ciphertext , which corresponds to the event , then σ has the possibility of retrieving the corresponding message and thus could potentially perfectly simulate this ciphertext, so that is possible. In contrast, when , the simulator σ is committed to the ciphertext without knowing anything about the message but its length ℓ. For distinguisher to output 1 in this case, the simulator must be able to provide a key such that . Since the decryption algorithm is deterministic, it implies that for a fixed ciphertext the output of can take at most values. The message is uniformly distributed over and thus
Note that if the simulator σ can provoke the event in the random experiment , then σ can be used to win the event against the trigger T alone. Since σ does not know in advance which session is going to be selected by , its success is therefore at most the maximum of the average, i.e.,
Thus,
Combining the previous equations gives the desired lower bound. □
PBE with local assumptions
As mentioned in Remark 11, the impossibility result does not apply to the particular case of the local password-guessing trigger if the passwords are independently distributed, allowing for the existence of password-based encryption under these assumptions. Intuitively, since each session has its own restriction on the number of password-guessing queries, the simulation strategy can optimally brute-force each session independently to avoid the commitment problem in the same way as in the case of a single session in Section 6.1.
It is therefore assumed in this section that the passwords are independently, but not necessarily identically, distributed. That is, there exist r password distributions such that the distribution of the r passwords can be written as , for all . Such a distribution will be called a product distribution.
Note that passwords in can be sorted according to their likelihood of being chosen in the jth session as given by . Let be the probability that the password selected in the jth session belongs to the q most likely passwords (according to ), for all and any integer q.
The following technical lemma shows that when constructing the downgradable secure channel from the downgradable key where the switch value can be changed through the trigger system , it is sufficient to instead look at systems and where the switch value is randomly chosen and fixed at the beginning according to some random variable .
Converter
Letbe a product distribution of r passwords as described above and consider a tuple of r integers. For each session, letbe a binary random variable which is 1 with probability, and let. Then, there exist convertersand, described in Algs.
13
and
14
, respectively, such that
The core systems and introduced in Section 3.2 are such that a change in their switch value modifies the behavior of the system only at the adversarial interface and not at the others (interface or ).
In the case of the key system, the converter has to be indistinguishable from , where the value of the switch can be changed progressively, by having only access to , where the value of the switch is (randomly) fixed at the beginning. To do so, the converter uses the fact it can easily infer the value of by simply querying at the -interface of . If the answer contains the error symbol ◆, then , and otherwise , for all . If , then cannot retrieve the key associated to this session and therefore declares any password guess for that session as invalid. In contrast, if , which happens with probability , the converter must then “scale up” the password-guessing probabilities accordingly in order to match those of . For the first query of a password w in session j with , scaling factor is exactly and the guess is considered valid if a coin tossed with probability is 1. For subsequent queries, the scaling also has to account for the previous unsuccessful guesses, which appears by tossing the coin with probability , where the sum is over the wrong passwords guessed before. Note that is cumulative in , and the subtraction term accounts for the probabilities of the previous guesses. (Generally, if the same w is guessed repeatedly by the distinguisher, then does not toss the coin again, but instead responds consistently.) Note that this is indeed a probability distribution since represents the winning probability of the optimal guessing strategy for the jth session with queries and therefore . Overall, the probability of retrieving the key used in the jth session is therefore and thus . A more formal description of is in Alg. 13.
Converter
In contrast to , the task of is to emulate , where the value of the switch is (randomly) fixed at the beginning, from , where its value can be changed progressively. To do so, simply does the optimal password-guessing strategy, i.e., queries the most likely passwords for the jth session, for all , which implies . A more detailed description of is in Alg. 14. □
The strategies described by the converters or in Lemma 12 have demanding preconditions: They need to know the password distribution and, for each session, to also know an upper bound on the number of password-guessing queries as well as to be able to sort through the set of passwords in order to determine the most likely ones.
The next lemma shows that the protocol constructs a secure channel from a key resource and an authenticated channel if the encryption scheme used is IND-CPA secure, for every random switch value S.
Letbe a correct encryption scheme and consider the associated protocol. Let S be a random variable arbitrarily distributed over. Then, there exist a simulatordescribed in Alg.
15
and an (efficient) reduction systemdescribed in the proof such thatwhere, for all distinguishersD.
Let S be a random switch value arbitrarily distributed over . Although the simulator does a priori not know the value of the random switch S, it can easily retrieve it by querying the channel on . If the answer contains the error symbol ◆, then , otherwise , for all . If , then the simulator will never be able to retrieve the transmitted message of the jth session and simulates therefore the transmission of a ciphertext by encrypting a random message of the correct length under a random key. For such a session, any key retrieval query will be responded with the error symbol ◆. In the other case, if , the simulator can simply retrieve the transmitted message and encrypt it under a uniform random key to simulate perfectly the sent ciphertext. For such a session, the actual key used for simulating the encryption will be leaked if the simulator receives a key retrieval query. The simulator is described more precisely in Alg. 15.
Simulator
Reduction
In order to have shorter notations within the proof, denote by and the real system and the ideal system , respectively. Note that for sessions which are “broken” () the simulation is perfect, while for the other sessions the only difference between the two systems and lies in the way ciphertexts are produced: produces encryptions of messages which were input at interface , whereas produces encryptions of random messages of the same length as messages input at . Distinguishing from can therefore be reduced to the IND-CPA security of the underlying encryption scheme via a hybrid argument as follows.
Define a sequence of reduction systems , where each reduction has 4 outside sub-interfaces (labeled , and ) and connects at its inside interface to one of the two IND-CPA systems or described in Alg. 2, for all . Initially, the reduction system selects r keys uniformly at random, as well as a switch value according to , the distribution of the random switch S. Upon input at its outside sub-interface , the reduction system outputs at its outside sub-interface and at , where the ciphertext c is computed as follows. If session j is “broken” (), then c is a local encryption of the input message m under key . Otherwise, if session j is not “broken” (), then c is a local encryption of a fresh random message of length under key for session , while for session the ciphertext c is an actual encryption of the input message under key . Finally, only for an unbroken session is the ciphertext c the result of querying the system connected at its inside interface on the message m. Key retrieval queries made to the outside sub-interface of are replied by or according to the value of . The reduction system is described more formally in Alg. 16.
Note that ciphertexts produced by are always encryptions of messages which were input at interface and thus . Similarly, ciphertexts produced by are encryptions of random messages of the same length as messages input at , unless they are for a “broken” session in which case the actual input message is encrypted, and thus . Furthermore, note that unless a session is broken, both and produce encryptions of random messages of the appropriate length until the jth session, while ciphertexts for sessions are actual encryptions of input messages. Thus, the sequence of reduction systems is such that , for all . For a reduction system which selects a session uniformly at random and then implements the reduction it holds that
for every distinguisher D. □
The previous lemmas allow to easily prove that password-based encryption with these additional local assumptions is possible if the encryption scheme used is IND-CPA secure and the r passwords are independently distributed.
Letbe a correct encryption scheme and consider the associated protocol. For every product distributionof r passwords and every tuple of r integers, there exist a simulatorand an (efficient) reduction systemdescribed in the proof such thatwhere, for every distinguisherD.
Consider a product distribution of r passwords and a tuple of r integers . In order to have shorter notations within the proof, let denote the downgradable resource and let denote . Given the encryption protocol and some resource U, it will convenient to write .
Then, Lemma 12 implies that there exist two converters and , as well as a random variable over , such that
where and accounts for the presence in parallel of the channel in R. Lemma 14 implies then that for such a random switch value , there exist a simulator and a reduction , such that for all distinguishers D
The proof then follows by composition. To see that, note that the previous system equation implies that
using the fact that converters connected at different interfaces commute. Let the simulator be defined as the sequential composition of the aforementioned simulators, i.e., . Then, it holds that , and thus
where . The proof is then finished by combining both distinguishing advantages and defining the overall reduction as . □
The simulation strategy employed by in the construction of Theorem 15 is rather peculiar. Informally, whenever has to simulate a ciphertext for a particular session, it first tries to brute force the password of this session by probing the most likely passwords (as described by in Alg. 14). If this step succeeds, can perfectly simulate the transmitted ciphertext, otherwise it simply encrypts a random message of the appropriate length (as described by in Alg. 15). Finally, even though exhausts its password-guessing queries at the beginning, it can emulate the correct answer to an outside password-guessing query by appropriately scaling the probabilities (as described by in Alg. 13). Note that the assumptions discussed in Remark 13 are also required for .
Salting and per-session security
This section examines the well-known salting technique, a standard tool to achieve domain separation in password hashing. This technique consists of prefixing all queries made to a single random oracle by a distinct bit string in each of the r sessions, making the queries from different sessions land in different subdomains of the random oracle. In practice, a randomly chosen bit string is used for every session, maintaining the same properties with high probability.
Assumed resources. The construction statement below assumes the availability of a single random oracle and the strings used for salting. The random oracle is restricted by allowing Eve to ask at most q queries. The source of salts is formalized as a resource and parameterized by a distribution of r distinct t-bit strings, for some appropriate integer t. The resource first samples from and then outputs at interface whenever it receives a query at the same interface, for any . Note that the prefixes used in each session are public and can be retrieved by Eve.
The prefixing protocol. Both Alice and Bob use the bit strings provided by the salting resource to prefix their queries as described by the following converter : Upon input at its interface , corresponding to hashing a message for the jth session, the converter retrieves the prefix associated with that session by querying on and then outputs the value returned by the single random oracle when queried on .
Desired resource. The goal of the prefixing protocol is to construct r independent random oracles. Since the assumed random oracle can be queried by Eve at most q times, the constructed resource will naturally have a similar restriction. Namely, the following lemma shows that the prefixing protocol constructs r globally restricted random oracles .
Consider the prefixing protocoldescribed above. Then, for every distributionof r distinct bit strings of equal length and every integer q, there exists a simulatorsuch that
The simulator first selects r bit strings of equal length according to the distribution . Then, whenever a salt retrieval query for the jth session is input at its interface , the simulator returns at the same interface. When a message to be hashed is input at its interface , the simulator first checks whether one of the strings is a prefix of x, i.e., whether for some and . If this is the case, then returns the answer of the jth random oracle when queried on . Otherwise, the simulator simply returns a uniform n-bit string. The simulator replies consistently to any repeating query and in addition keeps track of the number of queries to avoid too many “dummy” queries, i.e., queries which are not prefixed by one of the strings . It can be readily verified that the simulation is perfect. □
Unfortunately, it is easy to show that the same salting protocol cannot construct r locally restricted random oracles , at least not unless for all (the latter would render this construction uninteresting due to the blow-up in the number of adversarial queries). More formally, let us consider a simulator σ such that . Then,
where n is the output length of the random oracle .
To see this, consider the systems and for some arbitrary simulator σ. In the real experiment, a distinguisher making a query to the interface and a query to the interface of R, where is the prefix for the jth session output by the salting resource, observes the same output. Hence, in the ideal experiment, for any query of the type the simulator σ has to query the jth random oracle on x in order to be able to mimic this behavior. Thus, a distinguisher can choose any session j and make all its q queries to the associated random oracle by appropriately prefixing each query, hence requiring for any successful simulator to exist.
Consequences for local restrictions. The above observation implies that relying on local query restrictions for multi-session security of password-based encryption (as in Theorem 15) appears to be in general rather unrealistic. The salting technique employed in PKCS #5 [17] (and more generally, any domain separation technique which is public) fails to construct locally restricted random oracles from a single random oracle for any meaningful values of .
On the per-session security of PBE from PKCS #5
This section shows how the arguments used to prove Theorem 10 also apply to the password-based encryption standard described in PKCS #5 [17], which thus in general does not achieve per-session confidentiality.
Distinguisher
Distinguisher
Recall that the protocol described in [17] consists of hashing a salt concatenated with a password and of using the result as a key for encryption. (Additionally, it also increases the cost of a brute-force attack by iterative hashing. This is, however, an orthogonal aspect, see [13] for a detailed discussion.) Formalized as a pair of converters , this protocol corresponds to first doing the salting step via the protocol described in Section 6.4, then the key derivation protocol described in Section 4 and finally symmetric encryption described in Section 6. As detailed in previous sections, such a protocol assumes the following resources to be available: a random oracle , a source of salts , a source of shared passwords , and finally an authenticated communication channel for each of the r sessions. Denote by the resources used for key derivation, i.e.,
Letbe a correct encryption scheme with key spaceand message space, and consider the combined protocoldescribed above. LetTbe a trigger system with input spaceand output space, and letdenote a non-empty set of messages of fixed length ℓ in, for some integer ℓ. Then, for every integer q, such thatevery, every distributionof r distinct bit strings of the same length and every distributionof r passwords, there exists a distinguisherdescribed in Alg.
17
such that for all simulators σ it holds thatwhere, withanddefined in (
1
), andfor a distinguisherdescribed in Alg.
18
.
The proof is analogous to that of Theorem 10 and consequently the same limitations mentioned in Remark 11 also apply to Theorem 18. Indeed, if the encryption scheme used is IND-CPA secure and uses significantly less keys than messages, then the dominant term in the lower bound above is which may become moot depending on the trigger T considered in the constructed resource. However, in the case where the passwords are independently distributed and , the quantity will be large for most password distributions if , since following the optimal guessing strategy for a particular session usually requires to exhaust all q guesses. Likewise, if instead , for some integers , then will be large if for some .
The main idea is to use the same strategy as distinguisher in Alg. 12 which, very roughly, consists of the following three steps: 1) input r messages of length ℓ chosen uniformly at random; 2) observe the corresponding ciphertexts ; and 3) use an almost-optimal strategy to break a session chosen uniformly at random. This last step has to be adapted since the resources considered, contrary to those in Theorem 10, do not have a switch value indicating whether session j is broken.
In order to have shorter notations within the proof, the real system will be denoted by R and the ideal system will be denoted by , for some simulator σ and some -trigger system T. Eve’s interface in R is split as follows: sub-interfaces and denote the respective -interface of the resources , and in the combined resource ; while the sub-interface of R denotes the -interface of the authenticated channel .
Similarly to , the new distinguisher uses the ε-optimal strategy for guessing the password used in a randomly chosen session , analogously to Theorem 10. Note that expects as input an r-bit string indicating the “broken” state of each session. To do so, distinguisher keeps a state which is updated as follows. Given a password guess for session j (which could a priori be different from ), the new distinguisher declares session j “broken” if the output k of the random oracle when queried on , where is the prefix used for session j, is such that . The distinguisher is specified in Alg. 17.
The next step is to lower-bound the distinguishing advantage . Let be the event that the password used in session j was correctly guessed in the random experiment , i.e., a query prefixed by made to the random oracle at interface matches a previous query made to the random oracle at interface or , where is the prefix used for session j output by the salting resource . The complementary event will be denoted by . If distinguisher manages to guess the password of the chosen session , it will necessarily output 1 due to the correctness of the encryption scheme,
Yet, the switch values emulated by distinguisher and input to have a different distribution than when interacts with the trigger alone. Indeed, in the random experiment , if a session j is declared to be “broken” (), it does not necessarily mean that correctly guessed the password used in session j, it could also be due to either collisions in the random oracle or to the existence of a second key k such that . This implies that may be smaller than , and this difference must be bounded.
To do so, let be the event in the random experiment that a query made to the random oracle at its interface resulted in session j being declared “broken” () even though the password used in session j was not yet guessed (corresponding to the event ) and let be the union of these events , for all . Conditioned on the event not happening, a session is declared “broken” if and only if its password is guessed and thus
for every session .
From the union bound, it follows that , which means that now the probability of the event happening in the random experiment , for some session j, must be upper-bounded. Consider a query made to the random oracle at its interface , for some password guess and where is the prefix associated with session j, such that this query provoked the event even though the event happened. Note that such a query was never asked before to the random oracle at interface (since it provoked the event ), and was also never queried by the honest parties at interface or of the random oracle since the password for that session is not guessed (because of the event ) and other sessions use different prefixes. Thus, the answer of the random oracle on such a fresh query is uniformly and independently distributed and conditioned on a given message and ciphertext the probability that the event happens is thus at most since there are at most q queries made to the random oracle at interface . As is an encryption of under a random key, it then follows that for all j, ,
where is the number of keys decrypting a ciphertext c to a message m, and denotes the average for the original random message of length ℓ, where the expectation is taken over a message m chosen uniformly at random in and for a uniformly chosen key k.
Note that if the encryption scheme used is IND-CPA secure, then the ratio will be small. To see that, consider a distinguisher which interacts with the CPA systems described in Alg. 2. The distinguisher first selects a message m uniformly at random in , then outputs it to to retrieve the ciphertext c and finally tries to decrypt it by selecting q keys uniformly at random.
Distinguisher outputs 0 when connected to with probability
which can be lower-bounded by
given that , as assumed in the theorem statement.4
For , it holds that .
In contrast, when interacting with , the ciphertext c produced is independent of the message and thus outputs 0 with probability at most . Thus,
The previous equations imply that
Similarly to the proof of Theorem 10, the disitnguisher outputs 1 when interacting with the ideal system with probability at most . The desired bound is then obtained by combining the last two equations. □
Conclusion
The work of Bellare et al. [6] initiated the provable-security analysis of the techniques used in the password-based cryptography standard [17] and its application in password-based encryption. As discussed in Section 1, however, they do not prove the desired per-session security guarantee for PBE.
Even though Theorem 15 shows that the results of [6] carry over to a composable model with per-session guarantees, this requires corresponding per-session assumptions on the distribution of adversary computation, and the simulation strategy used is already quite peculiar: the simulator needs to know the password distribution and it must also make all password-guessing attempts before simulating the first ciphertext. This means that the constructed resource allows the attacker to aggregate its entire “computational power” and spend it in advance rather than distributed over the complete duration of the resource use.
The general impossibility result in Theorem 10 shows that bounding the adversary’s queries per session, although an unrealistic assumption (as discussed in Section 6.4), is necessary for our simulation-based proof of security of PBE. Otherwise, a commitment problem akin to the one in adaptively secure public-key encryption (PKE) [25], functional encryption [4,8,19], and identity-based encryption [16], surfaces. Does that mean that one should stop using PBE in practice? In line with Damgård’s [12] perspective on adaptively secure PKE, this question can be viewed as being a fundamental research question still to be answered. On the one hand, there is no attack that would convincingly break PBE, but on the other hand there is also limited provable-security support, at least if one seeks for strong, composable guarantees. Pointing out this commitment problem for PBE, analogously to adaptively secure PKE, can be seen as an important contribution of this paper.
Footnotes
Acknowledgments
Grégory Demay was supported by the Zurich Information Security and Privacy Center (ZISC). Peter Gaži was supported by the European Research Council under an ERC Consolidator Grant (682815-TOCNeT). Björn Tackmann was supported by the Swiss National Science Foundation (SNF) through fellowship P2EZP2-155566 and the National Science Foundation (NSF) under grant CNS-1228890. We are grateful to various anonymous reviewers for their comments that greatly helped us to improve the paper.
References
1.
M.Abadi and B.Warinschi, Password-based encryption analyzed, in: ICALP 2005, L.Caires, G.F.Italiano, L.Monteiro, C.Palamidessi and M.Yung, eds, LNCS, Vol. 3580, Springer, Heidelberg, 2005, pp. 664–676.
2.
J.Alwen and V.Serbinenko, High parallel complexity graphs and memory-hard functions, in: 47th ACM STOC, R.A.Servedio and R.Rubinfeld, eds, ACM Press, 2015, pp. 595–603.
3.
M.Bellare, A.Desai, E.Jokipii and P.Rogaway, A concrete security treatment of symmetric encryption, in: 38th FOCS, IEEE Computer Society Press, 1997, pp. 394–403.
4.
M.Bellare and A.O’Neill, Semantically-secure functional encryption: Possibility results, impossibility results and the quest for a general definition, in: CANS 13, M.Abdalla, C.Nita-Rotaru and R.Dahab, eds, LNCS, Vol. 8257, Springer, Heidelberg, 2013, pp. 218–234.
5.
M.Bellare, D.Pointcheval and P.Rogaway, Authenticated key exchange secure against dictionary attacks, in: EUROCRYPT 2000, B.Preneel, ed., LNCS, Vol. 1807, Springer, Heidelberg, 2000, pp. 139–155. doi:10.1007/3-540-45539-6_11.
6.
M.Bellare, T.Ristenpart and S.Tessaro, Multi-instance security and its application to password-based cryptography, in: CRYPTO 2012, R.Safavi-Naini and R.Canetti, eds, LNCS, Vol. 7417, Springer, Heidelberg, 2012, pp. 312–329. doi:10.1007/978-3-642-32009-5_19.
7.
M.Bellare and P.Rogaway, The security of triple encryption and a framework for code-based game-playing proofs, in: EUROCRYPT 2006, S.Vaudenay, ed., LNCS, Vol. 4004, Springer, Heidelberg, 2006, pp. 409–426. doi:10.1007/11761679_25.
8.
D.Boneh, A.Sahai and B.Waters, Functional encryption: Definitions and challenges, in: TCC 2011, Y.Ishai, ed., LNCS, Vol. 6597, Springer, Heidelberg, 2011, pp. 253–273.
9.
R.Canetti, Universally composable security: A new paradigm for cryptographic protocols, Report 2000/067, Cryptology ePrint Archive, 2000. http://eprint.iacr.org/2000/067.
H.Corrigan-Gibbs, D.Boneh and S.Schechter, Balloon hashing: Provably space-hard hash functions with data-independent access patterns, 2016.
12.
I.Damgård, A “proof-reading” of some issues in cryptography (invited lecture), in: ICALP 2007, L.Arge, C.Cachin, T.Jurdzinski and A.Tarlecki, eds, LNCS, Vol. 4596, Springer, Heidelberg, 2007, pp. 2–11.
13.
G.Demay, P.Gazi, U.Maurer and B.Tackmann, Query-complexity amplification for random oracles, in: ICITS 15, A.Lehmann and S.Wolf, eds, LNCS, Vol. 9063, Springer, Heidelberg, 2015, pp. 159–180.
14.
G.Demay, P.Gazi, U.Maurer and B.Tackmann, Per-session security: Password-based cryptography revisited, in: ESORICS 2017, Part I, S.N.Foley, D.Gollmann and E.Snekkenes, eds, LNCS, Vol. 10492, Springer, Heidelberg, 2017, pp. 408–426.
15.
R.Gennaro and Y.Lindell, A framework for password-based authenticated key exchange, in: EUROCRYPT 2003, E.Biham, ed., LNCS, Vol. 2656, Springer, Heidelberg, 2003, pp. 524–543, http://eprint.iacr.org/2003/032.ps.gz. doi:10.1007/3-540-39200-9_33.
16.
D.Hofheinz, C.Matt and U.Maurer, Idealizing identity-based encryption, in: ASIACRYPT 2015, Part I, T.Iwata and J.H.Cheon, eds, LNCS, Vol. 9452, Springer, Heidelberg, 2015, pp. 495–520. doi:10.1007/978-3-662-48797-6_21.
J.Katz, R.Ostrovsky and M.Yung, Efficient password-authenticated key exchange using human-memorable passwords, in: EUROCRYPT 2001, B.Pfitzmann, ed., LNCS, Vol. 2045, Springer, Heidelberg, 2001, pp. 475–494. doi:10.1007/3-540-44987-6_29.
19.
C.Matt and U.Maurer, A definitional framework for functional encryption, in: IEEE 28th IEEE CSF, 2015, pp. 217–231.
20.
U.Maurer, Constructive cryptography – a new paradigm for security definitions and proofs, in: Theory of Security and Applications, S.Mödersheim and C.Palamidessi, eds, LNCS, Vol. 6993, Springer, Berlin, Heidelberg, 2012, pp. 33–56. doi:10.1007/978-3-642-27375-9_3.
21.
U.Maurer, Conditional equivalence of random systems and indistinguishability proofs, in: 2013 IEEE International Symposium on Information Theory Proceedings (ISIT), 2013, pp. 3150–3154. doi:10.1109/ISIT.2013.6620806.
22.
U.Maurer and R.Renner, Abstract cryptography, in: The Second Symposium in Innovations in Computer Science, ICS 2011, B.Chazelle, ed., Tsinghua University Press, 2011, pp. 1–21.
23.
U.M.Maurer, Indistinguishability of random systems, in: EUROCRYPT 2002, L.R.Knudsen, ed., LNCS, Vol. 2332, Springer, Heidelberg, 2002, pp. 110–132. doi:10.1007/3-540-46035-7_8.
24.
R.Morris and K.Thompson, Password security: A case history, Communications of the ACM22(11) (1979), 594–597. doi:10.1145/359168.359172.
25.
J.B.Nielsen, Separating random oracle proofs from complexity theoretic proofs: The non-committing encryption case, in: CRYPTO 2002, M.Yung, ed., LNCS, Vol. 2442, Springer, Heidelberg, 2002, pp. 111–126. doi:10.1007/3-540-45708-9_8.
26.
L.O’Gorman, Comparing passwords, tokens, and biometrics for user authentication, Proceedings of the IEEE91(12) (2003), 2021–2040. doi:10.1109/JPROC.2003.819611.
T.Petsas, G.Tsirantonakis, E.Athanasopoulos and S.Ioannidis, Two-factor authentication: Is the world ready? Quantifying 2FA adoption, in: Proceedings of the Eighth European Workshop on System Security, ACM, 2015, p. 4.
29.
B.Tackmann, A theory of secure communication, PhD thesis, ETH Zürich, 2014.
30.
F.F.Yao and Y.L.Yin, Design and analysis of password-based key derivation functions, in: CT-RSA 2005, A.Menezes, ed., LNCS, Vol. 3376, Springer, Heidelberg, 2005, pp. 245–261.