1 Introduction
Modular security analysis of cryptographic protocols calls for an iterative process, where in each iteration the analyst first partitions the given system into basic functional components, then separately specifies the security properties of each component, then demonstrates how the security of the overall system follows from the security of the components, and then proceeds to further partition each component. The key attraction here is the potential ability to analyze the security of each component once, in a simplified “in vitro” setting, and then re-use the asserted security guarantees in the various contexts in which this component is used.
A number of analytical frameworks have been devised over the years with this goal in mind, e.g. [MR91, Bea91, HM97, Can00, PW00, Can01, BPW04, Mau11, KMT20, HS16, CKKR19]. These frameworks allow representing protocols, tasks, and attacks, and also offer various composition operations and associated security-preserving composition theorems that substantiate the above analytical process. The overarching goal here is to have an analytical framework that is as expressive as possible, and at the same time allows for a nimble and effective de-compositional analytical process.
Modularity in these frameworks is obtained as follows. (We use here the terminology of the UC framework [Can01], but so far the discussion applies to all these frameworks.) We first define when a protocol “emulates” another protocol
. Ideally, this definition should consider a setting with only a single instance of
(or
) and no other protocols. A general composition theorem then guarantees that if
emulates protocol
, then for any protocol
, that makes “subroutine calls” to potentially multiple instances of
, the protocol
emulates
, where
is the protocol that is essentially identical to
except that each subroutine call to an instance of
is replaced with a subroutine call to an instance of
.
This composition theorem is indeed a powerful tool: It allows analyzing a protocol in a highly simplified setting that involves only a single instance of the protocol and no other components, and then deducing security in general multi-component systems. However, the general composition theorem can only be applied when protocols and
do not share any “module” with the calling protocol,
. That is, the theorem applies only when there is no module, or protocol,
, such that
is a subroutine of
or
, and at the same time
is used directly as a subroutine of
. Furthermore, when
calls multiple instances of
, no module
can be a subroutine of two different instances of
.
This limitation has proven to be a considerable impediment when coming to analyze realistic systems, and in particular when trying to de-compose such system to smaller components as per the above methodology. Indeed, realistic systems often include some basic components that require trust in external entities or are expensive to operate. It then makes sense to minimize the number of such components and have them shared by as many other components as possible. Examples for such shared components include public-key infrastructure, long-lived signing modules, shared synchronization and timing mechanisms, common reference strings, and even more complex constructs such as blockchains and public repositories.
Overcoming this limitation turns out to take quite different forms, depending on the underlying model of computation. When the model of computation is static, namely the identities, programs, and connectivity graph of computing elements are fixed throughout the computation, extending the basic composition theorem to account for shared (or, “global”) subroutines is relatively straightforward. (Examples include the restricted model of [Can20, Section 2], as well as [BPW07, KMT20].) However, restricting ourselves to a static model greatly limits the applicability of the framework, and more importantly the power of the composition theorem. Indeed, static models are not conducive to capturing prevalent situations where multiple instances of a simple protocol are invoked concurrently and dynamically, and where all sessions share some global infrastructure; examples include secure communication sessions, payment protocols, cryptocurrencies, automated contracts.
In order to be able to benefit from compositional analysis with shared modules even when the analyzed protocols are dynamic in nature, new composition theorems and frameworks were formulated, such as the Joint-State UC (JUC) theorem [CR03] and later the Generalized UC (GUC) and Extended UC (EUC) models [CDPW07].
However the GUC modeling is significantly more complex than the plain UC model. Furthermore, the extended model needs to be used throughout the analysis, even in parts that are unrelated to the global subroutine. In particular, working in the GUC model requires directly analyzing a protocol in a setting where it runs alongside other protocols. This stands in contrast to the plain UC model of protocol execution, which consists only of a single instance of the analyzed protocol, and no other “moving parts.” Additionally, while the basic UC framework has been updated and expanded several times in recent years, the GUC model has not been updated since its inception. Furthermore, the claimed relationship between statements made in the EUC framework and statements made in the GUC framework has some apparent inaccuracies.1
Our Contribution. We simplify the treatment of universal composition with global subroutines for fully dynamic protocols. Specifically, We show how to capture GUC-emulation with respect to global subroutines, and provide a theorem akin to the GUC theorem, all within the plain UC modeling. This theorem, which we call the Universal Composition with Global Subroutines (UCGS) theorem, allows for fully reaping all the (de-)compositional benefits of the GUC modeling, while keeping the model simple, minimizing the formalism, and enabling smooth transition between components.
We present our results in two steps. First, we present the modeling and theorem within the restricted model of computation of [Can20, Section 2]. Indeed, here the GUC and UCGS modeling is significantly less expressive - but it introduces the basic approach, and is almost trivial to formulate and prove. Next we explain the challenges involved in applying this approach to the full-fledged UC framework, and describe how we handle them. This is where most of the difficulty - and benefit - of this work lies.
Let us first briefly recall UC security within that restricted model. The model postulates a static system where the basic computing elements (called machines) send information to each other via fixed channels (or, ports). That is, machines have unique identities, and each machine has a set of machine identities with which it can communicate. Within each machine, each channel is labeled as either input or output. A system is a collection of machines where the communication sets are globally consistent, namely if machine M can send information to machine with channel labeled input (resp., output) then the system contains a machine
that can send information labeled output (resp., input) to M. In this case we say that
is a subroutine (resp., caller) of M.
A protocol is a set of machines with consistent labeling as above, except that some machines in
may have output channels to machines which are not part of
. These channels are the external channels of
. The machines in
that have external channels are called the top level machines of
.
An execution of a protocol with an environment machine
and an adversary machine
is an execution of the system that consists of
, where the external channels of
are connected to
, and
is connected to all machines in the system via a channel (port) named backdoor. The execution starts with an activation of
and continues via a sequence of activations until
halts with some binary decision value. Let
denote the random variable describing the decision bit of
following an execution with
and
. We say that protocol
UC-emulates protocol
if for any polytime adversary
there exists a polytime adversary
such that for any polytime
we have
.
The universal composition operation in this model is a simple machine replacement operation: Let be a protocol, let
be a subset of the machines in
that is a protocol in and of itself, and let
be a protocol that has the same set of external identities as
, and where
and
are identity-disjoint, i.e. the identities of the machines in
are disjoint from the identities of the machines in
. Then the composed protocol
is defined as
. The UC theorem states that if
UC-emulates
, then for any
such that
and
are identity-disjoint we have that
UC-emulates
. (Notice that here the UC operation replaces only a single “protocol instance”. Indeed, here there is no natural concept of “multiple instances” of a protocol.)
In this restricted model, protocol is a global subroutine of a protocol
if
is a subroutine of
, and at the same time some of the top level machines of
are actually in
. Said otherwise,
consists of two parts,
and
, where both
and
include machines that take inputs directly from outside
, and in addition some machines in
take inputs also from machines in
. Observe that this structure allows
to be a subroutine also of protocols other than
.














