Next Article in Journal
The Renewed Role of Sweep Functions in Noisy Shortcuts to Adiabaticity
Next Article in Special Issue
Tight and Scalable Side-Channel Attack Evaluations through Asymptotically Optimal Massey-like Inequalities on Guessing Entropy
Previous Article in Journal
Entropy, Information, and the Updating of Probabilities
Previous Article in Special Issue
Selecting an Effective Entropy Estimator for Short Sequences of Bits and Bytes with Maximum Entropy
Order Article Reprints
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:

Information Theory Based Evaluation of the RC4 Stream Cipher Outputs

Facultad de Matemática y Computación, Instituto de Criptografía, Universidad de la Habana, Habana 10400, Cuba
Facultad de Ciencias Económicas y Empresariales, Universidad Panamericana, Álvaro del Portillo 49, Zapopan 45010, Jalisco, Mexico
Author to whom correspondence should be addressed.
Entropy 2021, 23(7), 896;
Received: 22 April 2021 / Revised: 4 July 2021 / Accepted: 12 July 2021 / Published: 14 July 2021
(This article belongs to the Special Issue Types of Entropies and Divergences with Their Applications)


This paper presents a criterion, based on information theory, to measure the amount of average information provided by the sequences of outputs of the RC4 on the internal state. The test statistic used is the sum of the maximum plausible estimates of the entropies H ( j t | z t ) , corresponding to the probability distributions P ( j t | z t ) of the sequences of random variables ( j t ) t T and ( z t ) t T , independent, but not identically distributed, where z t are the known values of the outputs, while j t is one of the unknown elements of the internal state of the RC4. It is experimentally demonstrated that the test statistic allows for determining the most vulnerable RC4 outputs, and it is proposed to be used as a vulnerability metric for each RC4 output sequence concerning the iterative probabilistic attack.

1. Introduction

In [1], the iterative probabilistic attack was proposed to reconstruct the internal state of the RC4 algorithm, starting from knowing an output sequence, which was successively improved in [2,3]. In essence, these attacks attempt to extract information about the content of the internal state { j t , S t : t = 1 , , T } of the algorithm RC4 stream cipher from a known output sequence { z t : t = 1 , , T } . For this, the conditional probabilities P ( j t | z t ) and P ( S t | z t ) are iteratively recalculated. This type of attack does not yet violate RC4, but it constitutes a serious potential threat to its security, which should not be ignored. Concerning this threat, a criterion has been developed to assess the vulnerability of an RC4 output to this type of attack. The test statistic used is based on the entropy of the conditional probability distributions P ( j t | z t ) for the z t that appear in the evaluated sample. The test statistic was proposed considering that the values and position of these z t determine their probability distribution and associated entropy. The lower the value of the statistic, the more vulnerable the evaluated sample is the lower the attacker’s uncertainty will be about the value of the variable j t .
This result can have various applications, since it allows for an evaluation of a set of RC4 output sequences according to their vulnerability or theoretical strength in face of iterative probabilistic attacks. This criterion can characterize the keys that cause the greatest vulnerability, which can lead to the identification of a new class of weak keys. In this work, experimental results evaluating the RC4 output sequences, according to their vulnerability to probabilistic attacks, are presented.
The structure of this work is as follows: in Section 2 the basic concepts of the research topic are described, which includes the description of the RC4 algorithm and the reports associated with the iterative probabilistic attack; Section 3 introduces the statistic used to evaluate the vulnerability of the RC4 outputs concerning the iterative probabilistic attack; Section 4 details the pre-calculation of frequencies that allow the estimation of the joint, marginal, and conditional probabilities and, in turn, the estimation of the entropies that will be used for the statistical calculation on the output sequences of RC4; in Section 5 experiments are performed to validate the proposed statistician. The results of applying the statistic on RC4 output sequences are illustrated; finally, Section 6 presents some conclusions.

2. Preliminaries

2.1. Description of the RC4 Stream Encryption Algorithm

