Block Cipher's Substitution Box Generation Based on Natural Randomness in Underwater Acoustics and Knight's Tour Chain

The protection of confidential information is a global issue, and block encryption algorithms are the most reliable option for securing data. The famous information theorist, Claude Shannon, has given two desirable characteristics that should exist in a strong cipher which are substitution and permutation in their fundamental research on “Communication Theory of Secrecy Systems.” block ciphers strictly follow the substitution and permutation principle in an iterative manner to generate a ciphertext. The actual strength of the block ciphers against several attacks is entirely based on its substitution characteristic, which is gained by using the substitution box (S-box). In the current literature, algebraic structure-based and chaos-based techniques are highly used for the construction of S-boxes because both these techniques have favourable features for S-box construction but also various attacks of these techniques have been identified including SAT solver, linear and differential attacks, Gröbner-based attacks, XSL attacks, interpolation attacks, XL-based attacks, finite precision effect, chaotic systems degradation, predictability, weak randomness, chaotic discontinuity, and limited control parameters. The main objective of this research is to design a novel technique for the dynamic generation of S-boxes that are safe against the cryptanalysis techniques of algebraic structure-based and chaos-based approaches. True randomness has been universally recognized as the ideal method for cipher primitives design because true random numbers are unpredictable, irreversible, and unreproducible. The biggest challenge we faced during this research was how can we generate the true random numbers and how can true random numbers utilized for strengthening the S-box construction technique. The basic concept of the proposed technique is the extraction of true random bits from underwater acoustic waves and to design a novel technique for the dynamic generation of S-boxes using the chain of knight's tour. Rather than algebraic structure- and chaos-based techniques, our proposed technique depends on inevitable high-quality randomness which exists in underwater acoustics waves. The proposed method satisfies all standard evaluation tests of S-boxes construction and true random numbers generation. Two million bits have been analyzed using the NIST randomness test suite, and the results show that underwater sound waves are an impeccable entropy source for true randomness. Additionally, our dynamically generated S-boxes have better or equal strength, over the latest published S-boxes (2020 to 2021). According to our knowledge first time, this type of research has been conducted, in which natural randomness of underwater acoustic waves has been used for the construction of block cipher's substitution box.


Introduction
Information security is the protection of secret data from illegal access, disclosure, inspection, destruction, disruption, and modification. e protection of confidential information is a global issue and block encryption algorithms are the most reliable option [1]. Block cipher is a branch of deterministic algorithm that works on the static length of bits, which is called block. Block cipher algorithms split the plaintext into various blocks of size k, to generate the same number of encrypted blocks of size n. Block ciphers encrypt one block at a time and the size of the output block is always equal to the input block and the transformation from input block to output block is done through the key whitening operation. Block cipher merged the confusion-diffusion primitives iteratively using a round function to generate an encrypted text. AES, DES, GOST, and BLOWFISH are the most prominent block ciphers of the industry that used the same strategy. For the block encryption algorithms such as AES, GOST, BLOWFISH, DES, and linear-differential attacks are the most powerful attacks [2][3][4][5][6]. In the differential attack, the basic purpose is to detect the sequential patterns from the encrypted text and for this purpose, the attacker tries to apply a specific set of inputs to trace the change in output. In the linear attack, the basic purpose is to find the linear relation among the plain text, cipher text with the corresponding keys. e responsibility to create a randomized relation among ciphertext and the key is on the confusion component; also, the confusion component is totally responsible to provide resistance against the linear and differential attacks [1][2][3][4][5][6][7][8][9][10][11]. Block cipher's confusion component is generally known as substitution (S-box) which transforms k input bits into m output bits through S:{0,1} k ⟶{0,1} m , transforms vector z � [z n-1 , z n-2 , z n-3 . . . z0] into output vector k � [k n-1 , k n-2 , k n-3 ,. . ., k 0 ].
As S-box is the only nonlinear primitive of block cipher, so the block cipher strength depends on its design. Cipher designers used various approaches to construct good quality S-boxes. Chaos-based and algebraic structure-based techniques are highly used for the construction of S-boxes. Chaos-based and algebraic structure-based techniques have favourable features for S-box construction, but many cryptanalysis of these techniques have been identified in the current literature. ese cryptanalysis are described in Section 3. Underwater acoustic is generated by a diverse nature of sound sources such as underwater volcanoes, snapping shrimp, reverberation, vibrating objects, breaking waves, marine life, man-made sources, rain, geological activities, scattering waves, reflection waves, random motion of water molecules, lightning strikes, ice cracking, earthquake, compression, and decompression of water molecules [12][13][14][15][16][17][18][19][20][21][22]. Due to these diverse natures of sound sources, inevitably high-quality randomness exists in the amplitude characteristic of the underwater acoustics, which was our main source of inspiration because true randomness has been universally recognized as the ideal primitive for cryptography. True random numbers (TRNs) are unpredictable, irreversible, and unreproducible that is why cipher researchers endorsed the true random number for cryptographic primitives design [23][24][25][26][27][28][29][30].
e main idea of this research paper is extraction of true random bits from underwater acoustic waves and to design a novel technique for the dynamic generation of cryptographic S-boxes using the chain of knight's tour. e main benefit of our approach is that the proposed technique depends on the natural randomness of underwater acoustic waves for the construction of S-boxes and that's why various existing chaos and algebraic structure-based attacks are bypassed for our proposed technique. e rest of the paper is arranged as follows. Section 2 presents our main contribution. Section 3 shows the potential cryptanalysis and attacks. Section 4 describes the proposed methodology for the dynamic generation of strong S-boxes. Section 5 presents results and discussion. Section 6 shows the conclusion.