UC with Global Subroutines (UCGS) in the restricted setting of [Can20, Section 2]: Protocol is a global subroutine of protocol
if
takes input from
and also from outside
. Then plain UC theorem already guarantees that if
UC-realizes protocol
, where
, then for any
that calls
and
, the protocol
UC-emulates
.
Extending the Treatment to the Full-Fledged UC Framework. While formulating UC with global subroutines within the above basic model is indeed simple, it is also of limited applicability: While it is in principle possible to use security in this model to infer security in systems that involve multiple instances of the analyzed protocol, inference is still limited to static systems where all identities and connectivity is fixed beforehand. The formalism breaks down when attempting to express systems where connectivity is more dynamic in nature, as prevalent in reality. In order to handle such situations, the full-fledged UC framework has a very different underlying model of distributed computation, allowing machines to form communication patterns and generate other machines in a dynamic way throughout the computation. Crucially, even in dynamic and evolving systems, the framework allows delineating those sets of processes that make up “protocol instances,” and then allows using single-instance-security of protocols to deduce security of the entire system.
To gain this level of expressiveness, the framework introduces a number of constructs. One such construct is the introduction of the session identifier (SID) field, that allows identifying the machines (processes) in a protocol instance. Specifically, an instance (or, session) of a protocol with SID s, at a given point during an execution of a system is the set of machines that have program
and SID s. The extended session of
with SID s consists of the machines of this session, their subroutines, and the transitive closure of all the machines that were created by the these subroutines during the execution so far. Another added construct is the concept of subroutine respecting protocols. Informally, protocol
is subroutine respecting if, in any extended session s of
the only machines, that provide output to, or responds to inputs from, machines outside this extended instance, are the actual “main” machines of this instance (namely the machines with code
and SID s). Machines in the extended session, which are not the main machines, only take input from and provide output to other machines of this extended instance.
While the SIDs and the restriction to subroutine respecting protocols are key to the ability of the UC framework to model prevalent dynamic situations, they appear to get in the way of the ability to prove UC with global subroutines. In particular, simply applying the UC theorem as in the basic model is no longer possible. Indeed (referring to Fig. 1), neither nor
are subroutine respecting, and the constructs
and
, which were legitimate protocols in the basic model, are not legitimate protocols in the full-fledged model, since they don’t have the same program or SID. Note that this is not just a technicality: In a dynamically evolving system with multiple instances of
and
there can be many possible ways of delineating protocol instances, and so the composition theorem may not even be well-defined!
We get around this barrier by providing a mechanism for encapsulating an instance of and one (or more) instances of
within a single “transparent envelope protocol”
such that a single instance of
has the same effect as the union of the instance of
and the instances of
used by this instance of
. To accomplish that, we extend the shell and body mechanism that’s already used in the UC framework to enforce subroutine respecting behavior and to implement the UC operation. A similar encapsulation is done for
and
. Furthermore, the transformation guarantees that both
and
are now subroutine respecting, even though neither
nor
are. This enables us to invoke the UC theorem (this time in the full-fledged UC model) to obtain our main result:
Main Theorem (Informal). Assume are such that
UC-emulates
. Then for (essentially) any protocol
we have that
UC-emulates
.
Our result follows the spirit of the UC theorem: It allows using the security of a single instance of (in the presence of
) to deduce security of a system that involves multiple instances of
(again, in the presence of
). Said otherwise, the theorem allows dissecting a complex, dynamic, multi-instance system into simple, individual components, analyze the security of a single instance of a component, and deduce security of the overall system - even in the prevalent cases where multiple (or even all) of the individual components are using the same global subroutines. See depiction in Fig. 2.

