You are on page 1of 5

International Journal of Computer Science and Information Security (IJCSIS),

Vol. 18, No. 1, January 2020

A Novel Approach for Construction of S-box using


Modified Pascal’s Triangle

Amna Naseer Nasir Siddiqui


Department of Basic Sciences Department of Basic Sciences
University of Engineering and Technology University of Engineering and Technology
Taxila, Pakistan Taxila, Pakistan
amnanaseer14@gmail.com nasir.siddiqui@uettaxila.edu.pk

Abstract— The substitution-box is primary cryptographic


component. The strength of encryption is based on the power of II. PROPOSED METHODOLOGY
the S-box. We are proposing a new technique in this paper to This section describes the proposed algorithm to construct
create a complicated cryptographic S-box. The proposed scheme the proposed S-box [5]. We use Modified Pascal’s Triangle [14]
to construct the S-box is based on Modified Pascal’s Triangle and
with linear fractional transformation (LFT) [1] to construct S-
Linear Fractional Transformation (Mobius Transformation). To
investigate the power of proposed S-box we applied analysis like box.
Differential Probability (DP), Non-Linearity (NL), Strict A. Step 1
Avalanche Criteria (SAC), Linear Probability (LP) and Bit
Independence Criteria (BIC). At the end we have application of First, we consider equation of Modified Pascal’s Triangle
our proposed S-box. 𝑝(𝑥, 𝑦) = 𝑝(𝑥, 𝑦 − 1) + 𝑝(𝑥 − 1, 𝑦)
𝑝(𝑥, 0) = 𝑎𝑥
𝑝(0, 𝑦) = 𝑏𝑦
Keywords- Substiution-box; Modified Pascal’s Triangle; Linear Where 𝑎𝑥 and 𝑏𝑦 are sequences.
fractional Trasformaion; Image Encryption
B. Step 2
I. INTRODUCTION
In this step we define sequences as 𝑎𝑥 = 2𝑥 and 𝑏𝑦 = 𝑦 3 +
Nowadays information can easily be exchanged and saved 2. We give variation to 𝑥 and 𝑦 such that 𝑥 varies from 2 to 80
among interrelated parties with the rapid expansion of the and 𝑦 varies from 3 to 60. Using these sequences and equation
Internet and digital media. Nevertheless, the distribution or
of Modified Pascal’s Triangle we have 256 elements which
preservation of this data is challenged due to the network's
gives us a 16×16 S-box.
transparency. Cryptographic techniques are used to encrypt and
monitor digital information. Many cryptosystems like data C. Step 3
encryption standard [13] and advanced encryption standard [7], In this step we apply linear fractional transformation on the
have been proposed by cryptographer. Cryptography allows S-box that we have created in previous step. We used a mobius
you to store or pass on sensitive data through unsecured transformation (LFT) on the Galois field 𝐺𝐹(2𝑛 )to construct a
networks (e.g. the Internet) so that none but the intended substitution box (S-box). Where 𝑛 = 8 we have 256 elements
receiver can access the information. from 0 to 255. We construct S-box using the action of
In this paper we have proposed an algorithm based on Modified 𝐺𝐿(2, 𝐺𝐹(28 )) on 𝐺𝐹(28 ).
Pascal’s triangle [14] and linear fractional transformation [2] to The transformation is expressed as
construct our proposed S-box. We used linear fractional 𝑈: 𝑃𝐺𝐿(2, 𝐺𝐹(28 )) × 𝐺𝐹(28 ) → 𝐺𝐹(28 )
transformation (𝑒𝑝 + 𝑓)/(𝑔𝑝 + ℎ) and choose appropriate 𝑒𝑝 + 𝑓
values of e, f, g and g. Our proposed S-box has tested by various 𝑈(𝑝) = 𝑤ℎ𝑒𝑟𝑒 𝑒. ℎ − 𝑓. 𝑐 ≠ 0
𝑔𝑝 + ℎ
tests, such as Differential Probability (DP), Non-Linearity
where the values of 𝑒, 𝑓, 𝑔 𝑎𝑛𝑑 ℎ are 23, 1, 98 and 195
(NL), Strict Avalanche Criteria (SAC), Linear Probability (LP)
respectively and these values belongs to 𝐺𝐹(28 ).
and Bit Independence Criteria (BIC). 23𝑝 + 1
In section I we present algorithm to construct our proposed S- 𝑈(𝑝) =
box. In section II we analyze our proposed S-box and compare 98𝑝 + 195
it with some standard S-boxes. In section III we use our where 23, 1, 98, 195  𝐺𝐹(28 ).
Proposed S-box for image encryption. In section IV we present D. Step 4
conclusion. In this step we apply linear fractional transformation on the
output of step 2. We apply loop on 𝑒, 𝑓, 𝑔 𝑎𝑛𝑑 ℎ from 0 to 255,

