Skip to main content
. 2023 Feb 10;23(4):2000. doi: 10.3390/s23042000
Algorithm 3 Sybil-resistant game Gsybil (from AGi to SC)
  • 1:

    Input:

  • 2:

       AGi: the set of auto agents

  • 3:

       txin: the transaction first receives by AGi

  • 4:

       A: the adversary

  • 5:

       λ: the security parameter

  • 6:

    Output::

  • 7:

       txout: the transaction first transferred to SC by AGi

  • 8:

    ————————————————————————————————————————

  • 9:

    Initial:

  • 10:

    PKAGi,SKAGi,PKus,SKusRegistration(1λ)

  • 11:

    Ainit(AGA), where |AGA|=k

  • 12:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - – - - - - - - - - - - - - - - - - - - -

  • 13:

    A.1. Forge the cross-chain transaction:

  • 14:

       txF,SigAGi(txF)AGA(SKAGi)

  • 15:

       if Verify(SigAGi(txF)) then

  • 16:

          Broadcast txF in SC

  • 17:

          return txout=txF

  • 18:

       else return nil

  • 19:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - – - - - - - - - - - - - - - - - - - - -

  • 20:

    A.2. Tamper with the cross-chain transaction:

  • 21:

       AGA receives txin

  • 22:

       txT,SigAGi(txT)AGATamper(SKAGi,txin)

  • 23:

       if Verify(SigAGi(txT)) then

  • 24:

          Broadcast txT in SC

  • 25:

          return txout=txT

  • 26:

       else return nil

  • 27:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - – - - - - - - - - - - - - - - - - - - -

  • 28:

    A.3. Withhold the cross-chain transaction:

  • 29:

       AGA receives txin

  • 30:

       withhold the transaction

  • 31:

       AGA receives txin2, broadcast

  • 32:

       return txout=txin2