Skip to main content
Have a personal or library account? Click to login
Fermat Encoding in S-Box for Secured Encryption Cover
Open Access
|Feb 2025

Figures & Tables

graphic/j_ias-2024-0018_ufig_001.jpg
graphic/j_ias-2024-0018_ufig_002.jpg
Figure 1.

Encryption of the S-box

Figure 2.

Decryption of the S-box

graphic/j_ias-2024-0018_ufig_003.jpg
Table 1.

S-box Generation

11110001,00010010,11110001,11010101,11110001,
00010010,11110001,01011010,11110001,00010010,
11110001,11010101,11110001,00010010,11110001,
01000101,11110001,00010010,11110001,11010101,
11110001,00010010,11110001,01011010,11110001,
00010010,11110001,11010101,11110001,00010010,
11110001,01111011,11110001,00010010,11110001,
11010101,11110001,00010010,11110001,01011010,
11110001,00010010,11110001,11010101,11110001,
00010010,11110001,01000101,11110001,00010010,
11110001,11010101,11110001,00010010,11110001,
01011010,11110001,00010010,11110001,11010101,
11110001,00010010,11110001,00000111,11110001,
00010010,11110001,11010101,11110001,00010010,
11110001,01011010,11110001,00010010,11110001,
11010101,11110001,00010010,11110001,01000101,
11110001,00010010,11110001,11010101,11110001,
00010010,11110001,01011010,11110001,00010010,
11110001,11010101,11110001,00010010,11110001,
01111011,11110001,00010010,11110001,11010101,
11110001,00010010,11110001,01011010,11110001,
00010010,11110001,11010101,11110001,00010010,
11110001,01000101,11110001,00010010,11110001,
11010101,11110001,00010010,11110001,01011010,
11110001,00010010,11110001,11010101,11110001,
00010010,11110001,11111111,11110001,00010010,
11110001,11010101,11110001,00010010,11110001,
01011010,11110001,00010010,11110001,11010101,
11110001,00010010,11110001,01000101,11110001,
00010010,11110001,11010101,11110001,00010010,
11110001,01011010,11110001,00010010,11110001,
11010101,11110001,00010010,11110001,01111011,
11110001,00010010,11110001,11010101,11110001,
00010010,11110001,01011010,11110001,00010010,
11110001,11010101,11110001,00010010,11110001,
01000101,11110001,00010010,11110001,11010101,
11110001,00010010,11110001,01011010,11110001,
00010010,11110001,11010101,11110001,00010010,
11110001,00000111,11110001,00010010,11110001,
11010101,11110001,00010010,11110001,01011010,
11110001,00010010,11110001,11010101,11110001,
00010010,11110001,01000101,11110001,00010010,
11110001,11010101,11110001,00010010,11110001,
01011010,11110001,00010010,11110001,11010101,
11110001,00010010,11110001,01111011,11110001,
00010010,11110001,11010101,11110001,00010010,
11110001,01011010,11110001,00010010,11110001,
11010101,11110001,00010010,11110001,01000101,
11110001,00010010,11110001,11010101,11110001,
00010010,11110001,01011010,11110001,00010010,
11110001,11010101,11110001,00010010,11110001,
11001000
Table 2.

Fermat encoding using backward method