84 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 18, No. 1, January 2020

similarly 𝑝 is also calculated from 0 to 255. In this way we get


16×16 S-box. Algorithm of LFT is shown in fig.1. Proposed S-
Box is shown in table I.

Figure 1. Algorithm of LFT

TABLE I. PROPOSED S-BOX

53 184 191 243 121 140 44 246 217 196 145 229 192 178 32 95
245 207 224 80 244 19 11 209 64 137 248 67 81 250 157 237
152 12 114 233 232 235 231 45 225 155 88 223 14 176 173 188
218 175 144 163 214 211 198 58 195 215 4 190 87 179 180 170
174 169 166 101 165 91 156 71 150 111 146 213 205 109 142 212
23 206 86 254 219 8 128 216 132 127 98 96 151 252 48 28
238 20 164 3 189 234 75 62 228 100 202 84 21 36 13 51
69 222 16 60 203 125 138 18 221 106 56 85 65 148 1 135
27 251 29 15 200 158 193 54 153 133 92 105 30 253 116 119
199 0 183 197 37 115 123 126 227 46 139 34 99 47 182 117
120 97 171 236 204 77 61 10 160 41 102 107 241 162 74 22
159 104 78 72 255 168 239 210 187 177 108 50 43 112 57 110
79 113 161 31 147 201 242 167 136 49 130 25 40 9 82 59
7 70 186 141 220 118 35 247 122 6 38 124 249 208 131 66
154 68 94 103 2 17 42 76 24 240 129 5 63 90 226 230
181 55 26 185 83 149 52 39 134 33 89 194 93 143 73 172

III. RESULTS AND COMPARISON


To examine the properties of our proposed S-box we will

85 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 18, No. 1, January 2020

apply different tests such as NL, BIC, DP, SAC and LP. We B. Strict Avalanche criterion
compare our proposed S-box with some standard S-boxes such The SAC is mandatory element of S-boxes it is define as if
[7], [8], [9], [10], [11] and [12]. Also, we have shown only one bit of the input is altered, fifty percent of the output
graphically comparison of these S-boxes [3]. bits should be affected [6]. SAC comparison is made with
A. Non-linearity different S-boxes which is shown in table IV. We can see that
average value of SAC=0.49. Graphical comparison is shown in
The number of bits in non-linearity should be changed to reach
fig. 3.
close to affine function. Maximum value of non-linearity is
N=120. Nonlinearity is calculated by following equation
𝑁𝐿(𝑓)=1/2[2𝑚 − (𝑚𝑎𝑥 𝑊𝐻𝑇)] TABLE 1V. SAC COMPARISON OF DIFFERENT S-BOXES
Where WHT is Walsh-Hadamard transform. Results of non-
S-boxes Mini Max Square Avg
linearity is listed in table II. Maximum non-linearity of deviation
proposed S-box is 106 and minimum non-linearity is 102.And
Proposed S-box 0.390 0.593 0.045 0.495
the average non-linearity is 104.75.
AES 0.453 0.562 0.0156 0.504
Gray 0.437 0.562 0.015 0.499
TABLE II. NON-LINEARITY OF PROPOSED S-BOX Skipjack 0.39 0.593 0.024 0.503
APA 0.437 0.562 0.0016 0.5
𝒂𝟎 𝒂𝟏 𝒂𝟐 𝒂𝟑 𝒂𝟒 𝒂𝟓 𝒂𝟔 𝒂𝟕
Residue prime 0.343 0.671 0.032 0.516
Xyi 0.406 0.609 0.022 0.502
104 106 102 104 106 106 104 106