The RC4 algorithm [4] stands out from other stream ciphers for its wide use in different applications and protocols. The RC4 stream cipher [4] is optimized to be used in 8-bit processors, being extremely fast and exceptionally simple. It was included in network protocols, such as secure sockets layer (SSL), transport layer security (TLS), wired equivalent privacy (WEP), Wi-Fi protected access (WPA), and in various applications used in Microsoft Windows, Lotus Notes, Apple Open Collaboration Environment (AOCE), and Oracle Secure SQL [4]. In the last decade, some applications [5,6] have avoided RC4 encryption, given some found weaknesses [7]. However, although it is not considered very secure [8], RC4 continues to motivate research nowadays [8,9,10]. Furthermore, this cipher is a good option to measure the effectiveness of methods that analyze weaknesses in stream ciphers related to those already known in RC4 [11,12,13,14], or to check the performance of hardware or software schemes that make use of cryptography [15,16,17].
The RC4 has two main components, the key scheduling, and the pseudorandom number generator. The key scheduling generates an internal random permutation S of values from 0 to 255, from an initial permutation, a (random) key K of l-byte length, and two pointers i and j. The maximal key length is of l = 256 bytes, see Algorithm 1.
Algorithm 1 RC4 key-scheduling.
for i = 0 255 do
     S [ i ] i
end for
j 0
for i = 0 255 do
     j ( j + S [ i ] + K [ i mod l ] ) mod n
    Swap S [ i ] and S [ j ]
end for
The main part of the algorithm is the pseudo-random number generator that produces one-byte output at each step. As usual, for stream ciphers, the encryption will be a XOR of the pseudo-random sequence with the message, see Algorithm 2.
Algorithm 2 RC4 pseudo-random generator.
i 0
j 0
while Generating Output do
     i ( i + 1 ) mod 256
     j ( j + S [ i ] ) mod 256
    Swap S [ i ] and S [ j ]
    Output S [ ( S [ i ] + S [ j ] ) mod 256 ]
end while
For the RC4 stream cipher, several modifications have been proposed, while some modified only certain components or some operations, others completely changed the algorithm, see [18]. It is important to note that even RC4 variants have had a lot of attention in the scientific community, see [19].
The RC4 stream cipher, in its definition, does not distinguish the use of IV initialization vectors [4]. However, it is well known that in practical applications of RC4, as in many other stream ciphers, an IV initialization vector with a secret key is used to form a session key. The proposed method is independent of the approach used; it simply works on the final input used as input to the cipher.

2.2. Iterative Probabilistic Attacks

Here we discuss three important results on probabilistic attacks that try to reconstruct the internal state of RC4 from knowing an output sequence { z t : t = 1 , , T } . In [1], the central idea, proposed by Knudsen et al., was to conveniently use Bayes’s Theorem to recalculate the probabilities P ( j t | z t ) and P ( S t | z t ) , for each t T . In essence, they worked on obtaining probabilistic information about the two variables j t , S t from z t . It was reported that a low probability of success and a high volume of work were achieved. To be successful, it was required to know the values of at least d elements of S 0 , with d { 150 , , 160 } . The results presented in [1] are independent of the key scheduling and the key size. For sequences of length T = 256 = 2 8 , the volume of work was 2 48 in each iteration. In [2], Knudsen’s method was improved by reducing the number of elements of the permutation that must be known and maintains the same workload of 2 48 in each iteration. The essential difference is that a more exact way of recalculating the probabilities was proposed using the entire Z output sequence instead of just the z t value to increase the probability of success. Experiments were reported for RC4 with n = 3 and n = 4 . Finally, in [3], Golic and Morgari used the same probabilities of the previous article; the novelty in that work was that it proposed a set of 7 improvements to the probabilistic algorithm itself and estimated the minimum number d of elements in S 0 that must be known a priori so that the attack recovers the correct S 0 permutation, concluding that d { 26 , , 85 } , which is a substantial improvement compared to d { 150 , , 160 } . The workload remained at 2 48 probabilities that must be calculated at each iteration.
In summary, in the three aforementioned articles, it was reported that these attacks have a low probability of success when no element of the permutation is known a priori, which is why it is concluded that they are not currently applicable to real RC4. In such articles, the authors model the ignorance over the internal state assuming the initial uniform probability distribution for S and j. It is essential to note that increasing the precision of the recalculated probabilities reduced the number d of elements of the permutation that must be known a priori. Knudsen et al. got d { 150 , , 160 } , while Golic and Morgari reduced it to d { 26 , , 85 } . The previous result suggests that by increasing the precision of the calculated probabilities in different ways or by improving the iterative algorithm, it could be possible to achieve d 0 , i.e., to recover the complete permutation without knowing any of its elements a priori, which constitutes a serious threat to the safety of the RC4.