Index = 0Index = 1Index = 2
241 - 3 = 23818 - 3 = 15241 - 3 = 238
238 - 5 = 23315 - 5 = 10238 - 5 = 233
233 - 17 = 21610 - 17 = 249233 - 17 = 216
216 - 1 = 215249 - 1 = 248216 - 1 = 215
215 - 1 = 214248 - 1 = 247215 - 1 = 214
214 - 1 = 213247 - 1 = 246214 - 1 = 213
213 - 1 = 212246 - 1 = 245213 - 1 = 212
212 - 1 = 211245 - 1 = 244212 - 1 = 211
Index = 3Index = 4Index = 5
213 - 3 = 210241 - 3 = 23818 - 3 = 15
210 - 5 = 205238 - 5 = 23315 - 5 = 10
205 - 17 = 188233 - 17 = 21610 - 17 = 249
188 - 1 = 187216 - 1 = 215249 - 1 = 248
187 - 1 = 186215 - 1 = 214248 - 1 = 247
186 - 1 = 185214 - 1 = 213247 - 1 = 246
185 - 1 = 184213 - 1 = 212246 - 1 = 245
184 - 1 = 183212 - 1 = 211245 - 1 = 244
Index = 6Index =7Index = 8
241 - 3 = 23890 - 3 = 87241 - 3 = 238
238 - 5 = 23387 - 5 = 82238 - 5 = 233
233 - 17 = 21682 - 17 = 65233 - 17 = 216
216 - 1 = 21565 - 1 = 64216 - 1 = 215
215 - 1 = 21464 - 1 = 63215 - 1 = 214
214 - 1 = 21363 - 1 = 62214 - 1 = 213
213 - 1 = 21262 - 1 = 61213 - 1 = 212
212 - 1 = 21161 - 1 = 60212 - 1 = 211
………………………………………………
………………………………………………
Index = 247Index =248Index = 249
90 - 3 = 87241 - 3 = 23818 - 3 = 15
87 - 5 = 82238 - 5 = 23315 - 5 = 10
82 - 17 = 65233 - 17 = 21610 - 17 = 249
65 - 1 = 64216 - 1 = 215249 - 1 = 248
64 - 1 = 63215 - 1 = 214248 - 1 = 247
63 - 1 = 62214 - 1 = 213247 - 1 = 246
62 - 1 = 61213 - 1 = 212246 - 1 = 245
61 - 1 = 60212 - 1 = 211245 - 1 = 244
Index = 250Index = 251Index = 252
241 - 3 = 238213 - 3 = 210241 - 3 = 238
238 - 5 = 233210 - 5 = 205238 - 5 = 233
233 - 17 = 216205 - 17 = 188233 - 17 = 216
216 - 1 = 215188 - 1 = 187216 - 1 = 215
215 - 1 = 214187 - 1 = 186215 - 1 = 214
214 - 1 = 213186 - 1 = 185214 - 1 = 213
213 - 1 = 212185 - 1 = 184213 - 1 = 212
212 - 1 = 211184 - 1 = 183212 - 1 = 211
Index =253Index = 254Index = 255
18 - 3 = 15241 - 3 = 238200 - 3 = 197
15 - 5 = 10238 - 5 = 233197 - 5 = 192
10 - 17 = 249233 - 17 = 216192 - 17 = 175
249 - 1 = 248216 - 1 = 215175 - 1 = 174
248 - 1 = 247215 - 1 = 214174 - 1 = 173
247 - 1 = 246214 - 1 = 213173 - 1 = 172
246 - 1 = 245213 - 1 = 212172 - 1 = 171
245 - 1 = 244212 - 1 = 211171 - 1 = 170
Table 3.

Encrypted S-Box

21124421118321124421160211
24421118321124421139211244
21118321124421160211244211
18321124421193211244211183
21124421160211244211183211
24421139211244211183211244
21160211244211183211244211
23321124421118321124421160
21124421118321124421139211
24421118321124421160211244
21118321124421193211244211
18321124421160211244211183
21124421139211244211183211
24421160211244211183211244
211225211244211183211244211
6021124421118321124421139
21124421118321124421160211
24421118321124421193211244
21118321124421160211244211
18321124421139211244211183
21124421160211244211183211
244211233211244211183211244
21160211244211183211244211
3921124421118321124421160
21124421118321124421193211
24421118321124421160211244
21118321124421139211244211
18321124421160211244211183
211244211170
Table 4.

Decryption using Fermat encoding in forward method