Now we compare our S-box with some standard S-boxes, in SAC comparison of S-boxes
table III we compare non-linearity of proposed S-box with some
standard S-boxes. Graphical comparison is shown in fig. 2. Xyi
Residue prime
TABLE III. NON-LINEARITY COMPARISON OF S-BOXES
APA
Skipjack
S-boxes Max Mini Avg Gray
Proposed S-box 106 102 104.75 AES
AES 112 112 112 Proposed S-box
Gray 112 112 112
0 0.2 0.4 0.6 0.8
Skipjack 108 104 105.75
APA 112 112 112 average square deviation maximum minimum
Residue prime 104 94 99.5
Figure 3. SAC comparison
Xyi 106 104 105

C. Bit Independence Criterion


Non-linearity In BIC criterion if single input bit is altered then with this
change two output bits must be altered. It becomes harder to
tackle the cryptosystem with bit of independence. BIC analysis
Xyi
of proposed S-box is shown in table V and comparison is
Residue prime
APA TABLE V. BIC ANALYSIS OF PROPOSED S-BOX
Skipjack
---- 104 98 104 100 102 108 106
Gray
104 ---- 106 108 102 100 94 98
AES
98 106 ---- 100 108 104 98 106
proposed S-… 104 108 100 ---- 104 104 106 104
90 95 100 105 110 115 100 102 108 104 ---- 102 106 100

Average 102 100 104 104 102 ---- 102 104


108 94 98 106 106 102 ---- 106
106 98 106 104 100 104 106 ----

Figure 2. Non-linearity comparison

86 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 18, No. 1, January 2020

shown in table VI. It is seen that minimum value=94, average Xyi DP comparison of S-boxes
value=103 and value of square deviation=3.246. BIC residue
comparison is graphically shown in fig. 4. APA

skipjack
TABLE VI. BIC COMPARISON OF S-BOXES
gray
S-boxes Mini value Avg Square AES
Deviation
proposed S-box
Proposed S-box 94 103.00 3.426
0 0.05 0.1 0.15 0.2 0.25 0.3
AES 112 112 0
Gray 112 112 0 max DP
Skipjack 102 104.14 1.767
APA 112 112 0 Figure 5. DP comparison
Residue prime 94 101.71 3.53
Xyi 98 103.78 2.743 E. Linear Probability
The LP tests the greatest value of discrepancy. LP is defined
mathematically as
#{𝑥𝑋/𝑥 . 𝑥 = 𝑆(𝑥) . 𝑦}
BIC comparison of S-boxes 𝐿𝑃 = 𝑚𝑎𝑥𝑥,𝑦≠0 | − 0.5|
2𝑚
Where 𝑥 and 𝑦 are input differential and output differential
Xyi respectively. Maximum linear probability of proposed S-box is
residue prime 162. Comparison with some standard S-boxes is shown in table
APA VIII. Graphical comparison shown in fig. 6.
skipjack
gray TABLE VIII. DP COMPARISON OF S-BOXES
AES
S- Propose AES Gray Skipjac APA Residu Xyi
proposed S-box boxe d S-box k e
0 20 40 60 80 100 120 s Prime
Max 0.1328 0.06 0.06 0.109 0.06 0.132 0.15
sqaure deviation average minimum value LP 2 2 2 6
Max 162 144 144 156 144 162 168
valu
e
Figure 4. BIC comparison

D. Differential Probability LP comparison of S-boxes


In this method we analyze behavior of input bit and output
bit. The differential approximation probability says that a xyi
particular output adjustment must be made when a single input residue
bit is modified. Our proposed S-box has DP 0.0468. APA
Comparison of our newly created S-box with some standard S- skipjack
boxes is shown in table VII. DP comparison graphically shown gray
in fig. 5. AES
proposed S-box
TABLE VII. DP COMPARISON OF S-BOXES 0 50 100 150 200
S- Propose AES Gray Skipjac APA Residu Xyi
max value max LP
boxe d S-box k e
s Prime
Figure 6. LP comparison
Max 0.0468 0.015 0.015 0.0468 0.015 0.281 0.046
DP 6 6 6 8

