Sunteți pe pagina 1din 6

An Abuse Free Fair Contract Signing Protocol

Based on the RSA Signature

more important and popular in the world, it


ABSTRACT is desirable to need a mechanism that allows
two parties to sign a digital contract via the
A fair contract signing protocol Internet. However, the problem of contract
allows two potentially mistrusted parities to signing becomes difficult in this setting,
exchange their commitments (i.e., digital since there is no simultaneity any more in
signatures) to an agreed contract over the the scenario of computer networks. In other
Internet in a fair way, so that either each of words, the simultaneity has to be mimicked
them obtains the other’s signature, or neither in order to design a digital contract signing
party does. Based on the RSA signature protocol. This requirement is essentially
scheme, a new digital contract signing captured by the concept of fairness.
protocol is proposed in this paper. Like the
existing RSA-based solutions for the same PROPOSED SYSTEM
problem, our protocol is not only fair, but
also optimistic, since the third trusted party In this Project we mainly focus on
is involved only in the situations where one the problem of digital contract signing.
party is cheating or the communication Since a
channel is interrupted. Furthermore, the party’s commitment to a digital contract is
proposed protocol satisfies a new property, usually defined as his/her digital signature
i.e., it is abuse-free. That is, if the protocol is on the contract, digital contract signing is
executed unsuccessfully, none of the two essentially implied by fair exchange of
parties can show the validity of intermediate digital signatures
results to others. Technical details are between two potentially mistrusted parities.
provided to analyze the security and There is a rich history of contract signing
performance of the proposed protocol. In (i.e., fair exchange of digital signatures)
summary, we present the first abuse-free fair because this is a fundamental problem in
contract signing protocol based on the RSA electronic transactions. According to the
signature, and show that it is both secure and involvement degree of a trusted third party
efficient. (TTP), contract signin protocols can be
divided into three types: (1) gradual
EXISTING SYSTEM exchanges without any TTP; (2) protocols
with an on-line TTP; and (3) protocols with
Contract signing is truly simple due an off-line TTP. Early efforts mainly
to the existence of “simultaneity”. That is, focused on the first type protocols to meet
both parties generally sign two hard copies computational fairness: Both parties
of the same contract at the same place and at exchange their commitments/secrets “bit-by-
the same time. After that, each party keeps bit”. If one party stops prematurely, both
one copy as a legal document that shows parties have about the same fraction of the
both of them have committed to the contract. peer’s secret, which means that they can
If one party does not abide by the contract, complete the contract off-line by investing
the other party could provide the signed about the same amount of computing work.
contract to a judge in court. As the The major advantage of this approach is that
electronic commerce is becoming more and no TTP is involved. However, this approach
is unrealistic for most real-world THE PROPOSED PROTOCOL
applications due to the following several
reasons. First of all, it is assumed that the We describe our new contract
two parties have equivalent computation signing protocol based on the RSA
resources. Otherwise, such a protocol is signature. The basic idea is that Alice first
favorable to the party with stronger splits her private key d into d1 and d2 so that
computing power, who may conditionally d = d1 + d2 mod φ (n). Then, only d2 is
force the other party to commit the contract delivered to the TTP, while Alice keeps (d,
by its own interest. At the same time, such d1, d2) as secrets. To exchange her signature
protocols are inefficient because the costs of σ A = h(m)d mod n with Bob, Alice first
computation and communication are sends partial signature σ 1 = h(m)d1 mod n to
extensive. In fair exchange protocols an on- Bob, and proves that _1 is prepared correctly
line TTP is always involved in every in an interactive zero-knowledge way by
exchange. In this scenario, a TTP is exploiting Gennaro et al.’s protocol . After
essentially a mediator: (a) Each party first that, Bob sends his signature σ B on message
sends his/her item to the TTP; (b) Then, the m to Alice, since he is convinced that even if
TTP checks the validity of those items; (c) If Alice refuses to reveal the second partial
all expected items are correctly received, the signature σ 2 = h(m)d2 mod n, the TTP can
TTP finally forwards each item to the party do the same thing. As usual, we assume that
who needs it. Generally speaking, contract the communication channel between Alice
signing protocols with an on-line TTP could and Bob is unreliable, i.e., messages inserted
be designed more easily since the TTP into such a channel may be lost due to the
facilitates each step of exchanging, but may failure of computer network or attacks from
be still expensive and inefficient because the adversaries. However, the TTP is linked
TTP needs to be paid and must be part of with Alice and Bob by reliable
every execution. In practice, the TTP is communication channels, i.e., messages
prone to become a bottleneck in the whole inserted into such a channel will be
system, especially in the situation where delivered to the recipient after a finite delay.
many users rely on a single TTP.
Registration Protocol
ARCHITECTUTE
To use our protocol for
exchanging digital signatures, only the
initiator Alice needs to register with the
TTP. That is, Alice is required to get a
voucher VA from the TTP besides obtaining
a certificate CA from a certification
authority (CA). To this end, the following
procedures are executed.
(1) Alice first sets an RSA
modulus n = pq, where p and q are two k-bit
safe primes, i.e., there exist two primes p0
and q0 such that p = 2p0 +1 and q = 2q0 +1.
Then, Alice selects her random public key e
∈R Z*φ (n), and calculates her private key d =
e−1 mod φ (n), where φ (n) = (p − 1)(q −
1). Finally, Alice registers her public key d2) as a valid triple and creates the voucher
with a CA to get her certificate CA, which VA for Alice.
binds her identity and the corresponding Though the above registration
pubic key (n, e) together. protocol is a little complicated, we remark
(2) Alice randomly splits d into that this stage needs to be executed only
d1 and d2 such that d = d1 +d2 mod φ (n) once for a sufficiently long period, for
by choosing d1 ∈R Z*φ (n), and computes e1 example, one year. In this period, Alice can
= d−1 1 mod φ (n). At the same time, she fairly sign any number of contracts with all
generates a sample message-signature pair potential parties. Furthermore, it seems
(w, σ w), where w∈ Z* n \ {1,−1}, ord(w)≥ reasonable in the real world to require users
p0q0, and σ w = wd1 mod n. Then, Alice to first register with the TTP before they are
served. The reason is that the TTP is usually
sends (CA,w, σ w, d2) to the TTP but keeps
unlikely to provide free service for settling
(d, d1, d2, e1) secret.
disputes between users. Moreover, for
(3) The TTP first checks Alice’s
enhancing efficiency, the sample message w
certificate CA is valid. After that, the TTP
can be fixed as a constant, e.g., w = 2, as
checks that the triple (w, σ w, d2) is pointed out by Gennaro et al.. Compared
prepared correctly. If everything is in order, with schemes based on verifiably encrypted
the TTP stores d2 securely, and creates a signatures, one disadvantage of our
voucher VA by computing VA = SignTTP registration protocol is that the TTP needs to
(CA,w,σ w). That is, VA is the TTP’s keep a distinct secret d2 for each registered
signature on message (CA,w,σ w), which user. However, this shortcoming can be
guarantees that the TTP can issue a valid eliminated by some simple techniques. For
partial signature on behalf of Alice by using example, the TTP can encrypt each
the secret d2. concatenation of d2 and the corresponding
We give some notes on the above user’s unique identifier by exploiting a
registration protocol. To get her certificate secure symmetric-key encryption algorithm,
from a CA, Alice has to prove that modulus and then stores the results into its database.
n is the product of two safe primes. This To extract a user’s d2 later, the TTP only
technical issue is addressed in. Of course, needs to decrypt the corresponding record
step (1) can be omitted if Alice has obtained using the unique symmetric key.
such a certificate before she registers with
the TTP. To validate the correctness of the Signature Exchange Protocol
triple (w, σ w, d2), the TTP needs to do the
followings. Firstly, the TTP validates that w We assume that a contract m has
is an element of order at least of p0q0 by been agreed between Alice and Bob before
checking that w ∈ Z* n \ {1,−1}, and that they begin to sign it. In addition, it is
both gcd(w−1, n) and gcd(w+1, n) are not supposed that the contract explicitly
prime factors of n . Then, Alice is required contains the following information: a
to show that she knows the discrete predetermined but reasonable deadline t, the
logarithm of σ w to the base w via a zero- identities of Alice, Bob, and the TTP. Our
knowledge protocol interactively or non- signature exchange protocol is briefly
interactively. Finally, the TTP checks illuminated in Figure 1, and further
whether w≡ ,σ w ,d2)e mod n. If all those described in detail as follows.
validations pass, the TTP accepts (w, σ w,
(1) Firstly, the initiator Alice computes ¯σ A = σ 1σ 2 mod n, and accepts σ 2 as
her partial signature σ 1 = h(m)d1 mod n, and valid if and only if h(m)2 = ¯σ 2A mod n. In
then sends the triple (CA, VA, σ 1) to the this case, Bob can recover Alice’s standard
responder Bob. Here, h(·) is a RSA signature σ A on message m from ¯σ A
cryptographically secure hash function. (more details are provided later). If Bob
(2) Upon receiving (CA, VA, σ 1), Bob does not receive the value of σ 2 or only
first verifies that CA is Alice’s certificate receives an invalid σ 2 from Alice timely, he
issued by a CA, and that VA is Alice’s applies help from the TTP via the dispute
voucher created by the TTP. Then, Bob resolution protocol before the deadline t
checks if the identities of Alice, Bob, and expires.
the TTP are correctly specified in the
contract m. If all those validations hold, Bob
initiates the following interactive protocol
with Alice to check whether σ 1 is Alice’s
valid partial signature on contact m.
(2a) Bob picks two numbers i, j ∈R [1,
n] at random, and sends a challenge c to
Alice by computing c = σ 12i σ w j mod n.
(2b) After getting the challenge c, Alice
calculates the respondence r = ce1 mod n,
and then returns her commitment ¯r =
commit(r) to Bob, where commit(·) is a
secure commitment scheme.
(2c) When the commitment ¯r is
received, Bob sends the pair (i, j) to Alice.
(2d) Alice checks whether the challenge
The following is further
c is prepared properly, i.e., c ≡ σ 12i σ wj explanation of our signature exchange
mod n. If the answer is positive, Alice protocol. Firstly, the interactive protocol
reveals the respondence r to Bob. With the exploited in step (2) is exactly the
knowledge of r, Bob accepts _1 as valid if confirmation protocol for RSA undeniable
and only if r σ h(m)2iwj mod n and ¯r≡ signatures by Gennaro et al. With respect to
commit(r). the private key (d1, e1) and the public key
(3) Only if σ 1 is Alice’s valid partial (n,w, σ w). Note that similar approaches are
signature and the deadline t specified in used to construct e-payment protocol and
contract m is sufficient for applying dispute certified e-mail system. it is proved that a
resolution from the TTP, Bob sends his successful execution of this zero-knowledge
signature σ B on contract m to Alice, since protocol guarantees that σ 1 = βh(m)d1 mod
he is convinced that another partial signature n, where σ 2 {1,−1, α 1,α 2} and α i’s (i =
σ 2 can be released by the TTP, in case 1, 2) denote the two non-trivial elements of
Alice refuses to do so. order 2. In this case, Bob accepts _1 as valid
(4) Upon receiving σ B, Alice checks and sends his signature σ B on contract m to
whether it is Bob’s valid signature on Alice in step (3), since he is convinced that
message m. If this is correct, she sends Bob another partial signature σ 2 can be revealed
the partial signature σ 2 by computing σ 2 = by either Alice or the TTP. After that, if
h(m)d2 mod n. When Bob gets σ 2, he sets Alice does not reveal the value of σ 2 or
only sends invalid _2 to Bob before the h(m)d1 mod n and σ 2= h(m)d2 mod n, Bob
deadline t, Bob resorts to the TTP to get the will not only always recover her signature
correct value of σ 2. If Alice honestly σ A on contract m, but also could derive her
reveals σ 2= h(m)d2 mod n to Bob in step private key d (and then forge signatures). So
(4), we have h(m)≡ ¯σ A2e mod n, i.e.,¯ we ignore case (c) in the discussions
σ A= σ 1σ 2mod n is valid. In such hereafter under an implicit assumption that
condition, Bob can recover the correct value any user does not want to compromise
of σ A from ¯σ A by using the following his/her own private key.
recovery algorithm:
Dispute Resolution Protocol
(a) set σ A = ¯σ A, if h(m) = ¯σ e
A mod n;
(b) set σ A = −¯σ A mod n, if h(m) = −¯σ eA If Bob has sent his signature _B to
mod n; Alice but does not receive the value of σ 2
(c) get σ A by factoring n, else, i.e., h(m) 6= or only receives an invalid σ 2 from Alice
±¯_σ eAmod n. before the deadline t, then he sends the TTP
(CA, VA,m, σ 1, σ B) to apply dispute
resolution. Upon receiving Bob’s
We describe how Bob can factor n application, the TTP performs as follows:
and then get the value of ¯σ A in case (c),
(1) The TTP first verifies whether
i.e., h(m)2 = ¯σ A2e mod n but h(m) 6=
CA, VA, and _B are Alice’s valid
±¯σ A2e mod n. Note that the equality h(m)2 certificate, voucher, and Bob’s signature on
= ¯σ A2e mod n implies that ¯σ A2e = _h(m)d contract m, respectively. After that, the TTP
mod n, where σ 2 {1,−1, _1, _2}.When β = checks whether the deadline t embedded in
±1, corresponding to cases (a) and (b), Bob m expires, and whether Alice, Bob and itself
can easily find the value of _A. So we are the correct parties specified in m. If any
conclude that case (c) means ¯σ A = validation fails, the TTP sends an error
α ih(m)d mod n, i = 1 or 2. Recall that message to Bob. Otherwise, continue.
ord(α i) = 2 and e is an odd number (due to (2) Then, the TTP computes σ 2 =
e ∈ Z* φ (n) and φ (n) = 4p0q0), so we have h(m)d2 mod n, and checks whether h(m)2 ≡
¯σ Ae = (α ih(m)d)e mod n = α i h(m) mod n. (σ 1σ 2)2e mod n. If this equality holds, the
Therefore, Bob can get the value of α i by TTP sends (m, σ 2) to Bob and forwards (m,
computing α i = ¯σ Ae h(m)−1 mod n. It is σ B) to Alice. Otherwise, i.e., h(m)2 ≠
well known that with the knowledge of such (σ 1σ 2)2emod n, the TTP sends an error
a non-trivial element of order 2, Alice’s message to Bob.
RSA modulus n can be easily factored, i.e.,
(α i − 1) and (α i + 1) are the two prime In the following, we explain why
factors of n. Consequently, Bob can get our dispute resolution protocol works. Since
Alice’s private key d by using extended the TTP sets σ 2= h(m)d2mod n, we conclude
Euclidean algorithm, and then obtain the that h(m) 2 ≡ (σ 1σ 2) 2e mod n if and only if
value σ A by computing σ A = h(m)d mod n. σ 1≡ βh(m)d1 mod n, where β∈{1,−1, σ 1,
Based on the above discussion, we conclude σ 2}. That is, the TTP can determine
that case (c) does not happen in the real whether Bob has sent a valid σ 1to apply
world unless Alice wants to reveal her dispute resolution by checking h(m)2
private key. That is, if Alice reveals σ 1= α i ≡ (σ 1σ 2) 2e mod n. If this equality holds, the
TTP reveals the correct value of σ 2to Bob
and forwards Bob’s signature σ B on
contract m to Alice. After getting the correct
σ 2, Bob can recover Alice’s signature σ A
on contract m by employing the recovery
algorithm given in previous section. In the
case of h(m)2 ≠ (σ 1σ 2) 2e mod n, the TTP
knows that Bob is a cheater, and so only
sends an error message to him. Note that if
the σ 1sent to the TTP is prepared as σ 1=
α ih(m)d1 mod n, the TTP can also get
Alice’s private key d as Bob does.

Hardware Requirements:

• System : Pentium
IV 2.4 GHz.
• Hard Disk : 40 GB.
• Floppy Drive : 1.44 Mb.
• Monitor : 15 VGA
Colour.
• Mouse : Logitech.
• Ram : 512 Mb.

Software Requirements:-

Language: Java / Dot Net

OS: Windows XP

S-ar putea să vă placă și