Skip to main content
. 2023 May 14;23(10):4746. doi: 10.3390/s23104746
Algorithm 3 HE Decryption Algorithm for Scenario 3
  • 1:

    Input pk: the target public key for the new ciphertexts after converted from an MPC protocol

  • 2:

    Input sk: the target secret key for the decryptor

  • 3:

    Input N: the number of the households

  • 4:

    Input H: the households array, each household keeping its secret key

  • 5:

    Input decryptor: the object that performs the decryption

  • 6:

    for index=1,2,,N do

  • 7:

          cciphertexts[index]

  • 8:

          cSwitchKeyViaMPC(params,pk,c,H)

  • 9:

          datadecrypt(c,decryptor,sk)

  • 10:

         push data into plaintexts array

  • 11:

    end for

  • 12:

    Output plaintexts array