0% found this document useful (0 votes)
3 views7 pages

In-Depth Encryption Algorithm Guide

The document outlines a detailed encryption and decryption algorithm for images using chaotic systems and DNA encoding. It includes steps for preprocessing, key generation, chaotic system initialization, and multiple rounds of encryption and decryption, ensuring lossless recovery of the original image. Implementation notes highlight precision control, parallelization for performance, and security measures against various attack types.

Uploaded by

sudhir77scs
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

In-Depth Encryption Algorithm Guide

The document outlines a detailed encryption and decryption algorithm for images using chaotic systems and DNA encoding. It includes steps for preprocessing, key generation, chaotic system initialization, and multiple rounds of encryption and decryption, ensuring lossless recovery of the original image. Implementation notes highlight precision control, parallelization for performance, and security measures against various attack types.

Uploaded by

sudhir77scs
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

05/08/2025, 15:10 Improve research methodology

Encryption Algorithm (In-Depth)


Input:
Plain image I of size M × N (grayscale or color).
Number of encryption rounds R (default: 3).
Precision pprec = 10−16 for chaotic maps.

Output:
Encrypted image C .

Step 1 – Preprocessing
1. If I is color, split into channels:
IR , IG , IB
​ ​ ​

For grayscale, work directly with I .


2. Normalize pixel values to [0, 255] integers.

Step 2 – Key Generation via SHA-3


1. Compute SHA-3–256 hash:
H = SHA3-256(I)

This produces a 256-bit value.


2. Split H into eight 32-bit segments:
(h1 , h2 , … , h8 )
​ ​ ​

3. Convert each segment to a floating-point number in (0, 1):


int(hi , 16)
di = , i = 1…8

232
​ ​

Step 3 – Chaotic System Initialization


12/41
05/08/2025, 15:10 Improve research methodology

1. Primary Map – 3D Hyperchaotic Lorenz System


Initialize:
(x0 , y0 , z0 ) = (d1 , d2 , d3 )
​ ​ ​ ​ ​ ​

with parameters a, b, c from secure ranges.


2. Secondary Map – PWLCM
Initialize:
u0 = d4 ,
​ ​ v0 = d 5
​ ​

with parameters pu, pv ∈ (0, 0.5).


​ ​

3. Auxiliary Map – Chebyshev


Initialize:
q0 = d6 ,​ ​ r 0 = d7
​ ​

with parameters wq , wr ∈ [2, 6].


​ ​

4. DNA Mapping Selector Seed:


mseed = d8 .
​ ​

Step 4 – Encryption Rounds


Repeat steps 4.1 to 4.6 for k = 1 … R.

4.1 Bit-Plane Decomposition & Scrambling


1. Decompose I into 8 bit-planes:
BP1 , BP2 , … , BP8
​ ​ ​

2. Generate 8 × M × N Lorenz sequence values.


3. Sort Lorenz values and permute bits in each plane according to sorted indices.

4.2 Block-Based Permutation


1. Divide scrambled image into B × B blocks (default B = 16).
2. Generate permutation arrays Px and Py from PWLCM sequences u and v.

3. Shuffle blocks and intra-block pixels accordingly.

13/41
05/08/2025, 15:10 Improve research methodology

4.3 Adaptive DNA Encoding


1. Convert each pixel value (8-bit) into 4 nucleotides using one of the 8 valid DNA
encodings chosen based on:
encoding_id = ⌊(mseed × 106 )⌋
​ mod 8
2. Store mapping choice for decryption.

4.4 DNA Transformation


1. Generate Chebyshev sequences for transformation iteration counts Ci ∈
{0, 1, 2, 3}.

2. For each nucleotide Xj : ​

If Cj = 0, no change.

If Cj = 1, apply complementary rule once.


If Cj = 2, apply twice.

If Cj = 3, apply thrice.

3. Between transformations, apply DNA arithmetic:


DNA XOR with chaotic-derived nucleotide sequence.
DNA addition/subtraction mod 4.

4.5 Cipher Feedback Diffusion


1. Flatten DNA-coded sequence back into pixel values.
2. Generate Lorenz sequence L of length M × N .
3. Update pixel values:
Ci = (Pi ⊕ ⌊Li × 255⌋)
​ ​ ​ mod 256

where Pi is the current pixel value.


4.6 Dynamic Parameter Update


At the end of each round:
1. Select ⌊0.5 × M × N ⌋ pixels from C .
2. Compute SHA-3–128 hash of selected pixels.
3. Use hash output to slightly perturb all chaotic map parameters for the next round.
14/41
05/08/2025, 15:10 Improve research methodology

