A Robust Hash Function Using Cross-Coupled Chaotic Maps with Absolute-Valued Sinusoidal Nonlinearity

This paper presents a compact and effective chaosbased keyed hash function implemented by a cross-coupled topology of chaotic maps, which employs absolute-value of sinusoidal nonlinearity, and offers robust chaotic regions over broad parameter spaces with high degree of randomness through chaoticity measurements using the Lyapunov exponent. Hash function operations involve an initial stage when the chaotic map accepts initial conditions and a hashing stage that accepts input messages and generates the alterable-length hash values. Hashing performances are evaluated in terms of original message condition changes, statistical analyses, and collision analyses. The results of hashing performances show that the mean changed probabilities are very close to 50%, and the mean number of bit changes is also close to a half of hash value lengths. The collision tests reveal the mean absolute difference of each character values for the hash values of 128, 160 and 256 bits are close to the ideal value of 85.43. The proposed keyed hash function enhances the collision resistance, comparing to MD5 and SHA1, and the other complicated chaos-based approaches. An implementation of hash function Android application is demonstrated. Keywords—Hash Function; Cross-Coupled Chaotic Map; Sinusoidal Nonlinearity; Information security; Authentication


I. INTRODUCTION
The advancement in communication technologies have led to a great demand in reliable and robust information security, involving data confidentiality, verification of data integrity, authentication and non-repudiation of origin [1].A hash function, which encodes an arbitrary length input message into a hash value with a fixed length, has played an important role in advanced information security, particularly including in cryptography and secure protocol methods.As for security purposes, the desirable performances of hash functions include high possibility of collision resistance and high security against preimage and second-preimage attacks.
The typical MD4, MD5, and SHA-1 hashing algorithms have extensively been realized in software industries for integrity verification of electronically transmitted files as well as security in protocols.Such typical hash functions are designed based on logical operations or multi-round iterations and therefore the hashing process efficiency depends upon inherent ciphers which necessarily require complicated computation processes.Moreover, it has been notified recently through the collision frequency analysis that those typical hash functions contain several undiscovered flaws [2].In order to overcome such flaws, the multiple-block-length hash functions have been suggested [3][4][5].Nonetheless, the implementation of such multiple-block-length hash functions is complicated in terms of security and computation processes.
As a ubiquitous aspect in nature, chaos is a deterministic nonlinear dynamical system that possesses distinctive properties, mainly involving pseudo-randomness and sensitivity to initial conditions and control parameters.With such properties, chaos-based hash algorithms have consequently been of much interest as an alternative to those of typical hash functions.Several chaos-based hash function algorithms have been proposed recently [6][7][8][9].Despite the fact that these algorithms have offered satisfied statistical performances in terms of statistical performance and collision resistance, the difficulty in small key space, flexibility, low performance, and weak security functions are obstacles that elevate an attempt in designing efficient and secure hash functions.Furthermore, structural topologies of existing algorithms are somewhat complex as evident from multiple maps, multi-stage connections, or multiple feedback loops, leading to complicated signal processing and extensive iteration time.
As for compact and effective chaos-based hash function implementations, this paper presents a new alternative in both chaotic map and hash function topology.The proposed chaotic map employs absolute-value of sinusoidal nonlinearity and offers robust chaotic regions over broad parameter spaces with high degree of randomness through chaoticity measurements using the Lyapunov exponent.The proposed hash function is implemented by a cross-coupled topology.Hash function operations involve an initial stage when the chaotic map accepts initial conditions and input messages in ASCII format, and a hashing stage that accepts input messages and generates the alterable-length hash values.Hashing performances are evaluated in terms of original message condition changes, statistical analyses, and collision analyses.The proposed keyed hash function enhances the collision resistance, comparing www.ijacsa.thesai.org to MD5 and SHA1, and is comparable to other complicated chaos-based approaches.