2.3. Entropy As a Measure of Uncertainty

Let X be a discrete random variable with possible values x i and respective probabilities p i = P ( x i ) , with i = 1 , , k . Then, Shannon’s discrete entropy function H ( p 1 , , p k ) [20] is defined as
H ( X ) = i = 1 k p i log p i .
When p i = 1 / k for all i = 1 , , k , the maximum uncertainty about the value of X is obtained, so the entropy reaches its maximum value, equal to
H m a x = H 1 k , , 1 k = l o g ( k ) .
When there is an i such that p i = 1 and p i = 0 for all i i , there is no uncertainty about the value of X, so the entropy reaches its minimum value, equal to H m i n = 0 .

3. Definition of the Proposed Test Statistic

In this work, the information that z t contributes on j t probabilistically, by means of a non-uniform probability distribution, will be modeled from the knowledge of z t . To support this proposal, we start from the relationship between z t and j t , and the result of [4] on the non-equi-probability of the permutation S at the beginning of the pseudo random generation algorithm (PRGA) stage.
Solving for j t in the equation that defines z t in the RC4 algorithm, we obtain:
j t = S t 1 S t 1 z t S t 1 i t .
For t = 0 , we have j 0 = S 0 1 [ S t 1 [ z 0 ] S 0 1 [ i 0 ] ] . Note that the values of i 0 and z 0 are known, while S 0 is unknown, therefore, the distribution of j 0 is determined by S 0 . Taking into account that in [4] it is shown that S 0 does not follow a uniform distribution, it is considered that for t = 0 , when z 0 is known, this property of non-uniformity is translated to j 0 .
Expression (3) does not allow the calculation of j t since S t is unknown. However, it allows theoretically arguing the non-equi-probability of j t , conditional on knowing the value of z t (due to the non-equi-probability of S).
Denoting by t * the smallest value of t, such that for t > t * it is true that S t follows a uniform distribution. In [21,22], the authors tried to estimate the value of t * . From this definition, and following the same reasoning as for S t , at t = 0 , the beginning of the first iteration; it can be assumed that for t { 0 , , t * 1 } the conditional probability distribution P ( j t | z t ) , is non-uniform. In [22], it is described that it is possible to find biases in the output bytes of RC4 up to t * = 512 . Thus, for t { 0 , , 511 } the conditional probabilities P ( j t | z t ) do not fit a uniform distribution.

3.1. Basis of the Evaluation Criterion

The criterion will be limited to considering only the variable j t and its conditional probabilities P ( j t | z t ) . This was taken into account because the knowledge without errors of the sequence { j t : t = 1 , , T } allows to reconstruct S 0 [5]. The central idea of the criterion is based on the different values z t that appear at each time step t T . This can cause different initial conditional probability distributions P ( j t | z t ) to appear at each t T . This is the essence of the proposed test statistic; i.e., it will take into account which values z t appear in the sample and in which places (times t) each one of those values z t appears. Under this condition, two samples with different frequency distributions z t will have different vulnerabilities to attack. Even between two samples with the same frequency distribution of the values z t , the effectiveness would vary depending on their places of appearance.

3.2. Definition of the Test Statistic