IV. IMAGE ENCRYPTION


Here we have application of our proposed S-box, we apply
our S-box for image encryption. Fig. 7 shows encryption of
image, (a) is original image of capsicum in (b) is first round of
encryption and (c) is second round of encryption.

87 https://sites.google.com/site/ijcsis/
ISSN 1947-5500
International Journal of Computer Science and Information Security (IJCSIS),
Vol. 18, No. 1, January 2020

[5] Hussain, I., Shah, T., Gondal, M. A., Khan, W. A., &
Mahmood, H. (2013). A group theoretic approach to
construct cryptographically strong substitution boxes.
Neural Computing and Applications, 23(1), 97-104.
[6] Mar, P. P., & Latt, K. M. (2008). New analysis
methods on strict avalanche criterion of S-boxes.
World Academy of Science, Engineering and
(a) (b) (c)
Figure 7. Image encryption Technology, 48(150-154), 25.
[7] Daemen, J., & Rijmen, V. (2013). The design of
Rijndael: AES-the advanced encryption standard.
V. CONCLUSION Springer Science & Business Media.
In this paper, we have created substitution-box using a new [8] Tran, M. T., Bui, D. K., & Duong, A. D. (2008,
technique. For the construction of S-box we use Modified December). Gray S-box for advanced encryption
Pascal’s Triangle and Linear Fractional Transformation. We standard. In 2008 International Conference on
compared our proposed S-box with some S-boxes that are Computational Intelligence and Security (Vol. 1, pp.
already available in literature. In order to evaluate our S-box we
253-258). IEEE.
apply those tests. We can see that our proposed S-box is
[9] Kim*, J., & Phan**, R. C. W. (2009). Advanced
comparable with other boxes and have better results. In last we
apply our S-box for the encryption of an image. differential-style cryptanalysis of the NSA's skipjack
block cipher. Cryptologia, 33(3), 246-270.
[10] Cui, L., & Cao, Y. (2007). A new S-box structure
REFERENCES named Affine-Power-Affine. International Journal of
Innovative Computing, Information and Control, 3(3),
[1] Sarfraz, M., Hussain, I., & Ali, F. (2016). Construction 751-759.
of S-Box based on Mobius transformation and [11] Hussain, I., Shah, T., Mahmood, H., Gondal, M. A., &
increasing its confusion creating ability through Bhatti, U. Y. (2011). Some analysis of S-box
invertible function. International Journal of Computer based on residue of prime number. Proc Pak Acad
Science and Information Security, 14(2), 187. Sci, 48(2), 111-115.
[2] Shah, D., Shah, T., & Jamal, S. S. (2019). A novel [12] Shi XY, Xiao Hu You XC, Lam KY (2002) A method
efficient image encryption algorithm based on affine for obtaining cryptographically strong 8 ×8 S-
transformation combine with linear fractional boxes. Int Conf Infor Network Appl 2(3):14–20.
transformation. Multidimensional Systems and Signal [13] Coppersmith, D. (1994). The Data Encryption
Processing, 1-21. Standard (DES) and its strength against attacks. IBM
[3] Hussain, I., Shah, T., Mahmood, H., & Gondal, M. A. journal of research and development, 38(3), 243-250.
[14] Barry, P. (2007). On a family of generalized Pascal
(2013). A projective general linear group based
triangles defined by exponential Riordan
algorithm for the construction of substitution box for
arrays. Journal of Integer Sequences, 10(3).
block ciphers. Neural Computing and Applications,
22(6), 1085-1093.
[4] Hussain, I., Shah, T., Gondal, M. A., Khan, M., &
Khan, W. A. (2011). Construction of new S-box using
a linear fractional transformation. World Appl. Sci. J,
14(12), 1779-1785.

88 https://sites.google.com/site/ijcsis/
ISSN 1947-5500

You might also like