Skip to main content
. 2023 May 14;23(10):4746. doi: 10.3390/s23104746
Algorithm 2 HE decryption algorithm for Scenarios 1 and 2.
  • 1:

    Input sk: the secret key for the decryption

  • 2:

    Input ciphertexts: the ciphertexts array

  • 3:

    Input N: the number of the households

  • 4:

    Input decryptor: the object that performs decryption

  • 5:

    for index=1,2,,N do

  • 6:

          cciphertexts[index]

  • 7:

          datadecrypt(c,decryptor,sk)

  • 8:

          push data into plaintexts array

  • 9:

    end for

  • 10:

    Output plaintexts array