Research Article

Image Encryption Using the Chaotic Josephus Matrix

Algorithm 2

Reshape a CJPS into a CJPM.
Input: , a CJPS at length
Output: , a CJPM of size -by-
for 1:
  for 1:
      ;
  end
end