Contribution
(i) A novel technique is proposed based on combination selection, for the generation of true random numbers from the randomness which exists in the amplitude property of underwater acoustics. As an assessment, two million bits have been analyzed using the NIST randomness test suite, and results show that underwater acoustic waves are an impeccable entropy source for TRNG. (ii) Knight's tour-based, a novel technique is proposed, for the dynamic generation of S-boxes and as a result attacks of algebraic-and chaos-based techniques are not applicable and irrelevant for our proposed technique. (iii) According to our knowledge first time, this type of research has been conducted, in which natural randomness of underwater acoustic waves has been used for the construction of block cipher's substitution box.

Proposed Methodology
e proposed method consists of two phases, the first phase is true random numbers generation based on underwater acoustics and the second phase is dynamic generation of S-boxes based on Knight's tour chain. Architecture diagram of the proposed system is depicted in Figure 1.

True Random Numbers Generation Based on Underwater
Acoustics. In this phase, first of all, long-term underwater acoustics recordings were acquired from the doi based dataset of the Australian Antarctic Data Centre (AADC) [82]. In the dataset, the average duration of each recording is sixty minutes. Out of thousands of long-term underwater acoustic recordings, we randomly selected the 96 long-term underwater acoustic recordings but proposed technique can take any multiple of 16 files as entropy sources. Secondly, these recordings are divided into blocks of size 16 and then, the amplitude difference of every 0.5 sec is calculated. Due to the diverse nature of sound sources, the difference of each amplitude with other amplitudes is random, and this was our main source of inspiration. Other characteristics of underwater sound like frequency and timber contain lowquality randomness that is why we chose the amplitude characteristic for this research. To calculate the amplitude differences, we used the combination selection strategy by using n!/r! (n-r)! . In our case, the value of the n is 16 and the value of r is 2. e entire step-by-step process of this phase from underwater acoustic files input to the random bits generation is represented in the flowchart of Figure 2. e amplitude differences calculation step is depicted in Figure 3, and here, long-term underwater acoustic recording represented as R 1 , R 2 , . . . R 16 . Two million bits have been analyzed using the NIST randomness test suite and shown in the Table 1, and results of the NIST tests show that underwater acoustics waves are an impeccable entropy source for true randomness. ere are many random extractors based on hash functions, machine learning, chaos machine, physical unclonable functions, and probabilistic methods but among all these types of random extractors. Von Neumann random extractor is the simplest and fastest method that is why we chose Von Neumann random extractor as the postprocessing method.

Dynamic Generation of S-Boxes Based on Knight's Tour
Chain.
e knight's tour is more than a 1400-year-old puzzle game whose objective is to discover the legal moves on the chessboard in the way that it explores every cell only once, and in our proposed methodology, we utilized the chain of 8 × 8 knight's tour for the generation of S-boxes. First of all, true random numbers are acquired and divided into blocks of 64 length size, and then, each 64 length block is converted into the 8 × 8 chessboard matrix. Based on the knight tour rules, we traversed each element of the chessboard matrix; however, only unique elements are considered for S-box elements, and a similar procedure is repeated for coming chessboards until the completion of required length of the S-box. Initial position of the first block of the knight's tour chain is calculated through r � TRNG [0] mod 8, c � TRNG [1] mod 8, and the initial positions of other knights' tour chains are dependent on the second last and the last element of the S-box, which are calculated through r � Sbox [n − 1] mod 8, c � S-box [n] mod 8. e entire step-bystep process of this phase from true random numbers input to dynamic S-boxes generation is represented in the flowchart of Figure 4. is phase is depicted in the following Figure 5. e reverse S-box algorithm is shown in the following (Algorithm 1). From the dynamically generated S-boxes stream, we picked two S-boxes randomly as sample which are shown in Tables 2 and 3, and their reverse S-boxes are also shown in Tables 4 and 5, respectively. e maximum nonlinearity score of our sample S-boxes is higher or equal to the recently published S-boxes (from 2020 to 2021).

Results and Evaluation
In the results and evaluation section, our proposed S-boxes are evaluated by standard S-box evaluation criteria which includes nonlinearity score, bit independence criterion, linear approximation probability, strict avalanche criterion, and differential approximation probability.