To measure these differences, a 256 × 256 matrix was pre-calculated at each time t = { 1 , , T } , in which the columns represent all the possible values of z t = 0 , , 255 and the rows each value of j t = 0 , , 255 . The element ( j , z ) of the matrix, corresponding to row j and column z, constitutes the conditional probability P ( j t | z t ) , at time t T . In this way, each column will be the distribution of conditional probabilities P ( j t | z t ) , which probabilistically represents the information about j that causes the appearance of z at this time. The most interesting question one might ask is: how can one compare two different columns? For example, how can one compare two probability distributions? More exactly, which distribution is associated with the greatest uncertainty about j? To solve this problem, the concept of Shannon’s discrete entropy will be used.
For each column, the entropy will be calculated, denoted by H z t , which is a direct measure of the uncertainty about j t , when in the place t of the sample appears the z t value associated with that column. It is important to mention that the entropy value characterizes the distribution of the 256 possible values of j t in a single value, facilitating the comparison between probability distributions. By entropy’s properties, it is satisfied that if H z t = 0 , then the value of the j t variable is determined by z t , while if H z t = 8 , knowledge of z t does not provide any information about the value of j t .
To evaluate in a sample of length T, the total uncertainty over j, the entropy associated with the value z t that appeared at each time t = 1 , , T will be added over all times. Then, the expression of the test statistic will be:
Q = t = 0 T H z t ,
H z t = j t = 0 255 P j t | z t l o g P j t | z t .
The expected value μ = E ( Q ) and the variance σ 2 = V ( Q ) of the statistic Q, are expressed from the expected value and the variance of the conditional entropies H z t in the T times and are given by
μ = E ( Q ) = t = 0 T E ( H z t ) ,
and assuming that the H z t , with t = 1 , , T , are independent of each other,
σ 2 = V ( Q ) = t = 0 T V ( H z t ) .
For each entropy H z t that appears as an addition in the expression of Q, its distribution can be approximated by a normal distribution according to the result of [23]. However, this plug-in estimator is known to be biased. Its bias and variance [24,25], are given by
E ( H ^ H ) = k 1 2 n + 1 12 n 2 1 i = 1 k 1 p i + O ( n 3 ) ,
V a r ( H ^ ) = 1 n i = 1 k p i l n 2 ( p i ) H 2 + k 1 2 n 2 + O ( n 3 ) ,
where n is the sample size. If the bias’s expression terms that include unknown parameters are depreciated, then the bias is calculable when the cardinality of the alphabet is known, as in this case, but the variance is not since it depends on the unknown probabilities p i . In this work, the point estimation of the mean μ = E ( Q ) and the variance σ 2 = V ( Q ) of the Q statistic was carried out directly, using the expressions
μ ^ = E ( Q ) ^ = t = 0 T E ( H z t ) ^ ,
σ 2 ^ = V ( Q ) ^ = t = 0 T V ( H z t ) ^
respectively, based on the point estimation [26] of the means E ( H z t ) ^ and the variances V ( H z t ) ^ of each entropy H z t for each time t, with t = 1 , , T .
The lower the value of the Q-statistic, the less uncertainty about j, and, therefore, the sample would be more vulnerable to these attacks. To evaluate a set of samples of equal length, it is enough to calculate the test statistic for them and sort them increasingly. To compare samples of different lengths, the statistics obtained can be divided between the lengths of their respective samples, obtaining the average uncertainty per symbol and comparing in the same way.

3.3. Decision Criteria Using the Q-Statistic