UC with global subroutines in the full-fledged UC framework: We encapsulate a single instance of plus one or more instances of
within a single instance of a protocol
that remains transparent to
and
and is in addition subroutine respecting. We then show that if
UC-emulates
then the protocol
UC-emulates
for essentially any
—even when
and all the instances of
(resp.,
) use the same global instances of
.
Demonstrating the Use of Our Treatment. We showcase our UCGS theorem in two settings. A first setting is that of analyzing the security of signature-based authentication and key exchange protocols in a setting where the signature module is global and in particular shared by multiple instances of the authentication module, as well as by arbitrary other protocols. This setting was studied in [CSV16] within the GUC framework. We demonstrate how our formalism and results can be used to cast the treatment of [CSV16] within the plain UC framework. The resulting treatment is clearer, simpler, and more general. For instance, in our treatment, the Generalized Functionality Composition theorem from [CSV16] turns out to be a direct implication of the standard UC composition theorem.
The other setting is that of composable analysis of blockchains, where assuming global subroutines is essential and permeates all the works in the literature. In a nutshell, in [BMTZ17], a generic ledger was described which, as proved there, is GUC-emulated by (a GUC version of) the Bitcoin backbone protocol [GKL15] in the presence of a global clock functionality used to allow the parties to remain synchronized. This ledger was, in turn, used within another protocol, also having access to the global clock, in order to implement a cryptocurrency-style ledger, which, for example, prevents double spending. [BMTZ17] then argues that using the GUC composition theorem one can replace, in the latter construction, the generic ledger by the backbone protocol. As we demonstrate here, such a generic replacement faces several issues due to inaccuracies in GUC. Instead, we show how to apply our theorem to directly derive the above statement in the UC framework.
Composition with Global Subroutines in Other General Frameworks. Several other general frameworks for defining security of protocols use a static machine model akin to the restricted variant of the UC model described above, where machines communicate only via connections (“ports”) that are fixed ahead of time, and the only way to compose systems is by way of connecting them using a pre-defined set of ports. (Examples include the reactive simulatability of [PW00, BPW07], the IITM framework of Küsters and Thuengertal [KMT20], the abstract cryptography of Maurer and Renner [MR11], the iUC framework of Camenisch et al. [CKKR19].) In these frameworks, the single-instance global-state composition theorem immediately follows from plain secure composition, in very much the same way as the single-instance UCGS theorem follows immediately from the plain UC theorem in the restricted UC model (see Fig. 1).
However, these frameworks do not provide mechanisms for modular analysis of systems where the de-composition of the system to individual modules is determined dynamically during the course of the computation. In particular, composition with global state in these frameworks does not address this important case either. In contrast, as described above, this fully dynamic, multi-instance case is the focus of this work. So far, this case has been addressed only in the GUC and EUC frameworks, as well as in the work of Hofheinz and Shoup [HS16] which proposes an extension of their model to accommodate certain specific ideal functionalities as distinguished machines.
We note that the IITM framework of Küsters and Thuengertal [KMT20] (as well as the recent iUC model [CKKR19] that builds on top of the IITM framework) does contain an additional construct that allows machines to interact in a somewhat dynamically determined way: While each machine has a fixed set of other machines that it can interact with, and protocols are defined as fixed sets of machines that have globally consistent “communication sets”, the framework additionally allows unboundedly many instances of each machine, where all instances have the same identity, code, and “communication set”. Furthermore, if the communication sets of machines allows them to communicate, then each instance of M can communicate with each instance of
. Indeed, this additional feature enables the IITM framework to express systems where the communication is arbitrarily dynamic.
However, this extra feature appears to fall short of enabling fully modular analysis of such dynamic systems. Indeed, the IITM framework still can only compose systems along the static, a-priori fixed boundaries of machine ports. This means that systems that include multiple instances of some protocol, where the boundaries of the individual instances are dynamically determined, cannot be analyzed in a modular way—rather, the framework only allows for direct analysis of all protocol instances at once, en bloc. This of course holds even in the presence of global subroutines. Example of such systems include secure pairwise communication systems where the communicating parties are determined dynamically, block-chain applications where different quorums of participants join to make decisions at different times, etc. See e.g.. [BCL+11, CSV16, GHM+17].
In contrast, the goal of this work is to allow de-composing such systems to individual instances, deducing the security of the overall composite system from the security of an individual instance—and carrying this through even when many (or all) instances use the same global subroutines (see Fig. 2).
A related work by Camenisch et al. [CDT19] introduces a new UC variant that they call multi-protocol UC (MUC) and that allows the environment to instantiate multiple challenge protocols that can interact with each other. It is an interesting future research direction to formulate this more general type of UC execution following the approach taken in this work, i.e., to model it following standard UC and making black-box use of the UC composition theorem to derive a composition theorem for this type of protocol.
2 Formulating and Proving the UCGS Theorem
In this section, we formulate and prove the main result of this work. In Sect. 2.1 we present the transformation that takes protocols and
and constructs a single, transparent encapsulation protocol
that behaves like a single instance of
along with one (or more) instances of a “global subroutine protocol”
. We formulate UC emulation with Global Subroutines in Sect. 2.2, state the Universal Composition theorem with Global Subroutines composition in Sect. 2.3 and conclude with remarks in Sect. 2.4. We also provide a proof sketch. See [BCH+20] for the full proof.
2.1 Treating Multiple Protocols as a Single Protocol
We start by defining the transformation that takes two protocols and
and combines them into a single protocol
, such that one instance of
behaves like one instance of
and one or more instances of
, and where the instances of
take inputs both from the instance of
within
, and from outside
. We refer to
as the management protocol.

















