Stream Cipher Algorithm: An Overview
SHARE
10
July 31, 2024
Stream cipher, also known as sequence cipher, is an important symmetric cryptographic system. Based on hardware implementation, massages are encrypted or decrypted bit by bit. The key stream can be generated by shift register circuit. The basic idea is to use the key k to generate a key stream z=z0z1… And the plaintext string x=x0x1... to y=y0y1y2... =Ez0(x0)Ez1(x1)... seeing the following rules. The keys stream is generated by the keys stream generator f: zi=f(k,σi) (σi is the state of the memory element at time i in the encipher and f is the function generated by k,σi).
The distinction between stream cipher and block ciphers is whether they have memory or not. (Figure 1). The rolling key z0=f(k,σ0) of the stream cipher is fully determined by the function f, the key k, and the specified initial state σ0. Because the plaintext of the input encryptor may affect the storage state of the internal memory element, σi(i>0) may depend on k, σ0, x0, x1, ..., xi-1 and other parameters.
Figure1: The Distinction between Block Ciphers and Stream Cipher
Stream ciphers are classified into synchronous and self-synchronous types according to whether the storage status σi in the encryptor depends on the input plaintext characters. σi independent of plaintext characters is called synchronous stream cipher, otherwise it is called self-synchronous stream cipher. Because the generation of the key stream of the self-synchronous stream cipher is related to the plaintext, it is difficult to analyze theoretically. At present, most research results are about synchronous stream cipher. This article mainly introduces the implementation principle of synchronous stream cipher. In the synchronous stream cipher, since zi=f(k,σi) is independent of plaintext characters, the cipher text character yi=Ezi(xi) is also independent of previous plaintext characters. Therefore, the encryptor of the synchronous stream cipher can be divided into two parts: the key stream generator and the encryption converter (Figure 2).
Figure 2: Synchronous Stream Cipher System Model
As long as the transformation is invertible, many kinds of options are available for the Ezi cryptographic transformation of synchronous stream ciphers. The actual digital security systems are generally binary systems, so the binary additive stream cipher of GF(2) in the finite domain is the most commonly used stream cipher system at present (Figure 3). Its encryption transformation can be expressed as yi=zixi.
Figure 3. Model of Additive Stream Cipher
The key stream generator can generally be regarded as a finite-state automaton with parameter k, consisting of the output symbol set Z, the state set ∑, the functions φ and ψ, and the initial state σ0 (Figure 4). The state transition function φ : σi→σi+1σi to the new state σi+1, and the output function ψ : σi→zi changes the current state σi to an element zi in the output symbol set. The key to the design of the key stream generator is to find out the appropriate state transition function φ and output function ψ. So that the output sequence satisfies several conditions of the key stream, and is economical and easy to implement on the device. In order to achieve this goal, nonlinear functions must be adopted. The most popular and practical key stream generators (Figure 5) are implemented by one or more linear feedback registers.
Figure 4: Principles of Key Stream Generator
Figure 5: Two Common Types of Key Stream Generators
The shift register is a major component of the key stream generated by stream ciphers. The n-order linear feedback shift register on GF(2) consists of n binary registers and a linear feedback function f(a1,a2,...,an) composition (Figure 6). Each memory becomes a level of a register. And at any time, the contents of these levels constitute the states of the feedback shift register, each state corresponds to an n-dimensional vector on GF(2), with 2n kinds of possible states. The state of each moment can be expressed in an n-long sequence a1,a2,…,an or n-dimensional vector (a1,a2,…,an), where ai is the content of level i memory. The initial state is inputted by the user, and when the ith shift clock pulse arrives, each level of memory ai passes its contents to the next level content ai-1. And according to the state of the register at this time a1,a2,... , it can calculate f(a1,a2,…,an), as an for the next moment. Feedback function f(a1,a2,…,an) is a Boolean function of n, that's n variables a1,a2,…,an can independently take the two possible results of 0 and 1. The operations in the function have logical and, logical or, logical complement operations and so on, and the final function value is also 0 or 1.
Figure 6: N-order Linear Feedback Shift Register on GF(2)
Stream Cipher offers simplicity, easy implementation for hardware, fast encryption and decryption processing, and no or only limited error propagation. Thus, it maintains advantages in practical applications, especially in special or secret organizations. Typical application fields include wireless communication and diplomatic communication. Common steam cipher:SNOW3G in Europe, ZUC in China, RC4 in the United States and more.
TOPIC: