A Fog Computing Security: 2-Adic Complexity of Balanced Sequences

In the fog computing environment, the periodic sequence can provide sufficient authentication code and also reduce the power consumption in the verification. But the periodic sequence faces a known full-cycle attack threat in fog computing. This paper studies the 2-adic complexity attack ability of the periodic balance sequence in the fog computing environment. It uses the exponential function as a new approach to study the 2-adic properties of periodic balance sequence and presents that the 2-adic complexity of the periodic balanced sequence is not an attacking threat when used in fog computing.


Introduction
Fog computing is a decentralized computing architecture compared to cloud computing and is currently used primarily for mobile and portable devices.Due to the current proliferation of IoT devices, the main advantage of fog computing is the ability to quickly provide scalable, decentralized solutions.Between data sources and cloud infrastructure, fog computing mainly processes and stores data.Fog computing can improve computational performance by reducing the amount of processing and storage that extra data consumes.Fog computing has real-time responsiveness and offers a cost-effective, flexible deployment of hardware and software in computing system deployments.Fog platform also faces a lot of network security issues.Such as code injection attacks (such as SQL injection), session and cookie hijacking (posing as legitimate users), illegal direct data access unsafe references, malicious redirect and driver attacks, web attacks, and other cyberattacks.Due to the relatively small computing resources (memory, processing, and storage) of the fog computing system, there is no security protection that can consume a large amount of secure authentication storage as cloud computing does.Fog computing should be defined for a broader range of ubiquitous connected devices, which requires the fog server to generate a large number of security codes at one time and a relatively low computational load during verification.For secure communications and authentication, stream ciphers are recognized as fast certification, which require less computation and storage capacity.AESbased cipher type mentioned in [1] is an encryption algorithm which is suitable for fog platforms.But fog calculation of data encryption security needs to consider stream cipher antiattack performance.In the fog computing environment using stream ciphers, the security verification and data transmission should be considered between the length of the password and the verification algorithm.The safety of some fog calculations strongly depends on the security of the sequence itself by weakening the verification algorithm.In this case, the fog server will distribute a large amount of security codes, and it is easier for an attacker to collect large numbers of plain-texts and cipher-texts so that he may filter out full-period encrypted sequences.Currently, there are many attacks on the known periodic sequences in which a common one is the 2-adic complexity attack.
For cryptographic applications, a good pseudorandom generator must be infeasible to find the corresponding initial state.Hence many modern stream ciphers are designed by combining the output sequences in various nonlinear ways.Goresky and Klapper first introduced feedback with carry shift registers (FCSRs) as shown in Figure 1 , which are a 2 Wireless Communications and Mobile Computing class of nonlinear sequence generators by [2], and used the arithmetic in the 2-adic number to analyze this stream generator.For the security of the stream, rational approximation algorithm given in [2] is an important adaptive synthesizing algorithm against FCSRs, as shown in Algorithm 1, by which if a key-stream can be generated by a short FCSR, then this FCSR can be efficiently determined from a small subsequence of the key-stream.Therefore, the rational approximation algorithm sets up a new measure of key-stream security and is referred to as 2-adic complexity.For the properties of FCSRs, it is well known that any strictly periodic sequence can be generated by an FCSR.Then any binary sequence with low 2-adic complexity is insecure for cryptographic applications.Although some properties of 2-adic complexity had been proven, such as the expected value and variance of 2-adic complexities of periodic binary sequences and the 2-adic complexity of -sequence, the 2-adic complexity of binary sequences has not been quite clear.This paper studies one function of periodic balance sequence which can against the 2-adic complexity attack in the fog computing environment.
This paper involves the exponential function and the structure principle of FCSR for the study of the 2-adic properties and 2-adic complexity of balanced binary sequences.For a binary balanced periodic sequence, we give a relationship with its 2-adic integer, the length of period, and 2-adic complexity and show that the 2-adic complexity is bigger than the half period of the sequence when its 2-adic number approaches half.Moreover, it is indicated that the 2-adic complexity of the binary balanced sequence is affected by the register bit values of the FCSR.In the following sections we only consider the binary strictly periodic sequences, and we denote them as periodic sequences for simplicity.

