Skip to main content
. 2026 Feb 16;26(4):1285. doi: 10.3390/s26041285
Algorithm 3 Selective decryption scheme
  • Require: 

    Encrypted bitstream, secret key K, ROI map

  • Ensure: 

    Reconstructed video

  •  1:

    Initialise CABAC decoder

  •  2:

    Regenerate ROI masks

  •  3:

    for each Coding Tree Unit (CTU) do

  •  4:

        Identify encrypted syntax elements

  •  5:

        for each encrypted syntax element do

  •  6:

            Obtain current Most Probable Symbol (MPS)

  •  7:

            for each encrypted bin Ci do

  •  8:

               SiAES128(Ci1,K)

  •  9:

               P˜iSiCi

  • 10:

               PiP˜iMPS

  • 11:

               Send Pi to arithmetic decoder

  • 12:

            end for

  • 13:

            if syntax element is non-binary (QTC or MVD) then

  • 14:

               Apply inverse Linear Congruential function

  • 15:

               Xia1(Xib)modm

  • 16:

            end if

  • 17:

        end for

  • 18:

    end for

  • 19:

    Perform standard inverse transform and prediction

  • 20:

    return Reconstructed video