Table 16 Pseudo Code of RGB multiple image encryption over GI.
//Step 1: Input Preparation |
Input: Set of RGB images |
For each RGB image in the set: |
Split the image into three channels: Red, Green, Blue |
Convert each channel into a matrix of pixel values over Gaussian integer residue class Z[i] |
// Step 2: S-Box Construction |
Construct two 8 × 8 S-boxes: |
S1 = S-box for substitution (using properties of Z[i]) |
S2 = S-box for permutation (using properties of Z[i]) |
// Step 3: Substitution-Permutation Network (SPN) Structure |
For each pixel in the Red, Green, and Blue channels: |
// Substitution Step |
Apply S1 to substitute each pixel value in the channel |
// Permutation Step |
Apply S2 to permute pixel positions in the channel |
// Step 4: XOR Operation for Enhanced Permutation |
For each pixel in the Red, Green, and Blue channels: |
// XOR Operation |
Perform XOR between the substituted pixels (from S1) and permuted pixels (from S2) |
Generate a third S-box S3 by combining the XOR result |
Apply S3 to each pixel in the channels |
// Step 5: Final Encryption Transformation |
For each RGB channel: |
Sequentially apply the SPN framework (S1 for substitution, S2 for permutation, and S3 for XOR) across all pixels |
// Step 6: Output the Encrypted Image |
Combine the encrypted Red, Green, and Blue channels to reconstruct the encrypted RGB image |
// Step 7: Final Output |
Output: Set of encrypted images with high entropy, low correlation, and enhanced security |