II. PROPOSED CHAOTIC MAP USING ABSOLUTE SINUSOIDAL NONLINEARITY
A sinusoidal function typically contains an inherent infinite and complex nonlinearity described by an infinite Maclaurin series as follows; Such a sinusoidal function in (1) has therefore been utilized as a potential inherent nonlinearity in various chaotic maps.Unlike a single-modal chaotic map, i.e. a logistic map, or another family of multi-modal chaotic maps based on polynomial functions which comprises several mathematical terms, the sinusoidal function potentially provides complex chaotic time series with unique dynamical characteristics.
Table 1 summarizes related chaotic maps implemented based on sinusoidal functions.As for an attempt of using sinusoidal function in a particular application on a hash function design where the input is an ASCII code with values in the region of 32 to 126, the typical sine map in [10] limits the system parameter in the range of (0,4).Although the Iterative Chaotic Map with Infinite Collapses in [11] potentially offers an infinite parameter space, the output time series swing over the values (-1,1) and it consequently may not be suitable for value normalization in parameter space where the previous value is zero.Moreover, other chaotic maps in [12][13][14][15][16] require complicated mathematical models with morethan-one parameter spaces, resulting in the complex process of parameter optimization.This paper therefore presents a one-dimensional sinusoidal chaotic map in combination with absolute-value nonlinearity given by where parameters ω and φ are frequency and phase shift, respectively.The absolute-value nonlinearity is suggested in order to limit the output values in the range of zero to one.
Fig. 1 shows the detailed block diagram of the proposed absolute sinusoidal chaotic map described in (1).It is seen from Fig. 1 that the output is delayed and fed back through the absolute sinusoidal nonlinearity for each iteration for generating chaotic signals.In particular, the two parameters that significantly set dynamic behaviors are frequency and phase shift.In order to primarily analyze the complex dynamics of the proposed chaotic map, the bifurcation diagram is employed as a tool for a qualitative measure.The bifurcation diagram shows a period doubling that accompanies the onset of chaos, and also represents the sudden appearance of a qualitatively different solution for a nonlinear system as some parameter is varied.On the other hand, the positive Lyapunov exponent (λ) is realized as a tool for a quantitative measure.The Lyapunov exponent characterizes the rate of separation of infinitesimally close trajectories, and can be described as where ∆x o is an initial separation of the two trajectories in phase space.Typically, the cases where λ < 0 and λ = 0 indicate that the orbit attracts to a stable fixed point or stable periodic orbit and a neutral fixed point, respectively.In the particular case where λ > 0, the orbit is unstable and the system exhibits chaotic orbits.
In order to investigate chaotic dynamics of the proposed chaotic map, simulations have been performed in MATLAB where initial conditions were set to 0.1 for all cases.Fig. 1 shows bifurcating structures of the proposed chaotic map, which are obtained from the positive Lyapunov exponent, i.e. the dark-color region represents chaotic behaviors where λ > 0 while the white region represents non-chaotic behaviors where λ = 0 or λ < 0. Primary investigations on effects of values of parameters α and ω on chaotic dynamics were particularly performed in the region [0, 10] while the phase shift is in the region [0, π].Noted that the chaotic behaviors for the phase shift in the region [π, 2π] completely resemble the dynamics in those of region [0, π].In Figs. 2 (a) and (b), the values of the gain α were respectively fixed at 1 and 10, and the parameters ω and φ were scanned.In Figs. 2 (c) and (d), the values of phase shift φ were respectively fixed at 0 Radian and π Radian, and the parameters α and ω were scanned.Finally, the value of frequency ω was fixed at 10 rad/s while the parameters α and φ were scanned in Figs. 2 (e) and (f).It can be concluded from Fig. 1 that the proposed chaotic map has a unique pattern of bifurcation structure.The frequency and phase shift are two parameters that significantly set such bifurcation patterns while the gain potentially provide an increase in chaos region.In addition, the proposed chaotic map offers relatively robust chaos over most of the entire parameter spaces, and hence high-complexity operations of the hash function.The selection of parameter values of chaotic map should be in that of darkcolor regions in order to guarantee chaotic outputs under most of iteration processes.It should be emphasized in Figs. 2 (a) and (b) that the phase shift can be set at zero since chaotic dynamics are still apparent.Upon setting the fixed phase shift at zero Radian, Figs. 3 (a) and (b) illustrates the bifurcating diagram and Lyapunov spectrum of the proposed chaotic map for the cases α=1 and α=10, respectively.It can be considered from Fig. 3 (a) that the maximum values of the outputs fall within the range [0,1] while the maximum values of Fig. 3 (b) increases correspondingly to an amplifying gain of α=10 in each iteration.Nonetheless, there has no significant difference in terms of chaoticity measured by the positive Lyapunov exponent.As a result, the frequency is a major parameter that www.ijacsa.thesai.orgdetermines chaotic dynamics and the gain can be arbitrarily set to any values based on required conditions with no changes in complexity.