Preliminary
In this section we briefly review some basic facts about feedback with carry shift register (FCSR) and 2-adic number.The FCSR is a feedback with -stages shift register and its auxiliary memory contained nonnegative integer.Assume an odd integer  has the binary representation as  + 1 =  1 ⋅ 2 +  2 ⋅ 2 2 + ⋅ ⋅ ⋅ +   ⋅ 2  .Then the -stages connections of FCSR are given by the bits { 1 ,  2 , . . .,   }.The FCSR with connection integer  is described as follows: (1) Take an integer sum   = ∑  =1    − +  −1 .(2) Shift the contents one step to the right, outputting the right bit  − .
(3) Place   = (  ) mod 2 into the left most cell of the shift register.
(4) Replace the memory integer The number of bits in the connection number coincides with the size of the basic register.For strictly periodic sequences, the extra memory is small and we can ignore it, but the eventually periodic sequence may require the amount of memory.In this paper, we just consider the strictly periodic sequences, and then we denote that the 2-adic complexity of sequences is to measure the number of bits in the basic FCSR.In the study of the output sequence of a given FCSR, we usually use the arithmetic in the 2-adic integer.
A 2-adic integer is form power series  = ∑ ∞ =0   ⋅ 2  , with   ∈ {0, 1}, and a fact is that number −1 is represented by −1 = 1 + 2 + 2 2 + 2 3 + ⋅ ⋅ ⋅ .Then, the negative integer - is associated with the product Moreover, the multiplication of 2-adic integer also has unique inverse if the integer  is an odd integer.Thus the 2adic integer contains every rational number /, provided  is odd.
Proposition 1 (see [2]).There is a one-to-one correspondence between rational numbers  = / (where  is odd) and eventually periodic binary sequences .We define the rational number  as the 2-adic expansion of the binary sequences .The sequence  is strictly periodic if and only if  ≤ 0 and || < 1.

If a strictly sequence 𝑎 is generated by an FCSR with connection integer 𝑞, then the 2-adic integer
binary sequence  has the following association.
Proposition 2 (see [2]).Let a periodic sequence  =  0 ,  1 ,  2 , . . .be generated by an FCSR with connection integer  and the 2-adic representation of sequence  is −/.Then one has From the above description about 2-adic integer and FCSR, the 2-adic complexity of periodic sequence  can be regarded as The binary sequences of 2-adic complexity can be got from rational approximation algorithm [2].If the 2-adic complexity of a sequence is greater than half the period, then this sequence is resistant to 2-adic rational approximation attacks.

Main Results
In this section we mainly prove Theorem 7, and some lemmas are given to support the main result proof.
In this paper, we just consider the balanced binary strictly periodic sequence.Then the sequence  = {  =  ⋅ 2 − mod } ∞ =0 in a period of length  satisfies the fact that the number of even integers equals the number of odd integers.We assume that another sequence V = {V  } ∞ =0 over /() in a period of length  is bilateral symmetry with ( − 1)/2.In the following analysis of this paper, we introduce the exponential function   ( * ) =  (2⋅ * )/ as the tool to prove the main theorems.It is easy to get   () =  (2⋅)/ = 1 and   (/2) =  (⋅)/ = −1.Since   =  ⋅ 2 − mod , we have (3) Lemma 4. Let the sequence V over /() be a periodic sequence as described above; one has known that the sequence V in a period of length of  satisfies the following equation: Proof.In a period of length of the sequence V, the number of odd integers equals the number of even integers and  is an even.When V  ∈ /() is an even integer, we assume V  = 2  over /(), and we have (5) Since   ( ⋅ (  − )) =  (⋅(  −)⋅2)/ = 1, then we have ( ⋅ (V  /2 − )) = ( − 1)/2 for V  as an even integer.When V  = 2  + 1 is an odd integer, we get another V  with V  =  − 1 − V  , and As the variable we have Thus Wireless Communications and Mobile Computing Then, from the above analysis, we get The sequences V  have a little limit in Lemma 4, and the sequence V  in a period of length  satisfies when ( − 1)/2 ≡ (/2) mod 2, and V  in a period of length  satisfies when ( − 1)/2 ≡ (/2 + 1) mod 2. (13) Proof.If ( − 1)/2 ≡ (/2) mod 2, we have That is, If ( − 1)/2 ≡ (/2 + 1) mod 2, we have  ( Next we consider the formula Then ) . ( Thus we get the conclusion V   are defined as the even numbers in a period of V, V   are defined as the odd numbers in a period of V, and then the inequality can be expressed as We The balanced binary sequence described in Theorem 7 is resistant to 2-adic attack, but the higher sequence requirements are difficult to achieve.In general, when considering the complexity, it cannot get its exponential representation.

Lemma 5 .
For any positive integer , one has