Skip to main content
. 2024 Dec 16;24(24):8034. doi: 10.3390/s24248034
Algorithm 5 Peer-to-peer protocol.
  1. B sets receiver ← TB.cert if TB.cert and calls TB.PrepareTxn in his trusted application T. Otherwise, receiver ← certB 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].

  2. Upon receiving [RequestPayment, [timestamp, x], σ, receiver] from B, client A sends P to B where P ← TA.Pay (x, timestamp, receiver).

  3. 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 TB.Collect (P).
    • (d)
      Otherwise, B engages in the Claim protocol Algorithm 8 with BS as soon as B is online.