III. PROPOSED KEYED HASH FUNCTION
The whole structure of the proposed hashing scheme is depicted in Fig. 5. Assuming that a 128-bit hash value is required, the procedures for generating hash values are described as follows: (1) The secret keys of the algorithm include the selected initial conditions y 0,1 and y 0,2 .
(2) The original message M is padded such that its length is a multiple of 2. www.ijacsa.thesai.org(3) The padded message is divided into 2 sub-blocks of length S, ω i,1 and ω i,2 , where i = 1, ..., S.
(4) For the input stage, S iterations are needed for the absolute sine map with the intention of generating the intermediate output.The first iterations after initial stage are

A. Uniform Distribution of Hash Value
The uniform distribution of hexadecimal hash value is the crucial property of hashing scheme.In Fig. 6 interval between 97 and 122.On the contrary, the hash values of the hashing scheme are uniformly spread over the possible range of hash values as illustrated in Fig. 6(b).This signifies that no information of the original message remains after the hashing process.

B. Sensitivity to Small Changes in Message and Initial Conditions
This subsection depicts the high sensitivity of the proposed hashing function to small changes in original messages and initial conditions.In order to explore this issue, the following tests have particularly been verified.
C 1 : The original message is: "Sensitivity of hash value to the message and initial conditions.".

C. Confusion and Diffusion
Strong confusion and diffusion properties of the hashing scheme are essential to make it durable to most attacks.The purpose of diffusion is to disperse the hash values randomly over the possible range with the intention of hiding statistical properties of the original message.Confusion employs the transformation to make the relationship between the original message and hash value as complicated as possible.
The n-bit hash value of a random message of size L = 50n is produced and displayed.Diffusion and confusion test procedure proceeds as follows: the n-bit hash value of a random message of size L = 50n is computed.One bit of the random message is randomly selected and switched, and the n-bit hash value of the altered message is computed.Then two hash values are compared and the number of bit changes is quantified.This test is repeated N times for N = 256, 512, 1024, 2048 and 10000 for hash values of size n, where n = 128, 160 and 256.The statistical measures, as illustrated in Table 2, are employed for statistical computations where B i is the number of bit changes in the i-th test.The results achieved www.ijacsa.thesai.org in tests for n = 128, 160 and 256 and N = 256, 512, 1024, 2048 and 10000 are demonstrated in Tables 3-5.
Distribution of the number of bits changed for various number of test times N is depicted in Fig. 9. Fig. 10 illustrates the histogram distribution of the number of bit changes for n=256 and N =10000.From the results in Tables 3-5, it can be observed that B and P are nearly the ideal values of n/2 and 50% respectively.All values of ∆B and ∆P are very small, which signifies that diffusion and confusion capability of the proposed hashing scheme is very strong and stable.

D. Collision Analysis 1) Collision Test:
Hash collision occurs when two distinct input messages generate the identical hash values.The following collision test has been done with the purpose of measuring the collision resistance of the proposed hashing scheme.The n-bit hash value of a random message of size L = 50n is produced and displayed in ASCII format.Then one bit in the generated message is randomly selected and flipped.The new hash value is also produced and displayed in ASCII format.The ASCII characters of these two hash values are then compared.The number of hits, which is the number of ASCII characters with the same value at the same position, is quantified.The absolute difference of these two hash values is expressed as where m i and m i are the i th ASCII character of the original and modified hash values, respectively, and dec() converts m i and m i to the corresponding decimal numbers.This procedure is repeated 10000 times.Table 6 depicts the minimum, maximum and mean values of d.It can be seen that the average absolute difference of each character of the proposed hashing scheme is close to the ideal value of 85.43 [20].This means that the proposed hashing scheme has the stronger collision resistance than the well-known approaches such as MD5 and SHA-1, and the other chaos-based approaches in [17,18,19,21,22].The distribution of the number of hits is demonstrated in Fig. 11.It can be seen that the maximum number of equal character is only 2. The results signify that the probability of collision is extremely low.