Nonlinearity.
Among all cryptographic properties, nonlinearity is the most important one. e main purpose of S-box is to gain nonlinear change from secret message to the ciphered message. For a strong encryption scheme, the mapping between input and output in an S-box must be nonlinear. e nonlinearity of the cryptographic algorithm is represented by the nonlinearity score. Nonlinearity is defined as the smallest difference of the Boolean function to the bunch of affine functions. e nonlinearity score determine the total number of bits altered to get the closest affine function in the Boolean truth table. It calculates the distance between the set of all affine functions and Boolean function. When the initial distance is obtained, the nearest affine function is achieved by inverting the bit values in the truth table of the Boolean function. By using walsh spectrum, the nonlinearity of the Boolean function is computed through [46]: where φ is a n-bit vector and φ ∈ GF(2 n ). x.φ represents the bit-wise dot product of x and φ: Computational Intelligence and Neuroscience S-box having high nonlinearity creates difficult for attacker to perform linear cryptanalysis. e maximum nonlinearity scores of our proposed Sbox-1 and Sbox-2 are 110 and 110, respectively, which is higher or equal to the recently published S-boxes. Detailed comparative analysis is shown in Table 6.

Strict Avalanche Criteria (SAC).
Strict avalanche criteria is the another crucial property for evaluating and according to SAC, if a single input bit is altered, all output bits will shift with probability of 1/2. SAC examined the effects of avalanche affects in encryption scheme. e modification at the input series induces a significant change in output series. SAC computes the number of output bits altered caused by inverting a single bit of input. To make the system more reliable, the output vector needed to be deviate with half probability, when one bit of input is inverted. Dependency matrix is determined to evaluate the SAC property. For an S-box that satisfies SAC property, all values were close to the ideal value of 0.5 in its dependence matrix. Dependency matrix offsets computed through equation (4) [46]. e SAC results of S-box-1 and S-box-2 are shown in Tables 7 and 8 and scores of our S-box-1 and S-box-2 are 0.495 and 0.50, respectively, which are the ideal scores for the secure S-boxes. where

BIT Independent Criterion (BIC)
. BIC requires that all avalanche variables for a given set of avalanche vectors must be pair-wise independent. By modifying the input bits, BIC is used to study the behaviour of the output bits. When the output bits behave independent of one another, the S-box holds the BIC property. If any single input bit i is inverted, BIC states that output bits j and k will alter independently. is will enhance the effectiveness of confusion function. e coefficient of correlation is used to determine the independence among pair of avalanche variables. High bit independence is required to make system design incomprehensible. e bit independence of the j th and k th bits of B ei is [46]: in Tables 9 and 10, we can see that our randomly picked S-box-1 and S-box-2 fully fill the BIT independent criterion.

Computational Intelligence and Neuroscience
where c1 and c2 represents the input and output mask in the above expression. Linear approximation probability is calculated by using these masks. X represents the set of all possible inputs and 2 n is the total number of elements in the set. S-box with low LP value is robust enough against different linear approximation attacks.

Differential Approximation Probability (DP).
e resistance of S-box to the differential attacks is assessed through the DP. DP is the probability of particular change in output bits caused by the change in input bits. An S-box must possess differential uniformity which means that each input differential is connected to the specific output differential. e XOR values of all output must have equal probability to the XOR values of all input. e differential uniformity is measured by given expression [46]: where X represents the set of all possible input values and 2 n is the total number of elements in set. e maximum differential probability value a system could achieve is 4/256. e lowest value of DP means the high security of the S-box against differential approximation attacks. In Tables 11 and  12, we can see that our randomly picked S-box-1 and S-box-2 fully fill the DP criterion.      Computational Intelligence and Neuroscience 13

Conclusion
e protection of confidential information is a global issue, and block encryption algorithms are the most reliable option. e actual strength of the block encryption algorithms against several attacks is entirely dependent on S-boxes. Currently in the literature, algebraic structure-based and chaos-based techniques are highly used for the construction of S-boxes because both these techniques have favourable features for S-box construction, but many attacks of these techniques have been identified. In this paper, we purposed a novel technique for the dynamic generation of S-boxes that is safe against the existing attacks of algebraic structurebased and chaos-based techniques. True randomness has been universally recognized as the ideal method for security primitive because true random numbers are unpredictable, irreversible, and unreproducible. Rather than algebraic structure-and chaos-based techniques, our proposed technique depends on inevitable high-quality randomness which exists in underwater acoustics waves. According to our knowledge first time, this type of research has been conducted, in which natural randomness of underwater acoustic waves and knight's tour problem has been used for the generation of block cipher's substitution box. e proposed method satisfies all standard evaluation tests of S-boxes construction and true random numbers generation. Additionally, our dynamically generated S-boxes have better or equal strength, over the latest published S-boxes (2020 to 2021). In the future, we will extend this research for automatic key generation and optimization using knight's tour.

Data Availability
e datasets analyzed during the current study are available in the Australian Antarctic Data Centre repository at https:// data.aad.gov.au/metadata/records/ AAS_4102_longTermAcousticRecordings.

Conflicts of Interest
e authors declare no conflicts of interest.