Index = 0Index = 1Index = 2
211 + 3 = 214244 + 3 = 247211 + 3 = 214
214 + 5 = 219247 + 5 = 252214 + 5 = 219
219 + 17 = 236252 + 17 = 13219 + 17 = 236
236 + 1 = 23713 + 1 = 14236 + 1 = 237
237 + 1 = 23814 + 1 = 15237 + 1 = 238
238 + 1 = 23915 + 1 = 16238 + 1 = 239
239 + 1 = 24016 + 1 = 17239 + 1 = 240
240 + 1 = 24117 + 1 = 18240 + 1 = 241
Index = 3Index = 4Index = 5
183 + 3 = 186211 + 3 = 214244 + 3 = 247
186 + 5 = 191214 + 5 = 219247 + 5 = 252
191 + 17 = 208219 + 17 = 236252 + 17 = 13
208 + 1 = 209236 + 1 = 23713 + 1 = 14
209 + 1 = 210237 + 1 = 23814 + 1 = 15
210 + 1 = 211238 + 1 = 23915 + 1 = 16
211 + 1 = 212239 + 1 = 24016 + 1 = 17
212 + 1 = 213240 + 1 = 24117 + 1 = 18
Index = 6Index =7Index = 8
211 + 3 = 21460 + 3 = 63211 + 3 = 214
214 + 5 = 21963 + 5 = 68214 + 5 = 219
219 + 17 = 23668 + 17 = 85219 + 17 = 236
236 + 1 = 23785 + 1 = 86236 + 1 = 237
237 + 1 = 23886 + 1 = 87237 + 1 = 238
238 + 1 = 23987 + 1 = 88238 + 1 = 239
239 + 1 = 24088 + 1 = 89239 + 1 = 240
240 + 1 = 24189 + 1 = 90240 + 1 = 241
………………………………………………
………………………………………………
Index = 247Index =248Index = 249
60 + 3 = 63211 + 3 = 214244 + 3 = 247
63 + 5 = 68214 + 5 = 219247 + 5 = 252
68 + 17 = 85219 + 17 = 236252 + 17 = 13
85 + 1 = 86236 + 1 = 23713 + 1 = 14
86 + 1 = 87237 + 1 = 23814 + 1 = 15
87 + 1 = 88238 + 1 = 23915 + 1 = 16
88 + 1 = 89239 + 1 = 24016 + 1 = 17
89 + 1 = 90240 + 1 = 24117 + 1 = 18
Index = 250Index = 251Index = 252
211 + 3 = 214183 + 3 = 186211 + 3 = 214
214 + 5 = 219186 + 5 = 191214 + 5 = 219
219 + 17 = 236191 + 17 = 208219 + 17 = 236
236 + 1 = 237208 + 1 = 209236 + 1 = 237
237 + 1 = 238209 + 1 = 210237 + 1 = 238
238 + 1 = 239210 + 1 = 211238 + 1 = 239
239 + 1 = 240211 + 1 = 212239 + 1 = 240
240 + 1 = 241212 + 1 = 213240 + 1 = 241
Index =253Index = 254Index = 255
244 + 3 = 247211 + 3 = 214170 + 3 = 173
247 + 5 = 252214 + 5 = 219173 + 5 = 178
252 + 17 = 13219 + 17 = 236178 + 17 = 195
13 + 1 = 14236 + 1 = 237195 + 1 = 196
14 + 1 = 15237 + 1 = 238196 + 1 = 197
15 + 1 = 16238 + 1 = 239197 + 1 = 198
16 + 1 = 17239 + 1 = 240198 + 1 = 199
17 + 1 = 18240 + 1 = 241199 + 1 = 200
Table 5.

Decrypted S-Box