Step 5 – Output
After R rounds:
Merge bit-planes, reconstruct encrypted channels.
For RGB images, merge CR , CG , CB into final cipher image C .
​ ​ ​

Output C .

Notes on Implementation
Precision control: All chaotic maps use double precision with modulo adjustments
to prevent floating-point degradation.
Parallelization: DNA encoding, block permutation, and chaotic sequence
generation are parallelized for GPU acceleration.
Security level: Effective key space exceeds 2400, resistant to statistical, differential,
brute-force, and quantum preimage attacks.

Decryption Algorithm (In-Depth)


Input:
Encrypted image C of size M × N .
Number of rounds R (same as used in encryption).
Initial chaotic map parameters and constants.
Recorded DNA mapping choices per block (from encryption).
15/41
05/08/2025, 15:10 Improve research methodology

Output:
Recovered plaintext image I .

Step 1 – Preprocessing
1. If C is color, split into channels:
CR , CG , CB
​ ​ ​

For grayscale, process C directly.


2. Ensure pixel values are integers in [0, 255].

Step 2 – Chaotic System Initialization


1. Compute SHA-3–256 hash of the original plaintext image filename or metadata if
available for initialization consistency (or use stored initial parameters).
2. Split into eight 32-bit segments (h1, h2, … , h8). ​ ​ ​

3. Convert segments into floating-point values di ∈ (0, 1). ​

4. Initialize chaotic systems exactly as in encryption:


3D Hyperchaotic Lorenz System with (x0, y0, z0) = (d1, d2, d3). ​ ​ ​ ​ ​ ​

PWLCM with (u0, v0) = (d4, d5).


​ ​ ​ ​

Chebyshev Map with (q0, r0) = (d6, d7).


​ ​ ​ ​

DNA mapping seed = d8. ​

Step 3 – Reverse Rounds


For k = R down to 1, reverse each encryption step in exact order:

3.1 Reverse Cipher Feedback Diffusion


1. Regenerate Lorenz sequence L of length M × N .
2. Reverse pixel diffusion:
Pi = (Ci ⊕ ⌊Li × 255⌋)
​ ​ ​ mod 256

This restores pre-diffusion pixel values.

16/41
05/08/2025, 15:10 Improve research methodology

3.2 Reverse DNA Transformation


1. Convert pixels back to nucleotide sequences using stored DNA mapping for that
block.
2. Regenerate Chebyshev sequence to obtain iteration counts Cj . ​

3. Apply complementary rule inverse:


If Cj = 0, no change.

If Cj = 1, apply complementary rule three times.


If Cj = 2, apply complementary rule two times.


If Cj = 3, apply complementary rule once.


4. Reverse DNA arithmetic in opposite order to encryption:


Undo DNA subtraction/addition.
Undo DNA XOR using the same chaotic nucleotide sequence.

3.3 Reverse Block-Based Permutation


1. Regenerate PWLCM sequences u and v.
2. Reconstruct the exact block permutation indices used in encryption.
3. Apply inverse block shuffling:
Move each pixel block back to its original position.
Reverse intra-block pixel permutation.

3.4 Reverse Bit-Plane Scrambling


1. Decompose image into 8 bit-planes.
2. Regenerate Lorenz permutation indices for bits.
3. Reverse bit scrambling by restoring original bit order within each plane.
4. Merge bit-planes to reconstruct pixel values.

3.5 Reverse Dynamic Parameter Update


1. At the end of each round reversal, recompute the chaotic parameters from the
stored history (or by deterministic regeneration using cipher feedback from
encryption stage).
This ensures that for k − 1 round reversal, the correct chaotic state is used.
17/41
05/08/2025, 15:10 Improve research methodology

Step 4 – Output Reconstruction


1. For grayscale: merge the processed single channel into I .
2. For RGB: merge IR , IG , IB into final plaintext image I .
​ ​ ​

3. Output recovered image I .

Implementation Notes
Perfect Symmetry: Every operation in encryption has an exact inverse, ensuring
lossless recovery.
DNA Inverse Operations: Complementary rule operations are cyclic of order 4, so
inversion is done by applying (4 − Cj ) mod 4 transformations.

Block Permutation Reversal: Store or deterministically regenerate index sequences


to avoid needing extra side-channel data.
Cipher Feedback Synchronization: The feedback mechanism is fully deterministic
from the encryption state, ensuring reproducible parameter updates.

18/41

You might also like