The Q-statistic is defined as the sum of T random variables H z t . Following the results obtained in [23] by Zhang and Zhang, the plug-in entropy estimator, used to estimate the entropy considered in this work, follows an approximately normal distribution. In this way, assuming independence between the random variables H z t , the Q-statistic follows a normal distribution N μ , σ 2 with mean μ and variance σ 2 because the sum of Normal independent variables is also normal. Then, it is possible to approximate the distribution of the Q-statistic to a random variable with standard normal distribution.
Q 01 = Q μ σ N 0 , 1 ,
where σ is the standard deviation of Q.
As mentioned above, the permutation of RC4 has biases that are transferred to j and the output z. The appearance of biases in the distribution P ( j t | z t ) provides alterations in the values of H z t and consequently in the distribution of the Q-statistic, leading to the appearance of extreme values. The appearance of these extreme values adds to the distribution of Q a slight asymmetry on left tail since the alteration in the distribution of P ( j t | z t ) decreases the value of H z t and, therefore, Q μ . For this reason, we will work with the standard normal distribution N ( 0 , 1 ) with a single tail, in this case with a left tail, and using a significance level α , it is concluded that the sequences from RC4 that provides more information about the variable j of the internal state are those with the lowest value of Q, such that Q 01 < Z α .

4. Pre-Computing of Probabilities and Estimation of Entropies

The proposed method is divided into two phases, following an idea similar to a time memory trade off (TMTO) attack [27]. The first is the precomputation phase, often called the offline phase, where the probabilities and entropy in each time of T are estimated over each output value z t . The objective of this phase is to estimate the information, in general, that provides the output occurrence z t on the variable j t . This phase is executed only once, and then used repeatedly in the next phase for the evaluation of N outputs of the RC4. Although the second is referred to as the real-time or online phase, where it captures a sample of RC4 keystream and checks if this happens to be in the tables below. Each of the M outputs were generated from initializing the RC4 with M random inputs of 20 bytes each.
To estimate the conditional probabilities P ( j t | z t ) , at each time t T for all possible values z t , a pre-calculation of frequencies was performed, and thus the entropies were estimated.
To make a good estimation of the probabilities, in this work, we used M = 262,144,000 outputs of RC4 to reliably obtain as many biases as possible that RC4 has and taking into account the size k = 256 of the alphabet.

4.1. Frequency Pre-Calculation

To calculate the frequencies, M = 262,144,000 outputs of the RC4 of length T = 512 were generated and, at each time t T , the value of the pair ( j t , z t ) was checked, obtaining for each fixed z t the joint distribution ( j t , z t ) varying j t . The value of M was chosen in order to obtain an expected frequency of
E ( f j t , z t ) = 262,144,000 / ( 256 × 256 ) = 4000
observations, by category, under the hypothesis of equi-probability.
A matrix of 256 × 256 was obtained for each time t = 1 , , 512 which represents each value of z t = 0 , , 255 per column and in the rows each value from j t = 0 , , 255 . Thus, we have in row j, column z, the frequency f j t , z t of joint appearance of the pair ( j t , z t ) at time t (see Table 1).

4.2. Estimation of Joint, Marginal, and Conditional Probabilities

From the joint frequencies f j t , z t we can obtain the marginal frequency f z t at each time t, to estimate the joint probability P ( j t , z t ) and the marginal probability P ( z t ) , in order to reach an estimate of the conditional probability P ( j t | z t ) , through the Bayes formula
P ^ ( j t , z t ) = f j t , z t M ,
P ^ ( z t ) = f z t M = j = 0 255 f j t , z t M ,
and thus
P ^ ( j t | z t ) = P ^ j t , z t P ^ z t = f j t , z t M j = 0 255 f j t , z t M = f j t , z t j = 0 255 f j t , z t .
From the estimation of these probabilities, a table like the Table 2 is obtained, which now contains the conditional probability P ^ ( j t | z t ) for each time t = 1 , , 512 .

4.3. Entropy Estimation