The three main components of our management protocol handling access to
and
, both equipped with shells
. For
, different types of incoming and outgoing messages are indicated in gray.
In order to allow black-box use of the UC composition theorem in the proof of our new composition theorem, we need to make sure that an instance of mimics the execution of a single instance of
(alongside one or more instances of
). That is,
must make sure that the various machines of an instance of
maintain a single, consistent virtual instance of
. To maintain the necessary information about the execution, we allow the management protocol
to make use of a directory ITI similar to the one used to ensure the subroutine-exposing property. That is, we embed a special ITI called execution graph directory in the operation of the management protocol (and shells) that acts as a central accumulator of knowledge.2
We now detail the execution graph directory for the structured protocol . The following generic shell mechanism—implemented by an additional, outermost shell of
and all its subroutines—makes sure that this outermost shell layer maintains information about the induced execution graph as well as additional auxiliary information extracted from the underlying protocol (i.e. the body in the view of this additional shell). Let
be an exclusive identifier, i.e., an identifier that never appears in any execution of the base protocol. Assume the session identifier is
.
The ITI with special identifier
never activates its body and the shell processes three types of requests: first, when activated with input
from an ITI M, it stores the entry
in an ordered list (initially empty) unless M is already recorded in the list. Second, when activated with input
from an already registered ITI M and ITI
is not yet registered, then record
. Also, record
unless
is already registered. The return value to M in both cases is the trivial output
. The party allows any registered ITI M to query the stored list and ignores any message on the backdoor tape.
For any other ITI running in this instance, when activated for the first time, the shell sends
to ITI
where
can denote any auxiliary information. (Note that reveal-sender id and forced-write flags are set). When receiving
it resumes processing its first activation by activating its body (which in structured protocols might be another shell oblivious of the above interaction).
For any other ITI running in this instance, when the shell processes an external write request from its body to an ITI M, it sends
to ITI
where
can denote any auxiliary information, before resuming with processing the external write request.
By exclusivity of , the shell operates in an oblivious fashion from the point of view of the body. Since the shell only talks to
, this in turn is even oblivious to the environment and the adversary.
In fact, this is not entirely obvious: while no interaction via the backdoor tape indeed means that the adversary can neither corrupt nor extract information from the directory, another corrupted ITI in the system might get information from via a normal query and give the result to the adversary. This, however, is not possible: in UC, model-related instructions are organized in shell layers, where each shell is unaware of the outer shells, and treats the inner shells as part of the body. Now, the shell layer describing the model-related instructions to communicate with directories is outside of the shell implementing the corruption layer and therefore, the corruption layer is unaware of the directory. For more details, see [Can20, Section 5.1]. We note that this observation is already crucial for the standard UC composition theorem and not novel for our work, because corruptions must not invalidate the subroutine-exposing property of a protocol and hence corruptions should not interfere with the subroutine-exposing shell (or the shell introduced by the UC operator).
To conclude, the above mechanism is used by and its subsidiaries
in the following way: first, whenever a new machine with code
is about to spawn an instance of
, it registers with the directory and defines as auxiliary input the extended identity of the instance of
it is going to spawn (and can also halt if it sees that another session already started). Second, the machines running code
use the
calls and put as auxiliary input the information
of the virtual ITIs of
to additionally store the invocation graph of the main instance of
which in particular allows to infer what the (virtual) main instance of
is (see below for why this is important). In particular, all ITIs in the extended session of
use the same execution graph directory ITI. To see that we get all properties we need from this, we refer to Proposition 1.
We now give a formal definition of . The construction uses the body and shell formalism from [Can20].
![$$\mathsf {M}[\pi ,\gamma ]$$](../images/508076_1_En_1_Chapter/508076_1_En_1_Chapter_TeX_IEq265.png)
exposes its subroutine structure to a directory ITI (which the environment can access) and its invocation graph to an additional execution graph directory ITI as discussed above to ensure that
is subroutine respecting.
can be invoked with an arbitrary session identifier. It allows the environment to invoke exactly one (top-level) instance of
with a freely chosen session identifier (note that addressing this “challenge protocol” is done in an abstract manner by using an identifier MAIN). Additionally, arbitrarily many instances of
(again with arbitrary session identifiers) can be invoked (again the addressing is done in an abstract fashion using identifier GLOBAL).
When an ITI running
, say with party ID
, provides input to
in session s, then it wraps this input and invokes the ITI with code
, party id
, and a session ID that encodes s. This ITI unwraps the received content and provides it to the main party
of
in session s. A similar mechanism happens between any two machines to ensure that this instance of
is oblivious of this overlay.
The machines running
(resp.
) detect, using the execution graph directory, when a “main party of
(resp.
)” provides subroutine output to an external party, and can then provide this output to the correct main party
which delivers it to the environment. Note that when
delivers such outputs to the environment, it only reveals the party ID and session ID, and whether the source was the global subroutine (using identifier GLOBAL) or the single invoked instance (using identifier MAIN). Recall that the UC control function plays a similar role. We note in passing that
can ensure that at most one session of
is invoked by the concept of the execution graph directory and block any attempt to create a new session of
if one exists already.
refuses to communicate with the adversary, i.e., it does not communicate over the backdoor tape and is hence also incorruptible.
In order to map this to a program, we quickly recall the message passing mechanism in UC. UC uses the external-write mechanism via which a machine can instruct the control function to invoke a machine with a given input on one of three tapes. Messages are either written on the input tape (e.g., when a party calls a subsidiary), or on the subroutine-output tape (e.g., when a subsidiary returns an output to a caller), or on the backdoor tape (which only models the interaction with the adversary). Therefore, our transformation has to take care to route all the messages of the “wrapped” instance of to the correct machines by taking care of inputs, subroutine outputs, and backdoor messages.
Code of Transformation. The formal description of the management protocol , which is parameterized by two ITMs
and
, as well as the code of the associated shell of the transformation, denoted
that takes as parameters the ITM
and is a structured protocol that runs
as its body, are provided in Appendix A.
Runtime Considerations as a Standard UC Protocol. The protocols generated by are standard UC protocols executed by an environment
. The run-time of
and
deserves further discussion. Recall that in a parameterized system, each ITI only starts executing after receiving import at least k—where k is the security parameter. That means when
is first invoked it requires import k to before executing, the execution graph directory requires additional import k, and the sub-protocol
or
to which the message is directed also requires import k before executing. We define
such that it begins executing only after receiving import at least 3k; this ensures that the initial operation has sufficient import to complete. The further operations performed by
and the shell
of
and
are only administrative such as copying and routing messages between ITIs, which means that they can be accounted for by slightly increasing the involved polynomials.
An Alternative Management Protocol. We note that defining so that the main parties of an instance of
consist of ITIs that run exclusively shell code, and where the ITIs that have body
or
are subroutines of these main parties of
, is a design choice that was made mainly for clarity of exposition and to clearly delineate the various parts of the management protocol. Alternatively, one can define a different management protocol,
, where the code of the main ITIs of
becomes part of the shell code of the ITIs whose body runs either
or
. That is, the main parties of an instance of
will be the union of the main parties of the relevant top-level instance of
, along with the main parties of the relevant top-level instances of
. One advantage of this formalism is that there are no additional management-only ITIs, and so the runtime issues mentioned in the previous paragraph do not come up. In addition, we believe that the restriction to regular setups can be relaxed. Additional details are provided in [BCH+20].
2.2 UC Emulation with Global Subroutines
We now define a variant of UC emulation that intends to capture, within the plain UC model, the notion of EUC-emulation from [CDPW07]. Namely, we say what it means for a protocol to UC-emulate another protocol
, in the case where either
or
or both are using another protocol
as subroutine, where
can be accessed as subroutine of other protocols, i.e., is “global” or “shared”.
(UC emulation with global subroutines). Let ,
and
be protocols. We say that
-UC-emulates
in the presence of
if protocol
-UC-emulates protocol
.
Note that in the above, can be any identity bound as of standard UC. Recall that it is a tool to get more fine-grained security statements and technically restricts the environment to interact with the protocol instances
and
in a certain way.
Our definition of UC-emulation in the presence of a global subroutine is very general, and we need further terminology in preparation for the conditions under which the composition theorem applies. Consider the case where we want to analyze security of multiple instances of a protocol which individually are subroutine respecting except that they all call a global subroutine
. In the terminology of [CDPW07], such protocols are called
-subroutine respecting. We generalize their definition and allow for more than one instance of
.




