|
Algorithm 5 Peer-to-peer protocol. |
B sets receiver ← .cert if .cert and calls .PrepareTxn in his trusted application T. Otherwise, receiver ← and calls prepare transaction Algorithm 7 from his untrusted application UT. The output is forwarded to B and then forwarded to A with message including message ‘RequestPayment’ [RequestPayment, [timestamp, x], , receiver].
Upon receiving [RequestPayment, [timestamp, x], , receiver] from B, client A sends P to B where P ← TA.Pay (x, timestamp, receiver).
Upon receiving P from A, client B performs the following steps:
-
(a)
Abort if any of the following conditions is true: PayVerify(P) ≠ 1 or P.receiver ≠ receiver or P ∈ B.inPaymentLog.
-
(b)
B adds P to B.inPaymentLog in his UT and sends [ReceivedPayment] to A.
-
(c)
If P.receiver.type = “T”, then B calls .Collect (P).
-
(d)
Otherwise, B engages in the Claim protocol Algorithm 8 with BS as soon as B is online.
|