2) Resistance to Birthday Attack:
A birthday attack is a kind of cryptographic attack based on mathematical behind the birthday problem in probability theory.The name is obtained from the surprising result that in a room of 23 people, there is a probability of 50% that at least two people have the same birthday.The hashing scheme should be robust against birthday attack, which makes it difficult to find two distinct messages that have the same hash value.The difficulty of the birthday attack depends on the size of the hash value.For a secure hashing scheme with n-bit hash value, the difficulty of the attack is 2 n/2 .Therefore, the value of n is needed to be large enough to make a birthday attack computationally infeasible.For instance, if the size of the hash value is set to 256, the difficulty of the attack would be 2 128 .This keeps the system robust against this type of attack.

E. Speed Analysis and Hash Values Obtained from Different Environments
The running speed of the proposed hashing scheme on a 3.20 GHz Intel(R) Xenon(R) computer with 16 GB of RAM running Windows 7 (64 bit) is approximately 10.27 Megabits per second.The proposed hashing scheme is iterated using double precision floating-point arithmetic.The IEEE-754 floating-point standard was adopted in the early 1980s.If two computers with different platforms (operating systems and hardware) employ the IEEE-754 floating-point standard, two hash values produced by both computers must be identical [23].In order to affirm this issue, the hash values of the origin message illustrated in section 4 are created in computers with different CPU, operation systems and amounts of memory.The results of the hash function at different environments are demonstrated in Table 7.As can be seen, it reveals that if the IEEE-754 floating-point standard is employed, the hash values obtained from different computers must be the same.

V. IMPLEMENTATION OF PROPOSED KEYED HASH FUNCTION ON ANDROID DEVICE
The implementations of the proposed keyed hash function on an Android device are presented in order to verify sender's authenticity and the integrity of transmitted data.Fig. 12 demonstrates Android application user interface for hash value calculation.The procedures for hash value calculation are described as follows: (1) Input the initial conditions (y 0,1 and y 0,2 ).
(2) Choose and import the image file.
(4) The calculated hash value is displayed and saved as PNG file.The initial conditions are shared between sender and receiver and the image file is transmitted to the receiver along with the calculated hash value image file.Android application user interface for sender's authenticity and data integrity verifications can be illustrated in Fig. 13.The sender's authenticity and data integrity verification processes are described as follows: (1) Input the initial conditions (y 0,1 and y 0,2 ).
(2) Choose and import received image and hash value image files.
(4) The receiver-calculated hash value is compared with the received hash value.
(5) The results of sender's authenticity and data integrity verifications are displayed on the screen.These results confirm that the proposed keyed hash function can be used to verify the sender's authenticity and the integrity of transmitted data on the Android device.

VI. CONCLUSION
The new compact and robust chaos-based keyed hash function has been presented.The proposed chaotic map exploits absolute-value of sinusoidal nonlinearity for generating www.ijacsa.thesai.orghighly random iterated values in the diffusion process of ASCII input messages.Chaotic aspects have been investigated through bifurcation structures of Lyapunov exponent as well as Cobweb plots, autocorrelation, and signal characteristics in both time and frequency domains.The proposed hashing structure is relatively simple using two chaotic maps in the cross-coupled topology that enhances randomness quality for statistical performances.The designed hashing algorithms involve the initial stage when the cross-coupled maps accept initial conditions utilized as secret keys, and the iterative hashing stage that accepts input messages and generates the alterable-length hash values.With such a compact hash function structure, simulation results have revealed several desirable features in terms of statistical performances, involving the mean changed probabilities that are very close to 50%, and the mean number of bit changes that is also close to a half of hash value lengths.In addition, the mean absolute difference of each character values for the hash values of 128, 160 and 256 bits are close to the ideal value of 85.43.This indicates that the proposed hash function has superior performance over well-known algorithms such as MD5 and SHA1, and the other complex structures of chaos-based approaches in [17,18,19,21,22].A new implementation of hash function Android application has been demonstrated.As a result, the proposed hash function has offered a potential alternative to cryptography and secures protocol methods.