the conditions do not apply to those sub-parties of instance s that also belong to some extended session
of protocol
;
(sub-)parties of s may pass input to machines that belong to some extended session
of protocol
, even if those machines are not yet part of the extended instance of s.
While the definition above allows to violate subroutine respecting through subroutines with a code that is also used by
, we are only interested in protocols
where subsidiaries only communicate with outside protocols if they belong to the subroutine
. To this end, we will only consider
-subroutine-respecting protocols
where
is itself subroutine respecting.
For our composition theorem to hold, we must impose a light technical condition on the shared subroutine. The condition states that (a) a shared subroutine does not spawn new ITIs by providing subroutine output to them, and (b) the shared subroutine may not invoke the outside protocol as a subroutine. On a high level, this prevents that the shared subroutine itself spawns new higher-level sessions. On a technical level, the composition theorem relies on a hybrid argument that would not work if the shared subroutine spawns, for example, new sessions for which it is not decidable in a dynamic fashion whether or not they actually belong to the main instance of the protocol under consideration. To our knowledge, all global setups used in the literature satisfy these restrictions. For example, a global CRS does not output the reference string to parties who never asked for it, a global ledger requires parties to register before participating in the protocol, and a global clock only tells the time on demand. An example of a hypothetical functionality that violates this condition is a global channel functionality that outputs a message to a receiver whose extended identity can be freely chosen by the sender.
(Regular setup). Let be protocols. We say that
is a
-regular setup if, in any execution, the main parties of an instance of
do not invoke a new ITI of
via a message destined for the subroutine output tape, and do not have an ITI with code
as subsidiary.
As will become clear in Proposition 1, when considering a protocol that is
-subroutine respecting, where
itself is
-regular and subroutine respecting, then we naturally have a clean interaction between
and “a global subroutine”
without any unexpected artifacts. For example,
does not initiate new ITIs with code
, neither as new protocol sessions “outside of
” nor as proper subroutines of
itself.
We next state the useful proposition that our transformation is by default subroutine respecting and preserves the behavior of the involved protocols in the following sense: Let be as before, and let
be a protocol that invokes at most one session of
. Let
be the protocol that executes
as a virtual ITI within a shell. Let
be an otherwise unused SID.
When
provides input m to ITI
with code
, then
instead provides input
to
with SID
, where
is the extended identity of the virtual instance of
and
equals
except that its code-field
is set to MAIN if
and to GLOBAL if
(and results in the same subroutine being invoked as
does).
When
obtains subroutine output
from
with SID
, where
is the extended identity of the virtual instance of
, then
emulates subroutine output m from
to
, overwriting code MAIN of
with
and code GLOBAL with
.
( is subroutine respecting and preserves behavior). Let
be subroutine respecting and
be
-subroutine respecting. Then the protocol
is subroutine respecting. In addition, let
be
-regular, and let
be a protocol that invokes at most one subroutine with code
. Denote by
the transformed protocol described above. Then the transcript established by the set of virtual ITIs in an execution of some environment with
is identical to the transcript established by the set of ITIs induced by the environment that has the same random tape but interacts with
.
The proof is deferred to [BCH+20].
2.3 Universal Composition with Global Subroutines

