Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Cryptographic Security for Mobile Code

Joy Algesheimer Christian Cachin Jan Camenisch Gunter Karj0th

IBM Research
Zurich Research Laboratory
CH-8803 Ruschlikon, Switzerland
{jmu,cca,jca,gka}@zurich.ibm.com

Abstract capable of moving from server to server as necessary to


fulfill their goals. Important applications include mobile
This paper addresses the protection of mobile code against computing, where bandwidth is limited or users are dis-
cheating and potentially malicious hosts. We point out that connected, data retrieval from large repositories, and con-
the recent approach based on computing with “encrypted figuration management of software and networks. Today’s
functions” is limited to the case where onlj the code origi- vision of mobile agents roaming the Internet may soon be-
nator learns the result of the computation and the host run- come reality as the paradigm is incorporated in large-scale
ning the code must not notice anjthing at all. We argue applications.
that if the host is to receive some output of the computation, Although sound definitions of mobile computations are
then securing mobile code requires minimal trust in a third still under debate (e.g., [ 13]), we assume here that mobile
party. Tamper-proof hardware installed on each host has code is a program that is produced by one entity, called the
been proposed f o r this purpose. In this paper we introduce originator, and is subsequently transferred to a second en-
a new approach for securely executing (fragments of) mo- tity, the host, immediately before it is executed by the host.
bile code that relies on a minimally trusted third party. This In other words, no manual intervention (such as performing
party is a generic independent entity, called the secure com- an installation or running a setup routine) is required on be-
putation service, which pelforms some operations on behalf half of the host; mobile code comes ready to run. Moreover,
of the mobile application, but does not learn anything about mobile agents are capable of continued, autonomous oper-
the encrypted computation. Because it is universal, the se- ation disconnected from the originator and migrate freely
cure computation service needs to be only minimally trusted to other hosts during their lifetime. Such agents have also
and can serve many diflerent applications. We present a been called itinerant agents.
protocol based on tools from theoretical cpptography that
is quite practical f o r computing small functions.
Mobile Code Security. Two security problems arise in
the area of mobile code: (1) protecting the host from ma-
licious code and (2) protecting the code from malicious
1 Introduction hosts. The first problem has received considerable atten-
tion because of the imminent threat of computer viruses and
Mobile code is an important programming paradigm for Trojan horses-nothing but prominent members of the mo-
our increasingly networked world. It provides a flexible bile agent family. Current solutions are to run mobile code
way to structure cooperative computation in distributed sys- in a sandbox with fine-grained access control and to apply
tems. Already today, the Internet is full of mobile code code signing for exploiting a trust relation with the code
fragments, such as Java applets, which represent only the producer. We address the second problem in this paper: pro-
simplest form of mobile code. tecting the mobile application. Solutions for this are far less
Mobile agents are mobile code that acts autonomously developed, but this problem needs to be solved for making
on behalf of a user for continuous collecting, filtering, and the mobile agent metaphor useful in many contexts.
processing of information. They combine the benefits of Mobile code is exposed to various security threats: a ma-
the agent paradigm, such as reacting to a changing environ- licious host may examine the code, try to learn the secrets
ment and autonomous operation, with the features of remote carried by an agent, and exploit this knowledge in its inter-
code execution; they operate in computer networks and are action with the agent to gain an unfair advantage. A host

