Strike: Stream Cipher Based on Stochastic Lightning Strike Behaviour
Abstract
:1. Introduction
2. Preliminaries
2.1. Stream Ciphers
2.2. Lightning Strike Phenomena
3. Related Works
4. The Proposed Stream Cipher (Strike)
4.1. Mathematical Model of Strike Cipher
4.2. Detailed Design of Strike Stream Cipher
4.2.1. Security Parameters Setup
- Extract bits from SKey and IVec to be assigned to all other parameters, such that SKey bits from 0–55 are assigned to the parameters a, b, c, r, j, and s sequentially.
- Initialise the peak current intervals (PCi) using the SKey bits from 56–119.
- Initialise the KSC parameter using the remaining SKey bits from 120–127, which will later help in shifting the SKey.
- Initialise the Imean parameter using the IVec bits from 0–7.
- Extract the IVec bits from 8–15 and 16–23 to initialise Istd and IVSC, respectively.
- Extract the remaining IVec bits from 24–31 to initialise iclasses parameter.
- Initialise the coordinates of the lightning strike using Equations (4)–(6).
Algorithm 1 Skey/IVec Setup | |
01: 02: | Input: 128-bit value SKey 32-bit value IVec Output: 8-bit values a, b, c, r, j, s 8-bit values KSC, Imean, Istd, IVSC, iclasses 16-bit values PC1, PC2, PC3, PC4 16-bit values x0, y0, h0 |
03: | // extract Secrete Key (SKey) parameters |
04: | a = SKey[bit_0–bit_7] |
05: | b = SKey[bit_8–bit_15] |
06: | c = SKey[bit_16–bit_23] |
07: | r = (SKey[bit_24–bit_31] + SKey[bit_32–bit_39]) mod 255 |
08: | j = SKey[bit_40–bit_47] |
09: | s = SKey[bit_48–bit_55] |
10: | // initialize the min and max peak currents of each PC interval |
11: | function Calculate_PCs (SKey) |
12: | PC1 = [I_min = Min (SKey[bit_56–bit_63], SKey[bit_64–bit_71]), I_max = Max (SKey[bit_56–bit_63], SKey[bit_64–bit_71])] |
13: | PC2 = [I_min = Min (SKey[bit_72–bit_79], SKey[bit_80–bit_87]), I_max = Max (SKey[bit_72–bit_79], SKey[bit_80–bit_87])] |
14: | PC3 = [I_min = Min (SKey[bit_88–bit_95], SKey[bit_96–bit_103]), I_max = Max (SKey[bit_88–bit_95], SKey[bit_96–bit_103])] |
15: | PC4 = [I_min = Min (SKey[bit_104–bit_111], SKey[bit_112–bit_119]), I_max = Max (SKey[bit_104–bit_111], SKey[bit_112–bit_119])] |
16: | end function |
17: | KSC = SKey[bit_120–bit_127] |
18: | // extract Initial Vector (IVec) parameters |
19: | Imean = IVec[bit_0–bit_7] |
20: | Istd = IVec[bit_8–bit_15] |
21: | IVSC = IVec[bit_16–bit_23] |
22: | iclasses = IVec[bit_24–bit_31] |
23: | // calculate the initial lightning strike coordinates over 3D space |
24: | function Initialize_Coord (a, b, c, r) |
25: | x0 = ra |
26: | y0 = rb |
27: | h0 = rc |
28: | end function |
29: | //calculate span of each class in each PC |
30: | function Generate_Classes (PC1, PC2, PC3, PC4, iclasses) |
31: | for PC = 1 to PC = 4 do |
32: | PC_span_I[PC] = (I_max − I_min)/iclasses |
33: | end for |
34: | // generate peak current classes for each PC interval |
35: | for PC = 1 to PC = 4 do |
36: | for cls = 1 to cls = iclasses do |
37: | iclass_I_min = I_min[PC] + (iclasses − 1)PC_span_I[PC] |
38: | iclass_I_max = iclass_I_min + PC_span_I[PC] |
39: | end for |
40: | end for |
41: | end function |
4.2.2. Keystream Generation
Algorithm 2 Keystream Generation (Lightning Strike Generator) | |
01: | Input: 8-bit values Imean, Istd 16-bit value PC1, PC2, PC3, PC4, x0, y0, h0 |
02: | Output: 16-bit value Kstream |
03: | // select a peak current from each PC interval |
04: | I1 = iclass_I_max(PC1, s mod iclasses) |
05: | I2 = iclass_I_min(PC2, s mod iclasses) |
06: | I3 = iclass_I_max(PC3, s mod iclasses) |
07: | I4 = iclass_I_min(PC4, s mod iclasses) |
08: | // calculate the final peak current I |
09: | I = I1 I1 I1 I1 |
10: | // calculate the probability density function of all selected currents |
11: | u1 = ((log(I1) − log(Imean))/(sqrt(2) Istd) |
12: | u2 = ((log(I2) − log(Imean))/(sqrt(2) Istd) |
13: | u3 = ((log(I3) − log(Imean))/(sqrt(2) Istd) |
14: | u4 = ((log(I4) − log(Imean))/(sqrt(2) Istd) |
15: | init = 1 − (2/sqrt(Pi)) |
16: | sum = 0 |
17: | for i = 1 to i = 4 do |
18: | for n = 0 to n = 10 do |
19: | sum = sum + ((−1)^n (ui)^(2n + 1)/(n! (2n + 1)) |
20: | end for |
21: | erfc[i] = init sum |
22: | end for |
23: | for i = 1 to n = 4 do |
24: | P[i] = 1 erfc[i] |
25: | end for |
26: | // concatenate P[i] to generate 4-bit TP value |
27: | TP = P [1] || P [2] || P [3] || P [4] |
28: | // calculate the distance of each jump |
29: | R = 10 (TP I^(cos(Imean + Istd)) |
30: | // re-calculate the new coordinates of stepped leader head |
31: | for i = 1 to i = j do |
32: | phij−1 = r (2 Pi) |
33: | sigmaj−1 = (r + 1) (Pi/2) |
34: | xj = xj−1 + R sin(sigmaj−1) cos(Phij−1) |
35: | yj = yj−1 + R sin(sigmaj−1) sin(Phij−1) |
36: | hj = hj−1 + R cos(sigmaj−1) |
37: | end for |
38: | // calculate the keystream (Kstream) of 16-bit length |
39: | Kstream = (xj yj hj) << TP |
40: | // shuffle security parameters |
41: | r << KSC |
42: | j >> KSC |
43: | s << KSC |
44: | Skey >> KSC |
45: | Imean << IVSC |
46: | Istd >> IVSC |
47: | Iclasses << IVSC |
48: | IVSC >> KSC |
49: | KSC << IVSC |
50: | // re-calculate PC1-PC4 |
51: | Calculate_PCs (SKey) |
52: | // re-initialize coordinates |
53: | a = SKey[bit_0–bit_7] |
54: | b = SKey[bit_8–bit_15] |
55: | c = SKey[bit_16–bit_23] |
56: | Initialize_Coord (a, b, c, r) |
57: | // re-generate peak current classes |
58: | Generate_Classes (PC1, PC2, PC3, PC4, iclasses) |
4.2.3. Data Encryption
Algorithm 3 Encryption | |
01: 02: | Input: 16-bit values PText, Kstream Output: 16-bit values CText |
03: | //use Kstream to be exclusively or’ed with plaintext PText |
04: | while PText != null do |
05: | for bit = 0 to bit = 15 do |
06: | CText[bit] = PText[bit] Kstream[bit] |
07: | end for |
08: | //generate more SSK by the four threads |
09: | Keystream_Generation() |
10: | end while |
5. Security Analysis of Strike
5.1. Statistical Tests and Balance
5.2. Avalanche Effect
5.3. Cryptanalysis Attacks
5.3.1. Brute-Force Attacks
5.3.2. Known-Plaintext Attack
5.3.3. Ciphertext-Only Attack
5.3.4. Differential Attack
6. Complexity and Performance Analysis
7. Conclusions and Future Works
Author Contributions
Funding
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
Abbreviation | Description |
IoT | Internet of Things |
ECRYPT | European Network of Excellence for Cryptology |
NIST | National Institute of Standards and Technology |
XOR | Exclusive-OR |
TLS | Transport Layer Security |
4G | Fourth Generation Communication |
RFID | Radio-Frequency IDentification |
LFSR | Linear Feedback Shift Register |
PRNG | Pseudo Random Number Generator |
CML | Coupled Map Lattice |
LE | Lyapunov exponents |
IES | Image encryption structure |
PSNR | Peak signal-to-noise ratio |
GA | Genetic Algorithm |
NFSR | Nonlinear feedback shift registers |
LESCA | LightwEight Stream Cipher Algorithm |
WLAN | Wireless Local Area Network |
HTTPS | Hypertext Transfer Protocol |
Mathematical Symbol | Description |
a change in the value of I in calculus. | |
Standard deviation | |
Phi (approx. 1.61803.) | |
Exclusive-OR operation | |
Summation | |
limit | |
log | logarithm |
sqrt | Square root |
sin | trigonometric functions of an angle |
cos | trigonometric functions of an angle |
p-value | Probability-value |
References
- Atawneh, B.; Abutaha, M.; Al-hammoury, L. Power Consumption of a Chaos-Based Stream Cipher Algorithm. In Proceedings of the 3rd International Conference on Computer Applications & Information Security, Riyadh, Saudi Arabia, 19–21 March 2020. [Google Scholar] [CrossRef]
- Vavrenyuk, A.B.; Makarov, V.V.; Shurygin, V.A. Synchronous Stream Encryption Using an Additional Channel to Set the Key. Procedia Comput. Sci. 2021, 190, 797–802. [Google Scholar] [CrossRef]
- ECRYPT Stream Cipher Project, March 2012. Available online: https://www.ecrypt.eu.org/stream/ (accessed on 20 September 2022).
- Armknecht, F.; Mikhalev, V. On Lightweight Stream Ciphers with Shorter Internal States. In Fast Software Encryption; International Workshop on Fast Software Encryption; Springer: Berlin/Heidelberg, Germany, 2015. [Google Scholar] [CrossRef] [Green Version]
- Ghafari, V.A.; Hu, H. Fruit-80: A Secure Ultra-Lightweight Stream Cipher for Constrained Environments. Entropy 2018, 20, 180. [Google Scholar] [CrossRef] [Green Version]
- Hamannm, M.; Krause, M.; Meier, W. LIZARD—A Lightweight Stream Cipher for Power-Constrained Devices. IACR Trans. Symmetric Cryptol. 2017, 2017, 45–79. [Google Scholar] [CrossRef]
- Mikhalev, V.; Armknecht, F.; Müller, C. On Ciphers That Continuously Access the Non-Volatile Key. IACR Trans. Symmetric Cryptol. 2016, 2016, 52–79. [Google Scholar] [CrossRef]
- Cannière, C. Trivium: A Stream Cipher Construction Inspired by Block Cipher Design Principles. Lect. Notes Comput. Sci. 2006, 4176, 71–186. [Google Scholar] [CrossRef] [Green Version]
- Babbage, S.; Dodd, M. The Stream Cipher MICKEY 2.0. December 2022. Available online: http://www.ecrypt.eu.org/stream/p3ciphers/mickey/mickey_p3.pdf (accessed on 10 November 2022).
- Ågren, M.; Hell, M.; Johansson, T.; Meier, W. Grain-128a: A New Version of Grain-128 with Optional. Int. J. Wirel. Mob. Comput. 2011, 5, 48–59. [Google Scholar] [CrossRef] [Green Version]
- Mihaljevic, M.; Gangopadhyay, S.; Paul, G.; Imai, H. Generic Cryptographic Weakness of K-Normal Boolean Functions in Certain Stream Ciphers and Cryptanalysis of Grain-128. Period. Math. Hung 2012, 65, 205–227. [Google Scholar] [CrossRef]
- Stankovski, P. Greedy Distinguishers and Nonrandomness Detectors. Lect. Notes Comput. Sci. 2010, 6498, 210–226. [Google Scholar] [CrossRef] [Green Version]
- Almanasra, S. Parallel Platform for Supporting Stream Ciphers Over Multi-core Processors. Int. J. Adv. Comput. Sci. Appl. 2019, 10, 181–190. [Google Scholar] [CrossRef] [Green Version]
- Daldoul, I.; Tlili, S. Secured Transmission Design Schemes Based On Chaotic Synchronization and Optimal High Gain Observers. Simul. Model. Pract. Theory 2022, 120, 102625. [Google Scholar] [CrossRef]
- Ding, L.; Liu, C.; Zhang, Y.; Ding, Q. A New Lightweight Stream Cipher Based on Chaos. Symmetry 2019, 11, 853. [Google Scholar] [CrossRef] [Green Version]
- Turan, M.; McKay, K.; Chang, D.; Calik, C.; Bassham, L.; Kang, J.; Kelsey, J.E. Status Report on the Second Round of the NIST Lightweight Cryptography Standardization Process; National Institute of Standards and Technology: Gaithersburg, MD, USA, 2021. [CrossRef]
- Noura, H.; Salman, O.; Couturier, R.; Chehab, A. LESCA: LightwEight Stream Cipher Algorithm for Emerging Systems. Ad Hoc Netw. 2023, 138, 102999. [Google Scholar] [CrossRef]
- Sarajčev, I.; Sarajčev, P.; Vujević, S. Mathematical Model of Lightning Stroke Development. In Proceedings of the 16th International Conference on Software, Telecommunications and Computer Networks, Split, Croatia, 25–27 September 2008. [Google Scholar] [CrossRef]
- Aumasson, J. Serious Cryptography: A Practical Introduction to Modern Encryption; No Starch Press: San Francisco, CA, USA, 2018; ISSN 978-1593278267. [Google Scholar]
- Rakov, V.; Uman, M. Lightning: Physics and Effects; Cambridge University Press: Cambridge, UK, 2007; ISSN 9780521035415. [Google Scholar]
- Golde, R.H. Lightning, Volume 1: Physiscs of Lightning; Academic Press: London, UK, 1977; ISSN 978-0122878015. [Google Scholar]
- Su, R.; Wang, J.; Cai, L.; Zhou, M.; Fan, Y.; Cao, J.; Wang, F.; Wang, J. Characteristics of Dart Leader and Attempted Leader in A Triggered Lightning. Electr. Power Syst. Res. 2023, 214, 108812. [Google Scholar] [CrossRef]
- IEC. Protection against Lightning—Part 1: General Principles; IEC: Geneva, Switzerland, 2006. [Google Scholar]
- Ghasemi, F.; Babaie, S. A lightweight Secure Authentication Approach Based on Stream Ciphering for RFID-based Internet of Things. Comput. Electr. Eng. 2022, 102, 108288. [Google Scholar] [CrossRef]
- Ding, Y.; Tan, F.; Qin, Z.; Cao, M.; Choo, R.; Qin, Z. DeepKeyGen: A Deep Learning-Based Stream Cipher Generator for Medical Image Encryption and Decryption. IEEE Trans. Neural Netw. Learn. Syst. 2022, 33, 4915–4929. [Google Scholar] [CrossRef] [PubMed]
- Fan, C.; Ding, Q. A Novel Image Encryption Scheme Based On Self-Synchronous Chaotic Stream Cipher and Wavelet Transform. Entropy 2018, 20, 445. [Google Scholar] [CrossRef] [Green Version]
- Hasan, F.S.; Saffo, M.A. FPGA Hardware Co-Simulation of Image Encryption Using Stream Cipher Based on Chaotic Maps. Sens. Imaging 2020, 12, 35. [Google Scholar] [CrossRef]
- Liu, Z.; Wang, Y.; Zhao, Y.; Zhang, L. A Stream Cipher Algorithm Based On 2D Coupled Map Lattice and Partitioned Cellular Automata. Nonlinear Dyn. 2020, 101, 1383–1396. [Google Scholar] [CrossRef]
- Noura, H.N.; Salman, O.; Couturier, R.; Chehab, A. LoRCA: Lightweight Round Block and Stream Cipher Algorithms for IoV Systems. Veh. Commun. 2022, 34, 100416. [Google Scholar] [CrossRef]
- Khedr, W.I. A New Efficient and Configurable Image Encryption Structure for Secure Transmission. Multimed. Tools Appl. 2020, 79, 16797–16821. [Google Scholar] [CrossRef]
- Sudeepa, K.B.; Aithal, G.; Rajinikanth, V.; Satapathy, S.C. Genetic Algorithm Based Key Sequence Generation for Cipher System. Pattern Recognit. Lett. 2020, 133, 341–348. [Google Scholar] [CrossRef]
- Zheng, J.; Hu, H. A Highly Secure Stream Cipher Based on Analog-Digital Hybrid Chaotic System. Inf. Sci. 2022, 587, 226–246. [Google Scholar] [CrossRef]
- Belmeguenai, A.; Ahmida, Z.; Ouchtati, S.; Djemii, R. A Novel Approach Based On Stream Cipher for Selective Speech Encryption. Int. J. Speech Technol. 2017, 20, 685–698. [Google Scholar] [CrossRef]
- Suwais, K. Stream Cipher Based on Game Theory and DNA Coding. Intell. Autom. Soft Comput. 2022, 33, 1815–1834. [Google Scholar] [CrossRef]
- Maksymovych, V.; Shabatura, M.; Harasymchuk, O.; Shevchuk, R.; Sawicki, P.; Zajac, T. Combined Pseudo-Random Sequence Generator for Cybersecurity. Sensors 2022, 22, 9700. [Google Scholar] [CrossRef]
- Rukhin, A.; Soto, J.; Nechvatal, J. A Statistical Test Suite for Random and Pseudorandom Number Generators for Cryptographic Applications; National Institute of Standards and Technology: Gaithersburg, MD, USA, 2010.
- Kuznetsov, O.; Potii, O.; Perepelitsyn, A.; Ivanenko, D.; Poluyanenko, N. Lightweight Stream Ciphers for Green IT Engineering. In Green IT Engineering: Social, Business and Industrial Applications; Studies in Systems, Decision and Control; Springer: Berlin/Heidelberg, Germany, 2019; Volume 171. [Google Scholar] [CrossRef]
Stoke Type | ||
---|---|---|
61.1 | 0.576 | −stroke (less than 20 kA) |
33.3 | 0.263 | −stroke (greater than 20 kA) |
33.9 | 0.527 | +stroke |
Work | Method(s) | Limitation |
---|---|---|
[6] | Self-shrinking generator method | Efficient as hardware implementation, but it is not suitable for applications that require high-speed encryption rates |
[15] | Chaotic system in conjunction with two NFSRs | Low encryption speed, which makes it unsuitable for high-speed encryption-based applications. |
[17] | Round function and permutation table | Limited potential application for secure high-speed communication. |
[24] | And2LFSR, Geffe and majority-based | Performance is affected by the kind of error control code, nonlinear combinational functions and the degree of the generator polynomial |
[25] | Deep learning–based key generation network | Lack of performance analysis to examine the algorithm’s efficiency |
[26] | 2D discrete wavelet transforms and the Arnold mapping algorithm | Lack of performance analysis to examine the algorithm’s efficiency |
[27] | Fixed-point chaotic maps | Low performance and lack of sufficient statistical testing. |
[28] | Two-dimensional coupled map lattice | Low encryption speed, which makes it unsuitable for high-speed encryption-based applications. |
[29] | Dynamic key-dependent structure | Lack of performance analysis to examine the algorithm’s efficiency. |
[30] | Chaos-based cryptosystem | Suitable for highly secure applications that do not require high throughput rates. |
[31] | LFSR and a genetic algorithm | Lack of performance analysis to examine the algorithm’s efficiency |
[32] | Analogue–digital hybrid chaotic system | Lack of performance analysis to examine the algorithm’s efficiency |
[33] | PRNG based on two 256-bit shift registers | Lack of performance analysis to examine the algorithm’s efficiency |
Parameter | Length | Description |
---|---|---|
SKey | 128-bit | Secret key |
IVec | 32-bit | Initial vector |
a | 8-bit | x-coordinate on ground |
b | 8-bit | y-coordinate on ground |
c | 8-bit | z-coordinate in sky |
r | 8-bit | Random number |
j | 8-bit | Number of jumps composing the lightning strike |
s | 8-bit | The order number of selected class in PCi |
PC1–PC4 | 16-bit/each | Peak current intervals |
KSC | 8-bit | Skey shifting controller |
Imean | 8-bit | Mean value of current I |
Istd | 8-bit | Standard deviation of current I |
IVSC | 8-bit | IVec shifting controller |
iclasses | 8-bit | Total number of classes in each PCi |
Kstream | 16-bit | Keystream binary bits |
Ctext | 16-bit | Ciphertext binary bits |
Ptext | 16-bit | Plaintext binary bits |
TP | 4-bit | Total peak value |
Test | p-Value | Passing Rate | Decision |
---|---|---|---|
Frequency | 0.098956 | 0.994 | passed |
Serial | 0.589774 | 0.991 | passed |
Block frequency | 0.333145 | 0.985 | passed |
Random excursion | 0.228764 | 0.991 | passed |
Approximate entropy | 0.839894 | 0.982 | passed |
Universal | 0.598752 | 0.991 | passed |
FFT | 0.021888 | 0.981 | passed |
Longest run | 0.129204 | 0.982 | passed |
Linear complexity | 0.456098 | 0.988 | passed |
Rank | 0.098780 | 0.986 | passed |
Random excursion variant | 0.333248 | 0.992 | passed |
Overlapping templates | 0.506503 | 0.988 | passed |
Non-overlapping templates | 0.229941 | 0.981 | passed |
Cumulative sums | 0.377852 | 0.983 | passed |
Runs | 0.187012 | 0.991 | passed |
# of Kstream | 500 |
Minimum % of changes on Kstream | 70% |
Maximum % of changes on Kstream | 77% |
Avg. % of changes on Kstream | 73.56% |
Security Parameter Setup | Lightning Strike Generator | Data Encryption | |
---|---|---|---|
Complexity | O(logn) | O(n) | O(nlogn) |
Processor | RAM Memory | Storage Capacity | Operating System | |
---|---|---|---|---|
Machine 1 (M1) | Intel Core i7® | 6 GB | 500 GB HDD, 128 GB SSD | Windows 10® |
Machine 2 (M2) | Intel Core i5® | 4 GB | 500 GB HDD, 128 GB SSD | Windows 10® |
Machine 3 (M3) | Intel Core i3® | 2 GB | 500 GB HDD | Windows 10® |
Machine 4 (M4) | Intel Celeron® | 2 GB | 500 GB HDD | Windows 10® |
Cipher | Throughput (Mbit/s) | Ratio of Efficiency |
---|---|---|
Strike | 22,796.4 | - |
(Liu et al., 2020) [28] | 22,222.2 | 2.5% |
Snow 2.0–128 | 22,026.4 | 3.4% |
Trivium | 10,026.7 | 56.0% |
Salsa-20 | 7987.2 | 65.0% |
AES-128 | 6581.8 | 71.1% |
HC-128 | 5980 | 73.8% |
Mickey-128 | 192.4 | 99.2% |
Grain | 13.8 | 99.9% |
M1 | M2 | M3 | M4 | |
---|---|---|---|---|
Throughput (Mbit/s) | 22,796.4 | 22,287.1 | 21,998.9 | 21,143.5 |
Efficiency Ratio | - | −2.23% | −3.5% | −7.25% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Suwais, K.; Almanasra, S. Strike: Stream Cipher Based on Stochastic Lightning Strike Behaviour. Appl. Sci. 2023, 13, 4669. https://doi.org/10.3390/app13084669
Suwais K, Almanasra S. Strike: Stream Cipher Based on Stochastic Lightning Strike Behaviour. Applied Sciences. 2023; 13(8):4669. https://doi.org/10.3390/app13084669
Chicago/Turabian StyleSuwais, Khaled, and Sally Almanasra. 2023. "Strike: Stream Cipher Based on Stochastic Lightning Strike Behaviour" Applied Sciences 13, no. 8: 4669. https://doi.org/10.3390/app13084669
APA StyleSuwais, K., & Almanasra, S. (2023). Strike: Stream Cipher Based on Stochastic Lightning Strike Behaviour. Applied Sciences, 13(8), 4669. https://doi.org/10.3390/app13084669