A graphical depiction of our composition theorem in the presence of global setups. Top: UC-emulates
(Definition 1). Bottom: Replacement of
by
in some context protocol
. See Theorem 1 for the assumptions made on
and
for replacement to go through. Empty boxes indicate subroutines of
that are not
or
.
(Universal Composition with Global Subroutines – UCGS Theorem). Let be subroutine-exposing protocols, where
is a
-regular setup and subroutine respecting,
are
-subroutine respecting and
is
-compliant and
-compliant for
. Assume
-UC-emulates
in the presence of
, then
UC-emulates
.
In line with the run-time discussion for , protocol
only starts executing after receiving import at least 4k. This ensures that, during the execution, the modified version of
(which we refer to as
in the proof) has a sufficient run-time budget to accommodate the creation of the additional ITI
, its execution graph directory, as well as an additional directory introduced by the proof technique in this theorem.
(outline). In the spirit of our overall approach, we aim at applying the UC composition theorem instead of reproving composition from scratch. Thus, we choose the following high level structure of the proof. We modify each invocation of within
separately. For each
, we first rewrite
such that the management protocol
is invoked instead of the i-th
. Then, we replace
with
within this instance of the management protocol. This is done by invoking the UC composition theorem. Afterwards, we remove the management protocol instance again and let
instead call
directly. All modifications are oblivious from the perspective of the environment. The full proof can be found in [BCH+20].
We point out that our composition proof makes it explicit that no changes to the concrete interaction between (resp.
) and the instances of the global subroutine
are needed. This is important point to consider, since often all instances of
(resp.
) within
would share the same instance (or a fixed number of instances) of
and hence our theorem shows that this behavior is preserved. Such specific cases (where a bounded number of instances of
can be assumed to exist) follow as a special case of our treatment.
2.4 On Existing Global UC Statements and Proofs

- (a)
is satisfied if (i) any
of an ITI in the system is not declared by the environment as an external source
in a request to
. This is typically a minimal requirement, as otherwise, whatever the global setup provides to a protocol, this information could be first claimed by the environment (for the entire test session) even before spawning the test session. This is problematic unless we have very simple setups such as a common-reference string or a plain global random oracle [BGK+18].
- (b)
As a further restriction, one could enforce that
provides per session guarantees:
is satisfied if whenever (additionally to above)
and
are the source extended identities in an input to
, then
has to hold. This technically does not allow any other instance to access the shared information, but still the information is formally accessible by the environment claiming an external identity of this session. This model is useful when certain elements of the setup need to be programmed by a simulator, while keeping the overall model of execution close to standard UC.
If proofs conducted in EUC have the above restrictions assumed when proving indistinguishability of the simulation, then it is conceivable that these proofs are transferable into our new model to satisfy precondition of Theorem 1 and thus composition is again established. We discuss such “EUC statements” in the next section. In particular, Sect. 3.2 recovers an EUC example in detail, where we also show how our model can capture various forms of “shared subroutines” ranging from subroutines fully accessible by the environment to subroutines shared only by the challenge protocol (which captures joint-state UC (JUC)).
3 Applications of the UCGS Theorem
We provide two examples to showcase how to prove emulation statements in the UC model in the presence of global subroutines and to verify that the preconditions of the UCGS Theorem are satisfied. The first example is global public-key infrastructure (specifically, adapting the treatment of [CSV16]). The second example is a global clock (adapting the treatment of [BMTZ17]).
These examples bring forth two additional technical aspects of universal composition with global subroutines within the UC framework: The first has to do with the mechanics of having one ideal functionality call another ideal functionality as a subroutine, and the second has to do with the need to find a judicious way to define the external-identities predicate for the management protocol so as to make the best use of the UCGS theorem. (Indeed, these aspects of UC with global subroutines have been lacking in the treatment of [CDPW07].)
Section 3.1 introduces the formalism for having an ideal functionality call another ideal functionality as subroutine. Section 3.2 presents the application to modeling global public-key infrastructure. Section 3.3 presents the application to modeling global clock in the context of blockchains.
3.1 Interaction Between Ideal Functionality and Shared Subroutine
The UCGS theorem essentially state that if protocol UC-emulates protocol
in the presence of
, and both
and
are
-subroutine respecting, then
UC-emulates
for any
. A natural use-case of the theorem is when the emulated protocol,
, is an ideal protocol for some ideal functionality
, and
is an ideal protocol for some ideal functionality
. This means that to make meaningful use of the theorem,
should make subroutine calls to
, which in this case means that
should call dummy parties for
.
A simplistic way to do that would be to simply have directly call (and thus create) dummy parties for
. However, in this case, by the definition of dummy parties as per the UC framework [Can20], the PID of the created dummy party will be the identity of
. This may be overly restrictive, since the emulating protocol,
might have other ITIs call
. So, instead, we define a mechanism whereby
does not directly call a dummy party for
. Instead,
creates a new “intermediate dummy party,” which serves as a relay of inputs and outputs between
and the dummy party of
. The identity (specifically the PID) of the intermediate dummy party is determined (by
) so as to enable realization of
by protocols
where the PIDs of the parties that use
are meaningful for the overall security. (This mechanism can be viewed as a way to make rigorous informal statements such as “provide input x to
on behalf of [sender] S” [CSV16].) Details follow.
(Intermediary dummy party). Let be an ideal functionality and
some protocol. We define the operation of an intermediary dummy party with code
as below. Let (p, s) be the party and session id indicated on the identity tape, and let
(code of intermediary) be an exclusive syntactic delimiter ending the description of the code
.
When activated with input
from an ITI with code
and sid s: the party only acts if the content of the identity tape matches
and the reveal-sender-id flag is set. Then, provide input v to the ITI
(with reveal-sender identity and forced-write flags set).
Upon receiving a value
on the subroutine output from an ITI with identity
(for some
): the party only acts if the content of the identity tape matches
and the reveal-sender-id flag is set. Then, provide subroutine output
to the ITI with identity
(with reveal-sender identity and forced-write flags set).
Any other message on any tape that is not matching to some case above is ignored.
A functionality can now contain general instructions of the form “provide input x on behalf of P in session s to an instance of
running in session
and PID
” and is understood as the following operation: the ITI running code
in some session
provides input
to intermediary dummy party with identity (s, P) and code
. Now, P (in session s) will appear as the PID of the ITI invoking
.
can process the answers when obtaining the returned values from the intermediary dummy party on its subroutine output tape.
Often it is clear from the context—and standard for EUC-like statements—that only one session of with a predefined session identifier
is expected to be running, and that each main party (with PID) P of the challenge session s can participate in the shared process
(i.e. by invoking ITI with identity
and code
). In such cases, the statement “output x on behalf of P to
” by an ideal functionality
in (challenge) session s is understood as providing input
to the intermediary dummy party with identity (s, P) (and code
) with exactly the desired effect that the ITI with code
, PID P and sid
is invoked, and where P in session s appears as the official caller.
Clearly, the intermediary is a modeling tool that no environment should tamper with. Hence, for the sake of clarity, when we speak of UC realization of an ideal functionality interacting with a global subroutine, we mean the following:
(Realization with interaction with shared subroutine). We say that UC-realizes
in the presence of
w.r.t.
-identity bounded environments, if Definition 1 holds for the particular choice of
and with respect to the identity bound
that equals
augmented with the restriction that no
specified by the environment (source or destination) can specify code with delimiter
.
The intermediary dummy party provides a guaranteed interaction channel and formalizes what was implicitly assumed in prior work when a functionality interacts with, e.g., a global setup such as an certification functionality in the name of a party.
3.2 Example 1: Authentication with Global Certification
Authentication with respect to a global certification functionality (often called PKI) aims at formalizing the fact that if a certified verification key for a digital signature is globally available, then any signature generated with respect to that key can be verified globally, by anyone, even if the signature was generated in the context of a specific protocol. This in particular mean that protocols that employ certified digital signatures might have global “side effects”. For example, if Alice signs a message in a particular session, using a signing key for which there is a globally accessible certificate, then anyone can cross-check that it was Alice who signed the message. In particular, this might mean that Alice can incur further liabilities.
[CSV16] provides a treatment of this situation within the GUC framework of [CDPW07]. We use the UCGS theorem provide an alternative (and arguably simpler) treatment within the plain UC framework.