For each time t T , the entropy H z t = j t = 0 255 P j t | z t l o g P j t | z t was estimated, using the plug-in estimator [28]. This constitutes the entropy of the distribution of the j conditioned to the value z t of that column. Thus, at each time t T , 256 values of H ^ z t are obtained. The output z t with the highest entropy H ^ z t (tighter distribution to the uniform) provides the less information on j. Uniting the results obtained for the T = 512 times, a matrix of 256 × 512 is obtained which contains per column each value of t = 1 , , 512 and in the rows each value of z = 0 , , 255 . In each category ( z , t ) will be the entropy value H ^ z t corresponding to row z and column t (see Table 3).
Then, to evaluate a particular sample, the value H ^ z t corresponding to the place ( t , z t ) of the matrix is added using the statistic at each time t. In this way, a random variable of the type is obtained at each time
H ^ z = 0 t H ^ z = 255 t P z t = 0 P z t = 255 ,
whose expected value will be:
E [ H ^ z t ] = i = 0 255 P ^ z t = i · H ^ z t = H ^ t J / Z ,
which constitutes the average uncertainty over j, at time t, when z t is known, i.e., the conditional entropy.

5. Experimental Evaluation

In the experiments ran for the present article, T = 512 times will be taken, as in the pre-calculation stage and N = 10,000 output sequences of the RC4 were generated from N random entries of 20 bytes each. The T value can be a variable parameter depending on the size required for the sample given the pre-calculation performed. For higher value selection of this parameter, it is necessary to deepen the theoretical comparison between the times and carry out more experiments. Figure 1 shows the distribution of the Q-statistic calculated at the 10,000 sequences generated. The left skewness illustrates the appearance of biases in the P ( j t | z t ) distribution that decrease the value of Q.
These biases are represented through the appearance of extreme values in each sequence. Figure 2 shows the extreme values of the pre-calculated H z t distribution that cause such skewness to illustrate this event.
As can be seen, three groups stand out to the left of extreme values. The first two groups of extreme values are caused by the first and second output bytes of RC4, which are highly biases and not evenly distributed [21,22]. Then a third group, which is caused by the existence of z t bytes in the rest of the outputs, with t > 1 , that has a high correlation with j. The last group is the remaining values of H z t .
Finally, for a significance level α = 0.01 , it was obtained that 233 of the 10,000 sequences of outputs analyzed do not satisfy that Q 01 > Z α = 2326 . In other words, the output sequences that provide more information about the j variable were detected. In this way, the Q-statistic is able to distinguish within a set of RC4 output sequences the most vulnerable to iterative probabilistic attacks.

6. Conclusions

A statistical criterion was proposed, which allows for distinguishing a set of sequences of outputs of RC4. This Q-statistic is based on the conditional entropies of j t given the value z t , known at each time t. It was experimentally verified that the proposed criterion could determine the existence of a class of output sequences more vulnerable to iterative probabilistic attacks. Future work intends to strengthen the proposed criterion by using the conditional probabilities P ( S t | z t ) , as well as to extend the criterion to the case in which the output of RC4 is not known, and only the ciphertext obtained with that output is known. Another result will be to investigate the possible adjustment of the distribution of the Q statistic to some of the known distributions and theoretically determine the lowest value of M for which it is effective.

Author Contributions

Conceptualization, E.J.M.-C. and C.M.L.-P.; methodology, E.J.M.-C., C.M.L.-P., O.R. and G.S.-G.; software, E.J.M.-C.; validation, E.J.M.-C., C.M.L.-P., O.R. and G.S.-G.; formal analysis, E.J.M.-C., C.M.L.-P., O.R. and G.S.-G.; investigation, E.J.M.-C., C.M.L.-P. and G.S.-G.; writing—original draft preparation, G.S.-G. and E.J.M.-C.; writing—review and editing, E.J.M.-C., C.M.L.-P., O.R. and G.S.-G.; visualization, E.J.M.-C.; supervision, E.J.M.-C., C.M.L.-P., O.R. and G.S.-G. All authors have read and agreed to the published version of the manuscript.


This research received no external funding.

Data Availability Statement

Data sharing not applicable.

Conflicts of Interest