2
1081-6011/01$10.0002001 IEEE
might also try to manipulate the result of a computation. computation to the code originator and its host. Moreover,
We do not address denial-of-service attacks here, such as the computation service itself does not learn anything about
killing the agent. Our goal is to achieve secrecy for mobile the computation; it must only be trusted not to collude with
applications and integrity for their outputs in the traditional the originator or the host.
sense of information security. Our architecture builds on tools for secure computation
Protecting mobile code was deemed impossible by some from cryptology and applies them in new ways. In par-
mobile code researchers until Sander and Tschudin [22]re- ticular, we employ Yao’s “encrypted circuit construction”
alized that protocols from theoretical cryptography could for scrambling a circuit that computes the desired func-
be useful to execute mobile code in an encrypted form on tion [26]. Such methods had been thought of theoretical in-
an untrusted host. However, most such protocols for so- terest only, but current technology makes them appear prac-
called secure computation [ 16, l ] require several rounds of tical for small tasks where maintaining privacy justifies this
interaction and are therefore not applicable in our context. overhead.
Sander and Tschudin concluded that only functions repre- The generic nature of the proposed computation service
sentable as polynomials can be computed securely in this has several benefits:
manner. Subsequent work of Sander et al. extends this to all
Its cost can be shared across many applications be-
functions computable by circuits of logarithmic depth [23].
cause it is generic; nothing about its usage must be
Recently some of us together with Kilian have found a known before deploying it.
protocol for computing all polynomial-time functions ef-
ficiently [7], which solves the mobile code privacy prob- The trust placed in its integrity is universal and not
lem in this form. In particular, this protocol allows any bound to a particular service or to an application con-
polynomial-size circuit to be evaluated securely in polyno- text; secure computation servers may be set up and op-
mial time using only one round of interaction. erated by independent entities.
However, this approach has a serious drawback: no in-
It is based on software and commodity hardware only
formation about the encrypted computation must leak to the
and therefore much cheaper to build and operate than
host and only the originator may receive any output. This
any solution involving specialized hardware.
rules out any active mobile code that performs some imme-
diate action on the host (like a mobile agent in a shopping In many respects, the secure computation service resembles
scenario that accepts or rejects an offer of its host based on other generic security services like a public-key infrastruc-
a secret strategy [27]). The impossibility of protecting ac- ture (PKI) or an anonymous re-mailer. These services also
tive mobile code is demonstrated in Section 2 below; the enhance security and privacy where needed.
basic problem is that a malicious host can observe the out-
put of the computation and simply run the code again with Organization of the Paper. Section 2 introduces a lor-
a different input. mal model for mobile computations, formulates the desired
The only existing defense for active mobile code against security properties, and reviews prior work for protecting
a malicious host uses trusted hardware. This has been pro- mobile code. It is shown why the approach based on “one-
posed by Yee [27] and by Wilhelm et al. [2S] and entails round secure computation” is not suitable for securing ac-
running mobile code exclusively inside tamper-proof hard- tive mobile code. Our architecture is introduced in Sec-
ware, encrypting it as soon as it leaves the trusted environ- tion 3, and Section 4 illustrates two applications: a com-
ment. The implicit assumption one must make here is that parison shopping agent and a generalized auction scheme.
all users trust the manufacturer of the hardware. Such an Conclusions are drawn in Section S.
assumption seems very strong and it is unclear whether the
benefits of the mobile code software paradigm justify the
2 Protecting Mobile Agents
deployment of an expensive hardware infrastructure (un-
like the example of a DVD player using tamper-proof hard-
This section formalizes mobile agent computations and
ware, which primarily provides the functionality of playing
states our desired security conditions. The formal model
video).
is then used to argue why protecting active mobile agents
purely by software is impossible without further assump-
Our Contribution. In this paper, we introduce an archi- tions.
tecture for secure execution of active mobile code frag-
ments that needs no additional client hardware. Instead, 2.1 Model
we propose a generic secure computation service that per-
forms some cryptographic operations on behalf of the mo- The defining element of a mobile code computation is
bile code; i t guarantees privacy as well as integrity of the that it proceeds autonomously and independently of the