The Protocol. The protocol works as follows, where the shared subroutine is
, where A is part of the code. Note that we use the
of the caller as the PID of the sender (to prevent that arbitrary machines can send messages in the name of A), and also simply choose the session-id
for the shared subroutine. We further assume an unprotected medium to send messages, which as specified in [Can20] can be modeled by simply letting the shell forward sent messages to the adversary (via the backdoor tape) and interpret specific inputs on the backdoor tape as received messages.
- (a)
Upon receiving an input
from party A4, verify that this machine’s eid is
; otherwise, ignore the request. Then, set
and
, send
to
(i.e., the input is given to the ITI running code
in session
with
) to obtain the response
, send
to ITI
(via the unprotected communication medium).
- (b)
Upon receiving message
from the unprotected communication medium, this party, denote its eid by
, sets
, sets
, sends
to
(i.e., the input is given to the ITI running code
in session
with
), and obtains a response
. If
then B outputs
(with target eid
) and halts. Else B halts with no output.
We also assume here standard byzantine corruption of protocol ITIs as defined in [Can20]: for a structured protocol, this involves interaction with a special corruption aggregation ITI that aggregates all corruption information (provided by the shell of the protocols). The goal of this is that the environment receives “genuine” information about the corruption sets during the execution. The corruption aggregation is identified by a special PID .