The authors declare no conflict of interest.


  1. Knudsen, L.R.; Meier, W.; Preneel, B.; Rijmen, V.; Verdoolaege, S. Analysis methods for (Alleged) RC4. In Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 1998; Volume 1514, pp. 327–341. [Google Scholar] [CrossRef][Green Version]
  2. Golić, J.D. Iterative probabilistic cryptanalysis of RC4 keystream generator. In Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2000; Volume 1841, pp. 220–233. [Google Scholar] [CrossRef]
  3. Golic, J.D.; Morgari, G. Iterative Probabilistic Reconstruction of RC4 Internal States. IACR Cryptol. ePrint Arch. 2008, 2008, 348. [Google Scholar]
  4. Paul, G.; Maitra, S. RC4: Stream Cipher and Its Variants; CRC Press: Boca Raton, FL, USA, 2011; pp. 1–281. [Google Scholar] [CrossRef]
  5. RC4 Cipher Is No Longer Supported in Internet Explorer 11 or Microsoft Edge. Available online: (accessed on 18 July 2020).
  6. SSL Configuration Required to Secure Oracle HTTP Server After Applying Security Patch Updates. Available online:{_}1.html (accessed on 18 July 2020).
  7. Satapathy, A.; Livingston, J. A Comprehensive Survey on SSL/ TLS and their Vulnerabilities. Int. J. Comput. Appl. 2016, 153, 31–38. [Google Scholar] [CrossRef]
  8. Soundararajan, E.; Kumar, N.; Sivasankar, V.; Rajeswari, S. Performance analysis of security algorithms. In Advances in Communication Systems and Networks; Springer: Singapore, 2020; Volume 656, pp. 465–476. [Google Scholar] [CrossRef]
  9. Jindal, P.; Makkar, S. Modified RC4 variants and their performance analysis. In Microelectronics, Electromagnetics and tElecommunications; Springer: Singapore, 2019; Volume 521, pp. 367–374. [Google Scholar] [CrossRef]
  10. Parah, S.A.; Sheikh, J.A.; Akhoon, J.A.; Loan, N.A.; Bhat, G.M. Information hiding in edges: A high capacity information hiding technique using hybrid edge detection. Multimed. Tools Appl. 2018, 77, 185–207. [Google Scholar] [CrossRef]
  11. Capó, E.J.M.; Cuellar, O.J.; Pérez, C.M.L.; Gómez, G.S. Evaluation of input—Output statistical dependence PRNGs by SAC. In Proceedings of the 2016 International Conference on Software Process Improvement (CIMPS), Aguascalientes, Mexico, 12–14 October 2016; pp. 1–6. [Google Scholar] [CrossRef]
  12. Grosul, A.L.; Wallach, D.S. A Related-Key Cryptanalysis of RC4; Technical Report; Department of Computer Science, Rice University: Houston, TX, USA, 2000. [Google Scholar]
  13. Matsui, M. Key collisions of the RC4 stream cipher. In Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5665, pp. 38–50. [Google Scholar] [CrossRef][Green Version]
  14. Chen, J.; Miyaji, A. How to find short RC4 colliding key pairs. In Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2011; Volume 7001, pp. 32–46. [Google Scholar] [CrossRef]
  15. Tyagi, M.; Manoria, M.; Mishra, B. Effective data storage security with efficient computing in cloud. Commun. Comput. Inf. Sci. 2019, 839, 153–164. [Google Scholar] [CrossRef]
  16. Dhiman, A.; Gupta, V.; Singh, D. Secure portable storage drive: Secure information storage. Commun. Comput. Inf. Sci. 2019, 839, 308–316. [Google Scholar] [CrossRef]
  17. Nita, S.L.; Mihailescu, M.I.; Pau, V.C. Security and cryptographic challenges for authentication based on biometrics data. Cryptography 2018, 2, 39. [Google Scholar] [CrossRef][Green Version]
  18. Zelenoritskaya, A.V.; Ivanov, M.A.; Salikov, E.A. Possible Modifications of RC4 Stream Cipher. Mech. Mach. Sci. 2020, 80, 335–341. [Google Scholar] [CrossRef]
  19. Jindal, P.; Singh, B. Optimization of the Security-Performance Tradeoff in RC4 Encryption Algorithm. Wirel. Pers. Commun. 2017, 92, 1221–1250. [Google Scholar] [CrossRef]
  20. Cover, T.M. Elements of Information Theory; John Wiley & Sons: Hoboken, NJ, USA, 1999. [Google Scholar]
  21. Pudovkina, M. The Number of Initial States of the RC4 Cipher with the Same Cycle Structure; Technical Report Mod L; Moscow Engineering Physics Institute (State University): Moscow, Russia, 2003. [Google Scholar]
  22. Mironov, I. (Not so) random shuffles of RC4. In Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2002; Volume 2442, pp. 304–319. [Google Scholar] [CrossRef][Green Version]
  23. Zhang, Z.; Zhang, X. A normal law for the plug-in estimator of entropy. IEEE Trans. Inf. Theory 2012, 58, 2745–2747. [Google Scholar] [CrossRef]
  24. Miller, G. Note on the bias of information estimates. In Information Theory in Psychology: Problems and Methods; Free Press: Glencoe, IL, USA, 1955; pp. 95–100. [Google Scholar]
  25. Basharin, G.P. On a statistical estimate for the entropy of a sequence of independent random variables. Theory Probab. Appl. 1959, 4, 333–336. [Google Scholar] [CrossRef]
  26. Dodge, Y. The Concise Encyclopedia of Statistics; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2008. [Google Scholar] [CrossRef][Green Version]
  27. Van Den Broek, F.; Poll, E. A comparison of time-memory trade-off attacks on stream ciphers. In International Conference on Cryptology in Africa; Springer: Berlin/Heidelberg, Germany, 2013; pp. 406–423. [Google Scholar]
  28. Verdú, S. Empirical Estimation of Information Measures: A Literature Guide. Entropy 2019, 21, 720. [Google Scholar] [CrossRef] [PubMed][Green Version]