3
originator. We model mobile agent computation as follows. Hj learns about the input xj-1 to its part of the computation
depends on the combination of the agent output z j and the
Participants: There are an originator 0 and e hosts host’s private input y j .
H I , .. . ,He, on which the mobile agent runs. For simplicity, the model assumes that the order in which
the agent visits all hosts is fixed. It can be extended to allow
Non-interactive communication: Each participant sends
for the sequence to depend on zj by introducing a function
and receives only a single message. We denote by mo
7r : 2 -+ { 1,. . . , e} and sending the mobile agent to
the message that 0 sends to HI and by m, the mes-
from Hj .
sage that H, sends to H3+1for j = 1,.. . ,1 - 1, and
In the special case of mobile code applications with a
by me the message that the last host He returns to 0.
e
single host H , the function g yields 0’s output and h gives
Computation: Let the state of the mobile agent be an el- H’s output z .
ement of a set X.Its initial state zo is determined by
0. Let the input by H:, be an element of a set y and 2.2 Software-only Solutions
the output to H3 an element of 2 (input and output
domains are the same at all hosts for simplicity). The Sander and Tschudin [22] were the first to realize that
agent computation on host H:, is represented by two a software-only solution to protecting mobile code from a
functions malicious host is indeed feasible for small programs using
cryptographic techniques. They proposed to use so-called
gj : X x y -+ X and hj : X x y -+2
homomorphic public-key encryption schemes that allow for
that determine the new state xj = g j ( z j - 1 , y3) of the non-interactive addition or multiplication of two encrypted
agent and the output z j = hj(xj-1, yj). 0 obtains the messages by manipulating ciphertext only. In this way, the
final state E = xe E X of the agent. The functions gi host can compute any function g(., y ) on a hidden input z
and hi are known to all parties. that is representable by a polynomial (in the single-host sce-
nario).
A (non-interactive) secure mobile computing scheme This approach was later improved by Sander et al. [23] to
+
consists of 21 2 algorithms do,AI,. . . ,de, & , . . . ,Be, non-interactive evaluation of all functions g(.,y) on a hid-
and V such that for all j = 1 , .. . , and 50 E X ,yj E Y , den input z that can be represented by circuits of logarith-
and with mic depth [23]. Cachin et al. [7] further generalized this to
arbitrary functions, provided they can be represented by a
mo = A o ( ~ o ) polynomial-size circuit; they also described how to realize
m3 = dJ(m:,-lr 9,) f o r j = 1,.. . , e secure mobile agent applications with multiple hosts in this
z3 =B3(m3-l,y3)forj=1,...r! way.
However, all those solutions address only the secure
= D(me) evaluation of g j for updating the agent’s state and producing
the following two conditions hold the final result, but ignore how to realize hj for producing
output at H j . More precisely, they are restricted to func-
Correctness: = ge(ze-1, ye) and zj = hj(zj-1,yj) for tions hj : y -+ 2 such that the output from the agent to the
j = 1,.. . ,e, using host must not depend on anything else than its own input.
In fact, it is not hard to see that this is the best one can
Xy = gjs (. ‘ ’ ( 9 2 (91( 2 0 1 YI), Y2) . ’ .), Yjt achieve under the given circumstances. Towards a contra-
diction suppose there exists an active agent that also outputs
f o r j ‘ = 1,.. . , e - 1. some value to its host, for example, in a shopping agent ap-
Privacy: The inputs, outputs, and the computations of all plication indicating whether or not to accept an offer. As-
hosts remain hidderi from the originator and from all sume for simplicity that the agent’s decision is solely based
other hosts, except for what follows from their outputs: on the price y j offered by Hj and that it will buy the cheap-
0 learns only 6 but nothing else about any y j than what est offer; the state of the agent is xj-1 = c indicating a
follows from xo and e,
and similarly, H j learns only secret threshold c chosen by the originator, below which it
will accept the offer. Because of the communication con-
z j but nothing about z o and y j ~for j’ < j than what
follows from z j and y j . straints in our model it must be that running algorithm f3j
on mj-1 and yj immediately yields z j . Then H j can deter-
These requirements can be defined formally using the mine whether the agent is willing to accept yj or not, i.e.,
simulation approach from cryptography [3, 18, 14, 81. Note whether y j < c. But nothing prevents a malicious host from
that in the definition of privacy, the information that a host running B j again with some other yi and continuing in this

4
way until the agent has leaked c completely, applying sim- under assumptions that ( I ) T does not collude with the orig-
ple binary search. inator against any host, and (2) T does not collude with any
This shows that software-only protection for the privacy host against the originator or against any other host.
of a mobile shopping agent application is not possible. In Our scheme is generic and not bound to any particular
fact, we can conclude the following. application. Hence the service of T may be offered as a
public service for “secure mobile agent computation” on
Proposition 1. (Non-interactive)secure mobile computing the Internet. The two trust assumptions seem reasonable for
schemes do not exist. In particulal; any scheme in which such a generic, independent entity. Clients who use this ser-
some host is to learn injornintion that depends on the
vice in the role of 0 or H (e.g., for comparison shopping)
agent’s current state cannot be secure.
do not have to fear that T has “second thoughts” trying to
As a consequence of this, we must extend our model violate their privacy (e.g., of customer profiling and collect-
above in order to obtain privacy and integrity for active mo- ing marketing data). Moreover, T itself has an interest to
bile agents. Allowing for communication between each host maintain its reputation as a security provider.
and the originator would solve the problem as mentioned The scheme described below extends the communication
earlier; but it would destroy the benefits of the mobile agent pattern of mobile agent computations by two messages from
paradigm where the originator may be poorly connected or each host to T and back. Figure 1 shows the communication
temporarily off-line. The only alternative seems to extend in traditional mobile agent computation and in our scheme.
the model by at least one trusted element. Our technique is based on encrypting a binary digital cir-
One such extension, proposed by Yee [27] and by Wil- cuit that realizes the part of the agent computation in which
helm et al. [25], uses trusted and tamper-proof hardware privacy must be maintained. Although, in principle, such
modules at every host, such as smart cards or cryptographic circuits may model arbitrary computations, the associated
coprocessors. Each one of these hardware modules pos- costs are prohibitive for larger applications. But for small
sesses a public key and mobile code can be executed se- parts of an agent application, like the comparison function
curely using this infrastructure in the following way: After of the shopping agent, the overhead seems reasonable.
generating the mobile agent code, the originator encrypts We proceed by reviewing the encrypted circuit construc-
it under the public key of HI’Smodule. Upon receiving tion for interactive secure protocols.
some encrypted mobile agent, a host Hj passes it along to
its hardware module, together with Hj’s input y j . The mod- 3.1 Encrypted Circuit Construction
ule decrypts the code, executes it on the inputs provided and
encrypts the output again under the public key of the mod- The encrypted circuit construction of Yao [26] is an in-
ule in H j + l . Then it returns this encryption to the host, to- teractive protocol for secure function evaluation between
gether with z J , the output intended for Hj. The host sends two parties. We describe it for a binary function g ( . , .) and
the encrypted code and the encrypted data to the next host parties Alice (with input z) and Bob (with input y). Bob
in the sequence. receives the output z = g(x,y ) but learns nothing else and
To guarantee privacy in the formal model discussed Alice learns nothing at all. We give an abstract version of
above, each hardware module must be trusted to execute the Yao’s construction describing only the properties necessary
code properly and only once. Furthermore, all trusted mod- here (more details can be found in the literature [ 12, 211).
ules must be produced and initialized by a trusted, external Let ( 2 1 , . . . , z I L 2(YI,...,Y~~),
), and ( a , . . . , z n zde-
)
entity. note the binary representations of z, y, and z , respectively,
In the next section we introduce an alternative extension and let C denote a polynomial-sized binary circuit comput-
that is based on a minimally trusted party, the secure com- ing g. The essential components of Yao’s construction are
putation service. ( 1 ) an algorithm construct that Alice uses to construct an
encrypted circuit, (2) a transfer protocol between Alice and
3 Generic Secure Computation Service Bob, and (3) an algorithm evaluate allowing Bob to re-
trieve g(z, y). More precisely, these procedures are as fol-
Suppose there exists a third party T that is on-line and lows.
connected to all hosts running agent applications and is at ( I ) The probabilistic algorithm construct(C) takes the
their disposal for securing agent computations. Is it possible circuit as input and outputs the tuple
to realize such a secure mobile computing scheme in which
T itself does not gain any information about the computa-
tion, no matter how it behaves’? All computations should
proceed with minimal or no interaction. We give a positive where C may be viewed as an encrypted version of the
answer below and describe a scheme with these properties n, + nu-input circuit C ( . ,.) and where C , IC, and U

5
Figure 1. The communication flows of a traditional mobile agent (left) and using the generic secure
computation service (right).

to Bob.

(3) The algorithm evaluate(C, L i , . . . , LLz,K i , . , . , Kky)


takes as inputs the encrypted circuit, a representation
of z, and a representation of y by the respective keys.
It outputs the keys V i , . . . , U;: from which Bob can
corresponding to 2,g, and z , respectively. recover z , and if Alice and Bob obey the protocol,
In order to compute C(z,y) from the encryption C, then z = g(z, y).
Bob needs one “key” for each input bit: Li,b corre-
The security of this construction can be proved in the
sponds to input bit zi = b and Ki,b corresponds to
appropriate formal models. Implementing the construct
input bit yi = b. The keys Ui,o and Ui,1 represent the
and evaluate algorithms requires pseudo-random func-
output bits of the encrypted circuit, i.e., if evaluation
tions [15], which are realized in practice by block ciphers.
of the encrypted circuit produces Ui,b, then the output
Block ciphers are very fast cryptographic primitives, even if
bit z; is set to b.
implemented in software.
The particular method in which C is encrypted ensures
that for every gate in the circuit, given two keys repre-
3.2 Basic Scheme
senting its input bits, the key representing the resulting
output bit can be readily computed, but no information
is revealed about which cleartext bit it represents. We first show how to use the encrypted circuit construc-
tion for realizing secure mobile code computation with a
(2) Alice and Bob engage in a protocol for oblivious trans- single host. The extension to multiple hosts is considered in
fer [IO] or “all-or-nothing-disclosure-of-secrets” [6]. Section 3.3.
This is an interactive two-party protocol for a sender Assume T has published the public key of an encryption
with input two messages mo and m l and a chooser scheme. We denote the corresponding encryption and de-
with input a bit IT. At the end, the chooser receives cryption operations by E T ( . )and &(.), respectively. As-
m u but does not learn anything about m u e l , and the sume further that all parties can communicate over secure
sender has no information about IT. authenticated links, which could be realized by using stan-
More precisely, Alice acts as the sender of Ki,o and dard public-key encryption and digital signatures.
Ki,l, and Bob obtains for every bit yi of his input the The basic idea is that 0 constructs an encrypted circuit
value K: = Ki,y,but learns nothing about K i , y ; e l .At C computing the two values and z . It sends C to H, but
the same time, Alice learns nothing about yi. encrypts all keys in K for T and does not include the key
In addition, Alice computes the keys representing 2 as pairs in U which correspond to E (denoted by U,)so that
Li = Li,zi f o r i = 1 , .. . , n, and sends H will not learn anything about E . Next H selects from K:
the encrypted keys representing y and invokes T to decrypt
c,L:, . . . , LL=,U them in a single round of interaction. Then H evaluates the

6
circuit and obtains z ; it also returns the keys in the circuit party T . By itself, T does not obtain any useful informa-
output representing E to 0, who can determine I from this. tion about the circuit and sees only random keys. But if T
We now give the details. Let C be the binary circuit would collude with 0, they could learn the input of H to-
computing ( I ,z ) = (g(x,y ) , h ( z ,y ) ) from the same inputs gether, whereas if T and H colluded, they could evaluate
with n, +n, input bits 2 1 , . . . , x,,=, y1, . . . , yn, and n,+nz the circuit for several different input values of H and thus
output bits (1 , . . . , In, , z1 , . . . , z n z , slightly modifying the gain information about 0 ’ s input.
notation from the previous section. The scheme proceeds in In order to prevent deviations from the protocol and
five steps. make the scheme robust, one must take additional steps
and require that every party proves, using zero-knowledge
:1. 0 chooses a string id that uniquely identifies the com- proofs, that it correctly carried out all operations according
putation, e.g., containing the name of 0 , a descrip- to the protocol. T must use a public-key cryptosystem that
tion of g and h, and a sequence counter. 0 invokes is secure against adaptive chosen-ciphertext attacks (which
construct(C) and obtains (C,C, IC, U)as above with is equivalent to it being non-malleable [9]). 0 and H must
+
U consisting of n, n, key pairs in total. We let U, also commit to their inputs; moreover, every party should
denote the pairs in U with indices 1,.. . , 7 1 , and U, verify the correctness proofs and abort if this fails. In a
+
denote those with indices n, 1,. . . ,n, n,. + practical system, all of these can be realized in the so-called
F o r i = 1 , .. . , ny and b E ( 0 , l},it computes “random oracle model” [ 1 1 , 51 using a secure hash func-
tion. In this case, the public-key encryption scheme and
I?i,b = ET(idllil/I<i,b). the pseudo-random functions for circuit encryption should
be implemented with discrete logarithms based on the hard-
Let E denote the list of pairs of all such I?. Then 0 ness of the Diffie-Hellman problem [20]. Details are omit-
lets L: = Li,,, as above for i = 1,. . . , n, and sends ted here.
A variation of the protocol that is easier to make robust
id,C, L i , . . . , Lkz , E , U, is presented in Section 3.4.

to H . 3.3 Extension for Mobile Agents


2. H sets I?: = K i , y , for i = 1,.. . , ny to be the en-
cryptions representing its input y and sends them to T We can extend the method above to a general mobile
along with id. computing scheme with hosts H I , . . . , He in the model of
Section 2.1. The generalization is the natural one in which
3. T decrypts I?,’for i = 1, . . . , n, and verifies that the each host executes steps 2 4 of the basic scheme above and
ith decrypted string contains the identifier id and index sends the agent to the next host afterwards.
i. If all checks are successful, T returns the decrypted The originator must prepare one encrypted circuit for
keys K i , . . . , KAYto H . each host and there must be a way for incorporating the en-
crypted state zj-1 from C ( j - l ) into C ( j j for j > 1. This can
4. H invokes evaluate(C,L’, , . . . , LLz , Ki , . . . , KAY)
be done by using the output keys U;(’-’), . . . , U;“’-’’
and obtains U;, . . . , UA,+n,. Then H determines
z = ( ~ 1 , .. . , z n z ) such that Un,+i,:; = for from for decrypting a hidden representation of the
i = 1,.. . , n, and forwards the remaining values inputs to C ( j ) .
vi,.. . , U;= to 0. Suppose there is a symmetric cryptosystem with encryp-
tion and decryption operations under key K denoted by
5 . 0 determines its output E = (& , . . . ,In,) such that E,(.) and O K ( . )respectively.
, The cryptosystem must in-
Ui,<;= U,l f o r i = 1 , .. . , n,. clude sufficient redundancy such that given a potential key
U and a ciphertext c, it can be determined with high proba-
This is the basic form of the scheme, and it works under bility whether c results from an encryption under U.
the assumption that all parties follow the protocol but try to The modifications to the scheme are now as follows.
infer more information later (this is also called honest-but-
curious behavior). 1. The originator obtains C ( j ) ,C ( j ) ,I C ( J j , U()),
and E ( j j
The scheme is as secure as the original encrypted cir- for j = 1, . . . , e in the same way as for C above. How-
cuit construction, assuming that the public-key encryption ever, it selects the values L: = L~,,,“) only for C(’).
scheme used by T is semantically secure and that T does The identifier in the j t h stage is set to idllj. The origi-
not collude with either H or 0. More precisely, for the orig- nator also prepares two encryptions
inator 0 and for H , it corresponds directly to Yao’s method
with oblivious transfer realized by encryption and a third

7
for each j > 1 and i = 1,.. . , nz, and randomly per- m, specified by the chooser, who itself learns nothing. This
mutes them before assigning them to V$' and @;); so-called "proxy" oblivious transfer can be realized using
call the list of such pairs V ( j ) . three message flows: from chooser to receiver and from re-
ceiver to sender and back.
Then 0 sends
The protocol needs also a one-round implementation of
standard oblivious transfer between two parties, which can
be realized using the methods of Cachin et al. [7] or Sander
and et al. [23].
c(j), E ( j )
3 - 1
~ ( j )f o r =
j 2 , . . . ,e Note that the resulting overall structure of this protocol
is similar to the auction scheme of Naor et al. [ 191.
to H1 in a single message. Note that nothing in the
data for stage j is linked to the identity of Hj and so
the sequence in which the hosts are visited can be de- Protocol. As in the basic scheme the essential component
termined dynamically. here is the encrypted circuit construction. The protocol is
described for the basic case of mobile code with a single
2. For j > 1, when Hj runs step 2 of the basic scheme, host H.
it has received V ( j )and U;('-'), . . . , U;=('-') from Suppose 0 employs a public-key encryption scheme
Hj-1, who has before evaluated C(j-l). with encryption and decryption operations denoted by
Eo(.) and D O ( . ) ,respectively. 0 starts the computation
The host interprets each U;('-') as a symmetric key
as the chooser in nz parallel three-party oblivious transfers,
to E , determines which one of the ciphertexts one for each bit of z. It sends these hidden choices to H ,
and V l i ) it decrypts, and then decrypts the one that who acts as the receiver in the three-party oblivious trans-
matches. This yields L i j ) , an oblivious representation fers, together with C and Eo(.). H forwards the appropri-
of the ith bit in the current state z j of the mobile agent. ate data to T , who acts as the sender; it will send the key
Those keys are then needed to evaluate C ( j ) . pairs C in the three-party oblivious transfer. Furthermore,
H also prepares its input to ny parallel one-round oblivious
3. When H j has obtained its output from evaluating C(j), transfers (playing the role of the chooser), one for each hit
it forwards all data that it has received from HjPl,to- of y. It sends these to T , together with the descriptions of
gether with U ; " ) , . . . , U;=('),to Hj+l. At the end of C and Eo(.);T will send the key pairs K in the one-round
the circle, He returns only the to 0. oblivious transfers.
T invokes construct(C) to obtain C and the key pairs C,
In order to make this scheme robust, the same measures IC, and U . It replies to H with Eo(U,), C, U,, and the final
as described above should be taken. In particular, T must flows i n all oblivious transfer protocols. .
ensure that it decrypts ciphertexts containing a particular From this H can determine the keys L;, . . . , L6= rep-
identifier idllj in at most one execution of step 3. resenting z and the keys K ; , . . . , KAY representing y.
It runs evaluate(C, L', , . . . , LLz,K f ,. . . , KLy) to obtain
3.4 Variation U:, ..., as above. Then it determines its output
z from . . , U,!,+n, and from U,, and it forwards
In this section we present a different scheme in the same U:, . . . , U;=together with Eo(&) to 0. This enables 0 to
model for which robustness can be added at much lower obtain its output E.
cost.
The main difference is that the trusted party generates
the encrypted circuit. Because it is trusted to follow the Extension for Mobile Agents. We show how to extend
protocol one does not have to add a costly zero-knowledge the protocol from a single host to f? hosts HI , . . . , He. The
proof for correctness of the whole circuit. Therefore, the protocol starts as before for the first host. However, the
operations of the other parties and the corresponding proofs steps for Hz, . . . , He-1 are slightly different: three-party
ensuring robustness become much simpler. T has to know oblivious transfer and encryption under Eo are not needed.
g and h for constructing the circuit, but it may obtain a de- Instead, T encrypts the keys C(3) in the input of C ( J )and
scription of C from 0 in the first protocol message. representing the state z3-1of the mobile agent under the
We use a three-party oblivious transfer protocol intro- output keys in U ( J - ' ) from C ( J - ' ) as before in V(3).The
duced by Naor et al. [ 191 in which the role of the chooser is keys U ( 3 - l ) can be stored by T between step J - 1 and step
separated among the chooser and a third party, called the re- j or they can be sent along with the protocol flow and are
ceiver. Compared to the standard notion of oblivious trans- traiismitted to T via H3-l and H3 (in this case, they must
fer (see Section 3. l), the receiver gets the output message be encrypted using E T ( . ) ) .In addition, the last host obtains

8
I.r, encrypted with E o ( . ) from T and forwards this to 0 as 4.2 Generalized Auctions
before.
Auctions with generalized bidding strategies present an
interesting application area for secure mobile agents. Bid-
Discussion. The communication pattern is the same as in ding agents can implement a complex strategy being a func-
the basic scheme: there is one message from 0 to H I , one tion of time and other participants’ behavior, which gives
from each HJ-lto HJand one from H Eto 0,plus one com- the bidder more flexibility compared to traditional single-
munication flow between each host and the trusted party. parameter auctions based purely on price. Sandholm and
Robustness can be added as before by using non-malleable Huai [24] present a mobile agent system to conduct such
public-key encryption schemes and non-interactive zero- auctions.
knowledge proofs. However, the result will be much more Recently the German UMTS licenses were sold employ-
practical because zero-knowledge proofs are not needed for ing a sealed-bid, multiple-round, multiple-lot auction. It
the potentially large encrypted circuit in our trust model- provides an interesting example of a real-world generalized
only for the relatively few steps pertaining to the oblivious auction. Telecom operators could buy either two or three
transfers. Moreover, the encrypted circuit construction can packets of frequencies out of twelve available frequency
be implemented by a block cipher instead of public-key op-
packets. In each round the bidders had to submit their bids,
erations. which had to be increased by a minimum amount over the
previous bids. The winners for each frequency were an-
4 Applications nounced at the end of the round. The bidding stopped af-
ter a round with no more new bids. During each round
the bidders were isolated and under close supervision by
We discuss two applications of mobile agents that greatly the authorities to prevent coalitions. They had to enter the
benefit from privacy support for in mobile code: compari- bids into a computer system, which played the role of the
son shopping and a complex auction scheme. auctioneer and computed the winner. The German UMTS
auction in August 2000 lasted for 173 rounds during almost
4.1 Comparison Shopping three weeks and raised about 99 billion DEM.
As the value of the lots is interrelated, a bidder is in-
A mobile agent visits several vendor sites and compares terested to define his bidding behavior as dynamically as
offers-not just based on price, but also on other attributes. possible, for example making the valuation of a lot de-
The originator wants to maintain the privacy of his pref- pend on other winning bids that he observed in the previous
erences, but a vendor has an interest to learn the buyer’s rounds. If the bidders can express their strategies as a com-
strategy as well as information about other vendor’s offers. putable function, then one may construct a circuit to com-
For complex offers where the price is determined individ- pute the auction function, i.e., the outcome of the auction,
ually for each customer based on its needs, such as in the with the strategies as the private inputs of all participants.
insurance market, the vendor wants to keep its method of This would require an auction agent that visits each bidder
calculating the price secret. All these requirements can be only once.
fulfilled by the secure mobile computing scheme. However, in the likely case that the bidders are unable
An electronic negotiation between a buyer and a single to express their strategies mathematically, each round of the
auction could also be performed securely by an auction ap-
vendor can take place using the scheme for secure mobile
plet that visits each bidder once and returns to the auction-
code that visits a single host. Typically, the vendor acts
eer. There it outputs the winning bids or the end of the auc-
as the originator and downloads an applet to the buyer’s
tion if the bids did not exceed the minimum increment. If
browser (as is already quite common on the Internet). The
applet is executed with the help of the trusted computation the scheme for secure mobile computing is used, then there
service by the buyer and the offer is displayed to the buyer. is no single entity that sees all bids (like the auctioneer, its
The vendor may obtain some information as well, but it computer system, or its operators).
would have to spell out clearly in a “privacy statement” ac- Generalized auctions are common in electricity markets,
equities trading, bandwidth auctions, and transportation ex-
companying the applet which information it obtains, such
changes, and bidders often have preferences over combina-
that it can be verified by an independent entity.
tion of items.
A shopping agents that goes out and collects offers from
several vendors can be realized as well, but this requires
prior agreement on the data format of the offers. It seems
therefore restricted to highly structured areas where privacy
is important.

9
4.3 Implementation Note card. The server provides computing power to the client,
but should not learn anything about the secrets of the client.
Although encrypted circuits can be constructed for an
arbitrary function and any mobile code application in the- References
ory, a practical implementation will only represent privacy-
critical parts in this way and execute the remaining parts in
111 Martin Abadi and Joan Feigenbaum. Secure circuit
the form of conventional programs. Thus, the circuits are
evaluation: A protocol based on hiding information
rather small and processing them is realistic with current
from an oracle. Journal of Cryptologj, 2:l-12, 1990.
technology. It seems feasible to include them as an add-on
to an existing mobile code platform, such as Aglets ( h t t p : [2] Martin Abadi, Joan Feigenbaum, and Joe Kilian. On
/ /aglets. org). hiding information from an oracle. In Proc. 19th
The comparison shopping agent, for example, could Annual ACM Sjwposium on Theory of Coniputing
compute most bookkeeping functions in unencrypted form (STOC),pages 195-203, 1987.
and hide only its preferences and the best offer so far. The
same holds for the auction applications. If the encrypted cir- [3] Donald Bcaver. Secure multiparty protocols and zero-
cuit construction is realized using AES with 128-bit keys, knowledge proof systems tolerating a faulty minority.
an encryption of a binary gate may be stored in 96 bytes, Journal of Cryprolog),4(2):75-122, 199 1 .
including 64 bits for redundancy. An encrypted circuit that
outputs the maximum of two n-bit numbers using special- [4] Philippe BCguin and Jean-Jacques Quisquater. Fast
ized comparison gates can be represented by far less than n, server-aided RSA signatures secure against active at-
kilobytes and requires about lOOn block cipher operations. tacks. In Don Coppersmith, editor, Advances in Cq'p-
tology: CRYPT0 '95, volume 963 of Lecture Notes in
Computer Science. Springer, 1995.
5 Discussion
[SI Mihir Bellare and Phillip Rogaway. Random oracles
Our scheme for secure mobile agent computing provides are practical: A paradigm for designing efficient pro-
an attractive alternative to using trusted hardware. Let us tocols. In Proc. 1st ACM Conference otz Computer
compare the trust assumptioni in these two approaches. The and Comniuniccitions Security, 1993.
proposed scheme relies on the assumption that T does not
actively collude with any of the participants against another [6] Gilles Brassard, Claude CrCpeau, and Jean-Marc
one. When using trusted hardware, which is also generic, Robert. Information-theoretic reductions among dis-
all parties have to trust the hardware manufacturer in the closure problems. In Proc. 27th IEEE Symposiutn on
same way. Foutidutions of Computer Science (FOCS), 1986.
There is however a small difference because the trusted
[7] Christian Cachin, Jan Camenisch, Joe Kilian, and Joy
hardware can observe all computations and may possibly
Muller. One-round secure computation and secure au-
leak some information about this (covert channels could
tonomous mobile agents. In Ugo Montanari, JosC P.
easily be realized and might go to a large government or-
Rolim, and Emo Welzl, editors, Proc. 27th Interna-
ganization). The on-line secure computation service in our
tional Colloquiuni on Auromutu, Lungiiages arid Pro-
approach does not learn anything about the computation,
gramming (ICALP), volume 1853 of Lecture Notes
except that it takes place and has a certain size; there is no
in Computer Science, pages 5 12-523. Springer, July
information that can be leaked.
2000.
Otherwise, the differences between the server-based ap-
proach and trusted hardware are clearly the speed advantage [8] Ran Canetti. Security and composition of multi-
of secure hardware compared to the encrypted circuit con- party cryptographic protocols. Journal of Cryptology,
struction on the one hand, and the high cost and low flexibil- 13(1):143-202,2000.
ity of trusted hardware on the other hand. Secure hardware
is also more flexible for local agent computations involving [9] Danny Dolev, Cynthia Dwork, and Moni Naor. Non-
user interaction. malleable cryptography. SIAM Journal on Conzpuring,
Note that server-aided computations are quite common 30(2):391-437,2000.
for other cryptographic applications and have been studied
extensively [2,4, 171; these are protocols in which a power- [lo] Shimon Even, Oded Goldreich, and A. Lempel. A
ful server performs some computation on behalf of a client randomized protocol for signing contracts. Comnzuni-
device with limited processing capabilities such as a smart cations of the ACM, 28:637-647, 1985.

10
[ 111 Amos Fiat and Adi Shamir. How to prove your- [23] Tomas Sander, Adam Young, and Moti Yung. Non-
self: Practical solutions to identification and signature interactive CryptoComputing for N C ' . In Proc. 40th
problems. In Andrew M. Odlyzko, editor, Advances IEEE Symposium on Foundutions of Computer Sci-
in Cryptology: CRYPTO '86, volume 263 of Lecture ence (FOCS), 1999.
Notes in Computer Science, pages 186-194. Springer,
1987. [24] Tuomas Sandholm and Qianbo Huai. Nomad: Mo-
bile agent system for an internet-based auction house.
[ 121 Matthew K. Franklin. Complexity and Security of Dis- IEEE Internet Computing, 4( 2) :80-8 6,2000.
tributed Protocols. PhD thesis, Columbia University,
[25] Uwe G. Wilhelm, Sebastian Staamann, and Levente
1993.
ButtyBn. Introduciiig trusted third parties to the mobile
[ 131 Alfonso Fuggetta, Gian Pietro Picco, and Giovanni Vi- agent paradigm. In Jan Vitek and Christian D. Jensen,
gna. Understanding code mobility. IEEE Transactions editors, Secure Internet Programming, volume 1603
on Software Engineering, 24(5):342-361, May 1998. of Lecture Notes in Computer Science, pages 469-
489. Springer, 1999.
I [ 141 Oded Goldreich. Secure multi-party computation.
Manuscript, 1998. (Version 1.1). [26] Andrew C. Yao. How to generate and exchange se-
crets. In Proc. 27th IEEE Symposium on Foundations
[ 151 Oded Goldreich, Shafi Goldwasser, and Silvio Micali. of Conipiiter Science (FOCS),pages 162-167, 1986.
How to construct random functions. Journal of the
ACM, 33(4):792-807, October 1986. [27] Bennet Yee. A sanctuary for mobile agents. In Jan
Vitek and Christian D. Jensen, editors, Secure Internet
[16] Oded Goldreich, Silvio Micali, and Avi Wigderson. Programming, volume 1603 of Lecture Notes in Com-
How to play any mental game or a completeness the- puter Science, pages 26 1-273. Springer, 1999.
orem for protocols with honest majority. In Proc.
19th Annual ACM Symposium on Theory of Comput-
ing (STOC),pages 2 18-229, 1987.

[ 171 Chae Hoon Lim and Pi1 Joong Lee. Security and per-
formance of server-aided RSA computation protocols.
In Don Coppersmith, editor, Advances in Cryptology:
CRYPTO '95, volume 963 of Lecture Notes in Cotn-
puter Science. Springer, 1995.
[ 181 Silvio Micali and Phillip Rogaway. Secure computa-
tion. In Joan Feigenbaum, editor, Advances in Cryp-
tology: CRYPTO '91, volume 576 of Lecture Notes in
Computer Science, pages 392-404. Springer, 1992.

[I91 Moni Naor, Benny Pinkas, and Reuben Sumner. Pri-


vacy preserving auctions and mechanism design. In
Proc. 1st ACM Conference on Electronic Commerce,
1999.

[20] Moni Naor and Omer Reingold. Number-theoretic


constructions of efficient pseudo-random functions. In
Proc. 38th IEEE Symposium on Foundations of Com-
puter Science (FOCS), 1997.

[21] Phillip Rogaway. The Round Complexio of Secure


Protocols. PhD thesis, Laboratory for Computer Sci-
ence, MIT, April 199 1.

[22] Tomas Sander and Christian E Tschudin. Protecting


mobile agents against malicious hosts. In G. Vigna,
editor, Mobile Agents and Security, volume 1419 of
Lecture Notes in Computer Science, 1998.

11

You might also like