The Identity Bound on the Environment. In order to show in which contexts the protocol is secure, we have to specify an identity bound. For the result to be broadly applicable, we have to find the least restrictive conditions on the allowed interaction between the environment and the challenge protocol (and ) such that the realization statement holds.
In our specific case, we can give the following guarantee which basically says that the environment cannot claim the extended identity of the signer: more precisely, we mean that the environment is not allowed to claim source eid in requests to
running in a session s if
has been already used as the PID to sign a value
and PID is not marked as corrupted. Conversely, the environment is not allowed to invoke
to sign a value
using as PID an extended id
which has been used before as the caller of
running in session s and which is not marked as corrupted. Furthermore, it is not allowed that the environment provides input to the ITI
(where “not allowed” means that the input provided by the environment is formally rejected if the condition is satisfied by the state of the system at the moment of providing the input. See more details in [Can20]). All other invocations are allowed.
Implications of the Above Identity Bound. Recall that any non-trivial bound restricts the class of context protocols
for which the UCGS theorem applies: Essentially the theorem applies only to those protocols
which manage to guarantee that the bound
remains valid for any combination of
and
as subroutines within
, and similarly for any combination of
and
as subroutines of
. In the above case, this means that authenticity of the sender identity is guaranteed as long as the context protocol
makes sure that the global certification module
only takes signature requests from entities that correctly represent their identity. Since the underlying model guarantees that the caller identity is correctly represented, except for the case of inputs provided by the environment, this means that authenticity is guaranteed as long as
makes sure that
does not take inputs directly from the environment.
We note that the restriction also touches the corruption model in order to ensure PID-wise corruption. We force the environment to obtain the system’s corruption information only through one corruption aggregation machine, which in our case is the functionality (resp. challenge protocol) that provides the entire system’s view to . Note that this is in accordance with the approach that there is exactly one machine in an execution that provides this information to the environment. We thus have:
Let I be an extended identity, and let be the predicate that allows all extended identities other than I as described above. Protocol
UC-realizes
in the presence of
with respect to the identity bound
.
The proof is deferred to [BCH+20].
3.3 Example 2: Composable Blockchains with a Global Clock
Motivation. We next showcase the shared-setups composition theorem by demonstrating how it can be applied to obtain composition (i.e., subroutine replacement) in a context in which global (shared) setups have recently become the norm, namely that of composable blockchains. Concretely, a number of recent works [BGK+18, BGM+18, KKKZ18, BMTZ17] analyze the backbone protocol (intuitively corresponding to the the consensus layer) of mainstream cryptocurrencies, such as Bitcoin and Ouroboros assuming a global (shared) clock functionality which is used for enforcing synchrony.
In a nutshell these works prove that by providing access to a global clock (along with some additional local or global setups) the underlying backbone implements a functionality
that abstract a transaction ledger with eventual consistency guarantees (more concretely, a ledger enforcing the so-called common-prefix, liveness, and chain quality property, cf. [GKL15, PSS17].
Let us focus on [BMTZ17]. This work proved that inducing a special way (discussed below) in which the global (shared) clock functionality is used—i.e., a special registration/deregistration mechanism—there exists a simulator in the -hybrid world that emulates the behavior of any adversary attacking the Bitcoin backbone protocol in the
-hybrid world, where
and
are standard (local to the protocol) UC functionalities. The goal of this modeling is to enable abstracting the internals of the ledger protocol, designing protocols that have access to the ledger functionality (and the global clock), and then using the GUC theorem to argue that any protocol which is proved security assuming access to this local ledger functionality will remain secure when the functionality is replaced by the Bitcoin backbone protocol. Assuming existence of such a composition theorem, [BMTZ17] proceeded in proposing a construction of a cryptocurrency ledger—namely a ledger functionality that also checks signatures of parties—assuming a ledger as above and a signatures functionality. However, as discussed, the GUC modeling does not provide sufficiently detailed treatment of external identities so as to make the above approach go through.
We show how the UCGS Theorem can be used by arguing that the preconditions of Theorem 1 are satisfied for the involved components.
Context Restrictions. First we need to fix the (identity bound) predicate used to define the applicable context. Recall, that
is intended to restrict the set (or rather the sequence) of extended identities that the environment can claim when contacting protocols. Let us first consider what happens if we do not impose any restriction. We argue that any such unrestricted access makes the global clock functionality behave in a way that no longer ensures synchrony.
To this direction let us recall the basic idea behind clock . For clarity, we show a concrete clock functionality formulated in our model in Fig. 5. The functionality
stores a monotonically increasing counter
(corresponding to the current time or global round) which any party can request by issuing a special
command. Furthermore, any honest party can send a message
to the clock which records it and once all honest parties have sent such a request while the time was
, the clock increases its time, i.e., sets
.
The above clock was used as follows to ensure synchrony—i.e., that no party starts its round before every party has finished round
—which was a property necessary for the security proof in the above blockchain protocols: In each round, as soon as a party has completed all its actions (sent and received all its messages) for the current round, it signals this to the clock by sending a
command; from that point on this party keeps asking the clock for the time whenever activated and proceeds to the next round only once it observes that this counter advances. As the latter event requires everyone to signal that they are done with the current round, this gives us the desired synchrony guarantee. Notably, by design of the setup, any
-ideal protocol
is trivially regular (according to Definition 3). This is true because the clock has a special registration mechanism which forces it to only talk to ITIs which have already registered with it and therefore never spawns new ITIs as required by that definition.





A global clock functionality. We remark that due to the clean definition of shared subroutines in our model, the depicted global clock has a simpler structure than the clock in the original version of [BMTZ17]. Still, the clock offers the same functionality towards calling ITIs.
Applying the Composition Theorem. Assume now that we want to prove that in the aforementioned construction of the cryptocurrency ledger from the simpler (backbone) ledger from [BMTZ17] we can replace the simpler ledger
by the backbone protocol. This corresponds to proving Theorem 1 for
being the
-ideal protocol,
being the backbone protocol,
being the
-ideal protocol, and
being the construction of the cryptocurrency ledger with access to
. All protocols,
can access protocol
. First, by inspection of these protocols, we can verify that
are subroutine respecting. Note that although the protocols logic is involved, the subroutine structure is quite simple (i.e., subroutine calls only go to ideal protocols that formalize either local or global setups). In particular, although not directly claimed in the original version of in [BMTZ17], it is possible to convert both
and
into subroutine-exposing protocols by applying the exposing mechanism (by equipping the protocols with the respective subroutine-exposing shell). Finally, both
and
are by design subroutine respecting except with calls to
(note that this is due to the fact that a similar concept exists in EUC). Finally, restricting the environment via
ensures that the use of
(i.e., the clock) will induce the desired synchronous structure specified for the simulation proof from [BMTZ17]. Given all of this, the UC-realization proof of [BMTZ17] can be translated to this model (the overhead is identical to the overhead in the previous example) to conclude that
UC-emulate
in the presence of
when the environment is
-identity-bounded. Thus we can apply Theorem 1 to prove that
UC-emulates
whenever the context protocol calls the subroutine (to be replaced) in the legal way as defined by
and obtain the desired statement.
We thank the anonymous reviewers of Eurocrypt and TCC 2020 for their corrections and suggestions to improve this work.