198553721212402261973
1841709114212710915621740
58203302392531286167181
6814596114131248927234
6320622045119134148101176
658316223122424532209
195501041531391221759476
1891867589168125140158111
5319621439242317224165
84701839814712911242219
201562372814255132117103
15067178160811125023225
204614722215510612013792
1731917820229247621134
481936220722144249826
2351776482163118135149100
3320819451230235244174
95771881051521381230241
227181995436213143126108
15772185171903123825213
21641592021449711513087
166180696617916180133116
102151205604622310251233
249317219079154107121136
2103549192212282467124
14115911018774881692432
16225521972153899146128
11316485711822362915254
4321820057
Table 6.

Final Decrypted S-Box

11000110,00110111,00100101,11010100,00000001,
11110000,11100010,00010011,01001001,10111000,
10101010,01011011,10001110,01111111,01101101,
10011100,11011001,00101000,00111010,11001011,
00011110,11101111,11111101,00001100,01010110,
10100111,10110101,01000100,10010001,01100000,
01110010,10000011,11111000,00001001,00011011,
11101010,00111111,11001110,11011100,00101101,
01110111,10000110,10010100,01100101,10110000,
01000001,01010011,10100010,11100111,00010110,
00000100,11110101,00100000,11010001,11000011,
00110010,01101000,10011001,10001011,01111010,
10101111,01011110,01001100,10111101,10111010,
01001011,01011001,10101000,01111101,10001100,
10011110,01101111,00110101,11000100,11010110,
00100111,11110010,00000011,00010001,11100000,
10100101,01010100,01000110,10110111,01100010,
10010011,10000001,01110000,00101010,11011011,
11001001,00111000,11101101,00011100,00001110,
11111111,10000100,01110101,01100111,10010110,
01000011,10110010,10100000,01010001,00001011,
11111010,11101000,00011001,11001100,00111101,
00101111,11011110,10011011,01101010,01111000,
10001001,01011100,10101101,10111111,01001110,
00010100,11100101,11110111,00000110,11010011,
00100010,00110000,11000001,00111110,11001111,
11011101,00101100,11111001,00001000,00011010,
11101011,10110001,01000000,01010010,10100011,
01110110,10000111,10010101,01100100,00100001,
11010000,11000010,00110011,11100110,00010111,
00000101,11110100,10101110,01011111,01001101,
10111100,01101001,10011000,10001010,01111011,
00000000,11110001,11100011,00010010,11000111,
00110110,00100100,11010101,10001111,01111110,
01101100,10011101,01001000,10111001,10101011,
01011010,00011111,11101110,11111100,00001101,
11011000,00101001,00111011,11001010,10010000,
01100001,01110011,10000010,01010111,10100110,
10110100,01000101,01000010,10110011,10100001,
01010000,10000101,01110100,01100110,10010111,
11001101,00111100,00101110,11011111,00001010,
11111011,11101001,00011000,01011101,10101100,
10111110,01001111,10011010,01101011,01111001,
10001000,11010010,00100011,00110001,11000000,
00010101,11100100,11110110,00000111,01111100,
10001101,10011111,01101110,10111011,01001010,
01011000,10101001,11110011,00000010,00010000,
11100001,00110100,11000101,11010111,00100110,
01100011,10010010,10000000,01110001,10100100,
01010101,01000111,10110110,11101100,00011101,
00001111,11111110,00101011,11011010,11001000,
00111001
Table 7.

Comparison of S-boxes

Performance indexAES S-BoxAffine-Power-AffineProposed Scheme
Balance criteriabalancebalancebalance
Differential uniformity(F)444
Non-zero linear structurenonenonenone
Number of terms in S-box algebraic expression9255256
Iterative periodless than 88less than 88256
DOI: https://doi.org/10.2478/ias-2024-0018 | Journal eISSN: 1554-1029 | Journal ISSN: 1554-1010
Language: English
Page range: 266 - 283
Published on: Feb 21, 2025
Published by: Cerebration Science Publishing Co., Limited
In partnership with: Paradigm Publishing Services
Publication frequency: Volume open

© 2025 Md. Hasanujjaman, Partha Sarathi Goswami, published by Cerebration Science Publishing Co., Limited
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License.