Fig. 1 .
Fig. 1.A detailed block diagram of the proposed chaotic map using absolute sinusoidal nonlinearity described in (1).

Fig. 2 .
Fig. 2. Bifurcation structures of the proposed chaotic map using absolute sinusoidal nonlinearity.
(a) shows an apparently chaotic time-domain waveform.Fig. 4(b) shows the Cobweb plots between x n and x n+1 , indicating that the iteration are mapped over the absolute-value nonlinearity.Figs.4 (c) and (d) show the frequency spectrum using periodogram and autocorrelation plots, respectively.It can be seen that the values are distributed with flat spectrum feature and the values are random reflected by the low autocorrelation of less than approximately 0.01.It can be concluded that the map potentially offers robust and effective randomness for use in hashing algorithm.

Fig. 3 .
Fig. 3. Bifurcation diagram and Lyapunov spectrum of the proposed chaotic map using absolute sinusoidal nonlinearity.

( 5 )
The last two output values y S,1 (t) and y S,2 (t) are mapped into decimal integer values d 1 and d 2 with interval [0, 2 64 ] (6) The decimal integer d 1 and d 2 are converted into 64-bit binary numbers b 1 and b 2 .

( 7 )
Finally, b 1 and b 2 are cascaded to form a 128 bit hash value H.

Fig. 5 .Fig. 6 .
Fig. 5. Block diagram of the cross-coupled topology of the proposed keyed hash function.

C 3 :
Substitute the first character of the original message by "A".The two 128-bit hash values for C 1 and C 3 differ in 63 positions.

C 4 :
Substitute the character "i" in the word "initial" by "e" to become "enitial".The two 128-bit hash values for C 1 and C 4 differ in 66 positions.

C 5 :
Substitute the last character of the original message "." by ",".The two 128-bit hash values for C 1 and C 5 differ in 62 positions.

C 6 :C 7 :
Lena original image (256 x 256 pixels) shown in Fig.7.Substitute the gray value of the pixel located at the upper left corner by "0".The two 128-bit hash values for C 6 and C 7 differ in 63 positions.

C 8 :
Substitute the gray value of the pixel located at the lower right corner by "1".The two 128-bit hash values for C 6 and C 8 differ in 63 positions.The corresponding binary sequences of C 1 , C 2 , C 3 , C 4 , C 5 , C 6 , C 7 and C 8 are illustrated in Fig. 8.The result reveals that any small change in the original message and initial condition can result in a 50% chance of changing for each bit of hash value.

Fig. 12 .
Fig. 12. Android application user interface : (a) image input for hash value calculation (b) displaying calculated hash value image in PNG format.

Fig. 13 .
Fig. 13.Android application user interface : (a) image input for verifying sender's authenticity and data integrity (b) displaying results of sender's authenticity data integrity verifications.

TABLE I .
SUMMARY OF RELATED CHAOTIC MAPS IMPLEMENTED BASED ON SINUSOIDAL FUNCTIONS.

TABLE III .
THE RESULTS OBTAINED THROUGH STATISTICAL MEASURES FOR A 128-BIT HASH VALUE.

TABLE IV .
THE RESULTS OBTAINED THROUGH STATISTICAL MEASURES FOR A 160-BIT HASH VALUE.

TABLE V .
THE RESULTS OBTAINED THROUGH STATISTICAL MEASURES FOR A 256-BIT HASH VALUE.

TABLE VI .
COMPARISON OF ABSOLUTE DIFFERENCE, WHERE = 10000.

TABLE VII .
HASH VALUES OBTAINED FROM DIFFERENT ENVIRONMENTS.