If we call the three logistic maps
LM
1
,
LM
2
and
LM
3
thenthe fuzzy rules are as follow:1) IF
x
IS
M
1
THEN FLM(
x
)=
LM
1
(
x
) =
r
1
x
(1
−
x
)
2) IF
x
IS
M
2
THEN FLM(
x
)=
LM
2
(
x
) =
r
2
x
(1
−
x
)
3) IF
x
IS
M
3
THEN FLM(
x
)=
LM
3
(
x
) =
r
3
x
(1
−
x
)
For the rest of this paper, we will use the following values:
r
1
= 3
.
95
,
r
2
= 3
.
9
and
r
3
= 3
.
8
.The fuzzy sets
M
1
,
M
2
and
M
3
membership functions
f
1
,
f
2
and
f
3
are deﬁned as follow:
f
1
(
x
) =
−
2
x
+ 1 if 0
≤
x
≤
12
0 if
12
≤
x
≤
1
f
2
(
x
) =
2
x
if 0
≤
x
≤
12
−
2
x
+ 2 if
12
≤
x
≤
1
f
3
(
x
) =
0 if 0
≤
x
≤
12
2
x
−
1 if
12
≤
x
≤
1
For the defuzziﬁcation process, we use a center averagedefuzziﬁer and the crisp value of FLM(
x
) is:
FML
(
x
) =
3
i
=1
µ
i
LM
i
(
x
)
3
i
=1
µ
i
Where
µ
i
represents the degree of membership of
x
in
M
i
.Before presenting the algorithm, the following notations arepresented:
P
plain-imageK 128 bits key
C
cipher-image
P
i
ith pixel of P
P
i
(
R,GorB
)
Red, Green or Blue value of the pixel
iFLM
i
fuzzy-logistic-map value after i iteration
L
i
(
x
0
,N
)
Value of the logistic map
i
starting from
x
0
after
N
iterationsF A map from the set of 32 bytesnumbers to the interval
[0
,
1]
The encryption algorithm description can be summarizedas following:
•
Begin:
•
Step 1: We begin by generating an initial condition
x
0
∈
[0
,
1]
:
x
0
=
F
(
K
)
.
•
Step 2: In this step we generate a key vector
KF
of size
n
where
n
is the number of pixels of P using thefunction getKey:
KF
=
getKey
(
x
0
)
.The function getKey is deﬁned as bellow:Run the FLM generator and stop after
ITER
iterations (the initial value is
x
0
and
ITER
is aniteration parameter).For
i
in
[1
,n
]
:
–
KF
i
=
(
ITERl
=1
FML
(
i
+
l
)
2
)
×
256
mod
256
.
–
Run the FLM generator and stop after
ITER
.
•
Step 3:Using the generated key, we will generate theimage
C
as follow:
–
C
0
(
R
) = (
P
0
(
R
) +
KF
0
)
mod
256
.
–
C
0
(
G
) = (
P
0
(
G
) +
KF
0
)
mod
256
.
–
C
0
(
B
) = (
P
0
(
B
) +
KF
0
)
mod
256
.and:For
i
in
[2
,n
]
:
–
C
i
(
R
) = (
P
i
(
R
) +
KF
i
+
C
i
−
1
(
R
))
mod
256
.
–
C
i
(
G
) = (
P
i,j
(
G
) +
KF
i,j
+
C
i
−
1
(
G
)))
mod
256
.
–
C
i
(
B
) = (
P
i,j
(
B
) +
KF
i,j
+
C
i
−
1
(
B
)))
mod
256
.
•
Step 4: We reverse the data of the image
C
:For
i
in
[1
,n
]
:
–
C
i
=
C
n
−
i
+1
•
Step 5: ﬁnally we construct the cipher-image
C
byrepeating the step 3 using the image
C
:
–
C
0
(
R
) = (
C
0
(
R
) +
KF
0
)
mod
256
.
–
C
0
(
G
) = (
C
0
(
G
) +
KF
0
)
mod
256
.
–
C
0
(
B
) = (
C
0
(
B
) +
KF
0
)
mod
256
.and:For
i
in
[2
,n
]
:
–
C
i
(
R
) = (
C
i
(
R
) +
KF
i
+
C
i
−
1
(
R
))
mod
256
.
–
C
i
(
G
) = (
C
i,j
(
G
) +
KF
i,j
+
C
i
−
1
(
G
)))
mod
256
.
–
C
i
(
B
) = (
C
i,j
(
B
) +
KF
i,j
+
C
i
−
1
(
B
)))
mod
256
.
•
End
The decryption algorithm is identical to the encryption algo-rithm, it receives as inputs the cipher-image C and the 128bits key K (the same used for the encryption) and returns asoutput the plain-image P.The only difference between the two algorithm is the step3 and step 5 which are deﬁned as below for the decryptionalgorithm.
•
Step 3:
–
C
0
(
R
) = (
C
0
(
R
)
−
KF
0
)
mod
256
.
–
C
0
(
G
) = (
C
0
(
G
)
−
KF
0
)
mod
256
.
–
C
0
(
B
) = (
C
0
(
B
)
−
KF
0
)
mod
256
.and:For
i
in
[2
,n
]
:
–
C
i
(
R
) = (
C
i
(
R
)
−
KF
i
−
C
i
−
1
(
R
))
mod
256
.
–
C
i
(
G
) = (
C
i
(
G
)
−
KF
i
−
C
i
−
1
(
G
))
mod
256
.
–
C
i
(
B
) = (
C
i
(
B
)
−
KF
i
−
C
i
−
1
(
B
))
mod
256
.
•
Step 5:
–
P
0
(
R
) = (
C
0
(
R
)
−
KF
0
)
mod
256
.
–
P
0
(
G
) = (
C
0
(
G
)
−
KF
0
)
mod
256
.
–
P
0
(
B
) = (
C
0
(
B
)
−
KF
0
)
mod
256
.and:For
i
in
[2
,n
]
:
–
P
i
(
R
) = (
C
i
(
R
)
−
KF
i
−
C
i
−
1
(
R
))
mod
256
.
–
P
i
(
G
) = (
C
i
(
G
)
−
KF
i
−
C
i
−
1
(
G
))
mod
256
.
–
P
i
(
B
) = (
C
i
(
B
)
−
KF
i
−
C
i
−
1
(
B
))
mod
256
.
(IJCSIS) International Journal of Computer Science and Information Security,Vol. 9, No. 3, March 201141 http://sites.google.com/site/ijcsis/ISSN 1947-5500