techniques (Turuani, 2006), and OFMC (On-the-Fly
Model-Checker) - a model checker that uses symbo-
lic techniqu e s (Basin et al., 2005). In AVISPA, the fair
exchange requirement between payment and digital
receipt for the FEIPS protocol, is ensured b y proving
the authentication goals PG authen ticates C on P I and
C authenticates PG on dig ital rec eipt, or by finding
attacks for both authentication goals. The fairness ve-
rification results obtained in AVISPA for the FEIPS
protocol showed that there is no attack (Djuric and
Gasevic, 2015).
However, the only case in S TP in that the fairness
for C is not insured is when C sends the payment in
message 3, the paym ent is successfully processed, but
he does not rece ive the digital receipt for payment in
message 6, or receives an invalid message from M.
This case may arise in the following scenarios: M
sends the payment to PG in the message 4, but M
does not receive message 5 from PG, or M receives
message 5 but does not send the message 6 to C, or
M receives the message 5 but sends an invalid mes-
sage to C. The scenarios above c an appear because M
behaves dishonest or a network co mmunication error
occurs. In this c a se, C waits for the message 6 from
M until the timeout interval t2 expires in which case
C initiates the resolution 2 sub-protocol with PG to
receive the digital receipt. Afte r PG receives the mes-
sage 9, he sends to C in message 10 the digital r eceipt
for payment because the payment has been success-
fully processed and PG finds the digital receipt in its
databases. We remark that if C initiates the resolu-
tion 2 sub-protocol a nd M sends the message 4 to PG
afterward, the fairness is preserved because PG will
send to both C and M an ABORT response as is men-
tioned in section 6. 2.4. Thus, the unfair case is sol-
ved: M receives the payment and C the digital receipt,
or M does not receives the payment and C receives
an AB ORT response. The resolution 1 sub-protocol
from section 6.2.3 is necessary only when we take
into consideration the complex transactions (in which
is mandatory to have a defined state for each perfor-
med subtransaction), to solve the case in tha t in a sub-
transaction C initiates STP, but he does not receive
any message from M or rece ives an invalid message 2
from M. This case can appear because M behaves dis-
honest or because of a network communication er ror.
In this case, C waits for message 2 from M until the ti-
meout interval t1 expires in which case C initiates the
resolution 1 sub-pr otocol with PG, and PG sends to
C an ABORT response for the current subtransaction.
We also note that in the FEIPS protocol was not ne-
cessary to consid er a resolution 1 sub-protocol as in
section 6.2.3, because th e FEIPS protocol take into
consideration only one customer and one merchant.
As a result of the discussion ab ove, from the fact that
the FEIPS protocol ensures fairness, we obtain that
STP ensures fairness.
The fairness obtained in all subtransations from
a complex transaction does not directly implies that
fairness is ensured in entire complex transaction. So,
in addition to fairness in STP, to obtain fairness in
CTP, two requirements must be also ensured. First,
for a ny optional transaction from th e complex tran-
saction, C obtains exactly one digital receipt for the
paymen t of o nly one product, and corresponding mer-
chant obtains the payment for the pr oduct, or none of
them obtains nothing. The product is either an in-
dividual product, or an aggregate product that corre-
sponds to a ∧ operator. Also, the digital receipt is
either an in dividual rece ipt corresponding to an in-
dividual product, or is a seq uence of receipts corre-
sponding to an aggregate pr oduct. As we have seen
in Table 2, CTP ensures this re quirement: the n ode
state corresponding to ∨ ope rator is the node state of
its leftmost child for which all subtr ansactions have
successfully finished STP. Otherwise, if all subtran-
sactions from node states of all children of the node
∨ are aborted , then its n ode state is the node state
of the rightmost child of ∨. Secondly, for any ag-
gregate transaction from the complex transaction, C
obtains the digital rece ipts for the p ayments of all pro-
ducts, and each mer chant obtains the corresponding
paymen t fo r th e product, or none of them obtains no-
thing. In CTP, the node state for a node corre sponding
to the ∧ operator is computed as fo llows: if all sub-
transactions from all node states of all child ren o f th e
node ∧ have successfully finished STP, then the node
state of ∧ is the sequence of node states of its child-
ren. Otherwise, the node state of ∧ is the sequence of
node states of its children until to the leftmost child
that contains only aborted subtransaction states in its
node state. But, in this last case, an unfair case occurs
for C: the entire aggregate transaction is not success-
ful, but C has paid for certa in products and he recei-
ved the digital receipt for these. We note that this is
the only case in that the fairness for C can b e violated
in CTP. In this case, as we h ave seen in CTP, the Ag-
gregateAbort sub-protocol is applied. More exactly,
C (payment Web segment) initiates the AggregateA-
bort sub-protocol from section 6.3.1 to abort any sub-
transaction th at successfully finished STP and that be-
longs to the unsuccessful a ggregate transaction , by
sending to PG (message 11) the node state corre-
sponding to ∧ operator. After checking the signatu-
res from all received subtransaction ’s states, PG sends
the custome r’s request to the bank that aborts all sub-
transactions that successfully finish e d STP (including
the canceling the corresponding tra nsfer) and that be-