Figure 1. Distribution of Q 01 values in the 10,000 samples generated.
Figure 1. Distribution of Q 01 values in the 10,000 samples generated.
Entropy 23 00896 g001
Figure 2. Representation of the extreme values of H z t in the pre-calculation stage.
Figure 2. Representation of the extreme values of H z t in the pre-calculation stage.
Entropy 23 00896 g002
Table 1. Frequency of joint appearance.
Table 1. Frequency of joint appearance.
0f(0,0)f(0,1)f(0,255) f ( j t = 0 )
1f(1,0)f(1,1)f(1,255) f ( j t = 1 )
255f(255,0)f(255,1)f(255,255) f ( j t = 255 )
f ( z t = 0 ) f ( z t = 1 ) f ( z t = 255 ) M
Table 2. Probabilities of j conditional on z at each time t.
Table 2. Probabilities of j conditional on z at each time t.
J/Z0 z t 255
j t P ^ ( j t / z t )
Table 3. Entropy of the j distributions conditional on z at each time.
Table 3. Entropy of the j distributions conditional on z at each time.
0 H ^ 0 1 H ^ 0 2 H ^ 0 512
1 H ^ 1 1 H ^ 1 2 H ^ 1 512
255 H ^ 255 1 H ^ 255 2 H ^ 255 512
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Madarro-Capó , E.J.; Legón-Pérez , C.M.; Rojas, O.; Sosa-Gómez, G. Information Theory Based Evaluation of the RC4 Stream Cipher Outputs. Entropy 2021, 23, 896.

AMA Style

Madarro-Capó  EJ, Legón-Pérez  CM, Rojas O, Sosa-Gómez G. Information Theory Based Evaluation of the RC4 Stream Cipher Outputs. Entropy. 2021; 23(7):896.

Chicago/Turabian Style

Madarro-Capó , Evaristo José, Carlos Miguel Legón-Pérez , Omar Rojas, and Guillermo Sosa-Gómez. 2021. "Information Theory Based Evaluation of the RC4 Stream Cipher Outputs" Entropy 23, no. 7: 896.

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop