[go: up one dir, main page]

CN115459906A - A parallelization and anti-dynamic degradation method for key stream generator - Google Patents

A parallelization and anti-dynamic degradation method for key stream generator Download PDF

Info

Publication number
CN115459906A
CN115459906A CN202211026812.4A CN202211026812A CN115459906A CN 115459906 A CN115459906 A CN 115459906A CN 202211026812 A CN202211026812 A CN 202211026812A CN 115459906 A CN115459906 A CN 115459906A
Authority
CN
China
Prior art keywords
key
key stream
generator
generators
stream generator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211026812.4A
Other languages
Chinese (zh)
Inventor
江东
李文昕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui University
Original Assignee
Anhui University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui University filed Critical Anhui University
Priority to CN202211026812.4A priority Critical patent/CN115459906A/en
Publication of CN115459906A publication Critical patent/CN115459906A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/001Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using chaotic signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a method for parallelizing and resisting dynamic degradation of a key stream generator, which comprises the following steps: s1, receiving an initial key; s2, initializing all the key stream generators by adopting a preset key stream generator initialization method on the basis of an initial key simultaneously or step by step, and parallelly generating key streams by adopting a preset parallel working method for the initialized key stream generators; and S3, combining the key stream generated by the key stream generator by adopting a preset combination method to generate a final key stream for encryption and decryption. And S4, after the key stream generator iterates to the specified iteration upper limit, re-initializing the key stream generator by adopting a preset key stream generator re-initialization method. The method is based on the parallel calculation of multiple key stream generators, the speed of generating the key stream by the stream cipher is increased, and the possibility of dynamic degradation is reduced by utilizing the automatic initialization of the key stream generators.

Description

一种密钥流生成器并行化和抗动态退化方法A parallelization and anti-dynamic degradation method for key stream generator

技术领域technical field

本发明涉及密码学的技术领域,具体涉及一种密钥流生成器并行化和抗动态退化方法。The invention relates to the technical field of cryptography, in particular to a parallelization and dynamic degradation resistance method of a key stream generator.

背景技术Background technique

流密码(stream cipher)属于对称密码体制(symmetric cryptosystem),采用相同或等同密钥实现加密、解密,因其具有硬件实现容易、加解密简单及错误传播概率小等优点,在保密通信领域有大量应用。流密码以一组密钥作为输入,对密钥流生成器进行初始化,产生一组密钥流,然后依据一定规则使用密钥流与明文或密文进行运算,实现明文的加密或密文的解密。Stream cipher (stream cipher) belongs to the symmetric cryptosystem, which uses the same or equivalent key to realize encryption and decryption. Because of its advantages of easy hardware implementation, simple encryption and decryption, and low probability of error propagation, it has a large number of applications in the field of secure communication. application. The stream cipher takes a set of keys as input, initializes the key stream generator to generate a set of key streams, and then uses the key stream to perform operations with plaintext or ciphertext according to certain rules to realize encryption of plaintext or encryption of ciphertext. decrypt.

密钥流生成器是流密码的核心组成部分,它用输入的密钥完成初始化,依据一定规则进行反复迭代,产生密钥流。因每一次迭代与密钥或前面迭代结果相关,只能依次完成迭代,生成密钥流。这严重限制了密钥流生成器生成密钥流的速度,无法满足高速加解密应用场景的需求。The key stream generator is the core component of the stream cipher. It completes the initialization with the input key, and iterates repeatedly according to certain rules to generate the key stream. Because each iteration is related to the key or the result of the previous iteration, the iterations can only be completed sequentially to generate the key stream. This severely limits the speed at which the key stream generator can generate key streams, which cannot meet the needs of high-speed encryption and decryption application scenarios.

此外,无论密钥流生成器理论上具有多好的统计特性,但在有限精度的硬件上实现,均会出现动态退化(dynamical degradation)的问题。可能削弱密钥流的统计特性,进而降低系统安全性。In addition, no matter how good the statistical properties of the key stream generator are in theory, if it is implemented on limited-precision hardware, the problem of dynamical degradation will occur. It may weaken the statistical properties of the key stream, thereby reducing system security.

发明内容Contents of the invention

为克服密钥流生成器的速度和动态退化问题,本发明提供一种密钥流生成器的并行化和抗动态退化方法,有效提升密钥流生成速度,缓解动态退化问题。In order to overcome the speed and dynamic degradation problems of the key stream generator, the present invention provides a method for parallelizing the key stream generator and anti-dynamic degradation, which can effectively increase the key stream generation speed and alleviate the dynamic degradation problem.

为了实现上述目的,本发明采用的一种密钥流生成器并行化和抗动态退化方法,In order to achieve the above object, a kind of keystream generator parallelization and anti-dynamic degradation method adopted by the present invention,

S1、接收初始密钥;S1. Receive the initial key;

S2、基于初始密钥在所有密钥流生成器上采用预设密钥流生成器初始化方法同时或分步对密钥流生成器进行初始化,初始化后密钥流生成器采用预设并行工作方法,并行生成密钥流;S2. Based on the initial key, use the preset key stream generator initialization method on all key stream generators to initialize the key stream generators at the same time or step by step. After initialization, the key stream generators use the preset parallel working method , to generate the keystream in parallel;

S3、对密钥流生成器生成的密钥流采用预设组合方法进行组合,生成用于加解密的最终密钥流。S3. Combining the key stream generated by the key stream generator using a preset combination method to generate a final key stream for encryption and decryption.

S4、密钥流生成器迭代到指定迭代上限后,采用预设密钥流生成器重新初始化方法对密钥流生成器进行重新初始化。S4. After the key stream generator iterates to the specified iteration upper limit, the key stream generator is reinitialized by using a preset key stream generator reinitialization method.

进一步的,初始密钥至少有1个密钥,1个密钥用于完成1个密钥流生成器的初始化,1个密钥至少由1个参数组成。Further, the initial key has at least one key, one key is used to complete the initialization of one key stream generator, and one key consists of at least one parameter.

进一步的,密钥流生成器采用映射迭代法生成迭代结果,具体过程如下:Further, the key stream generator uses the mapping iteration method to generate iteration results, and the specific process is as follows:

映射记为F,密钥记为k0,将密钥代入映射完成密钥流生成器的初始化:F(k0)=z1,其中z1称为迭代结果;The map is denoted as F, the key is denoted as k 0 , and the key is substituted into the map to complete the initialization of the key stream generator: F(k 0 )=z 1 , where z 1 is called the iteration result;

使用z1替换k0中的一个或多个参数得到k1,将k1代入映射有: F(k1)=z2,根据F(ki-1)=zi进行迭代,可生成一组迭代结果(密钥流)z1,…,znUse z 1 to replace one or more parameters in k 0 to get k 1 , and substitute k 1 into the map: F(k 1 )=z 2 , and iterate according to F(k i-1 )= zi to generate a Group iteration results (keystream) z 1 ,...,z n .

进一步的,记密钥流生成器总个数为M,则Further, remember that the total number of keystream generators is M, then

所述S2中的同时对密钥流生成器进行初始化,包括:At the same time in the S2, the key stream generator is initialized, including:

基于初始密钥初始化M个密钥流生成器,所述初始密钥中的密钥个数为M;Initializing M key stream generators based on the initial key, where the number of keys in the initial key is M;

所述S2中的分步对密钥流生成器进行初始化,包括:The steps in S2 initialize the key stream generator, including:

首先使用初始密钥初始化K个密钥流生成器,所述初始密钥中的密钥个数为K,其中1≤K≤M,然后使用K个密钥流生成器的迭代结果根据k0的结构构造M-K个密钥,完成剩余密钥流生成器的初始化。First use the initial key to initialize K key stream generators, the number of keys in the initial key is K, where 1≤K≤M, and then use the iteration results of K key stream generators according to k 0 The structure constructs MK keys, and completes the initialization of the remaining key stream generators.

进一步的,所述预设并行工作方法包括:Further, the preset parallel working method includes:

在S2中同时对密钥流生成器进行初始化的情况下:全部密钥流生成器并行迭代,生成的迭代结果采用预设组合方法进行组合,生成用于加解密的最终密钥流;In the case of initializing the key stream generators in S2 at the same time: all key stream generators iterate in parallel, and the generated iteration results are combined using a preset combination method to generate the final key stream for encryption and decryption;

在S2中分步对密钥流生成器进行初始化的情况下:K(1≤K≤M)个密钥流生成器用于生成密钥,其中M为密钥流生成器总个数,对剩余的 M-K个密钥流生成器完成初始化,M-K个密钥流生成器并行迭代,生成的迭代结果采用预设组合方法进行组合,生成用于加解密的最终密钥流。In the case of step-by-step initialization of key stream generators in S2: K (1≤K≤M) key stream generators are used to generate keys, where M is the total number of key stream generators, and the remaining The M-K key stream generators are initialized, and the M-K key stream generators iterate in parallel, and the generated iteration results are combined using a preset combination method to generate the final key stream for encryption and decryption.

进一步的,所述预设组合方法包括顺序排列、交替排列及置乱排列。Further, the preset combination method includes sequential arrangement, alternating arrangement and scrambling arrangement.

进一步的,所述S4中,预设密钥流生成器重新初始化方法包括:Further, in said S4, the preset key stream generator reinitialization method includes:

从密钥流生成器自身迭代结果中选择相应选择迭代结果构造新的密钥,将新密钥代入映射,对映射进行重新初始化;Select the corresponding selected iteration result from the key stream generator's own iteration result to construct a new key, substitute the new key into the map, and re-initialize the map;

和/或and / or

从其它密钥流生成器迭代结果中选择相应迭代结果构造新密钥,将新密钥代入映射,对映射进行重新初始化。Select the corresponding iterative result from the iterative results of other key stream generators to construct a new key, substitute the new key into the map, and reinitialize the map.

本发明的一种密钥流生成器并行化和抗动态退化方法,具备如下有益效果:A key stream generator parallelization and anti-dynamic degradation method of the present invention has the following beneficial effects:

本发明所述的一种密钥流生成器的并行化和抗动态退化方法,通过设置多个密钥流生成器,以用户输入密钥直接初始化所有密钥流生成器或先初始化一个或多个密钥流生成器,再使用生成的密钥流初始化其它密钥流生成器的方式,实现多个密钥流生成器并行工作,同时生成密钥流,有效提升密钥流生成速度。According to the parallelization and anti-dynamic degradation method of a key stream generator in the present invention, by setting multiple key stream generators, all key stream generators are directly initialized with the key input by the user or one or more key stream generators are initialized first One key stream generator, and then use the generated key stream to initialize other key stream generators, so that multiple key stream generators can work in parallel and generate key streams at the same time, effectively improving the key stream generation speed.

上述方法适用不同软硬件平台,易于实现。例如,在微型嵌入式系统 JetsonXavier NX(6核NVIDIA Carmel ARM v8.2 64位CPU)上可实现4倍以上速度提升。使用性能更强劲的CPU可以获得更高的吞吐率,且可以利用异构计算,比如使用GPU进一步提升性能。此外所有密钥流生成器在迭代一定次数后,自动使用生成的密钥流进行重新初始化,极大降低了密钥流生成器陷入环,出现动态退化的可能性。The above method is applicable to different software and hardware platforms and is easy to implement. For example, a speed increase of more than 4 times can be achieved on the tiny embedded system JetsonXavier NX (6-core NVIDIA Carmel ARM v8.2 64-bit CPU). Using a more powerful CPU can achieve higher throughput, and can take advantage of heterogeneous computing, such as using a GPU to further improve performance. In addition, all key stream generators automatically use the generated key stream to re-initialize after a certain number of iterations, which greatly reduces the possibility of key stream generators falling into a loop and experiencing dynamic degradation.

参照后文的说明与附图,详细公开了本发明的特定实施方式,指明了本发明的原理可以被采用的方式,应该理解,本发明的实施方式在范围上并不因而受到限制,在所附权利要求的精神和条款的范围内,本发明的实施方式包括许多改变、修改和等同。With reference to the following descriptions and drawings, specific embodiments of the present invention are disclosed in detail, and the manner in which the principle of the present invention can be adopted is indicated. It should be understood that the embodiments of the present invention are not limited thereby in scope. Embodiments of the present invention encompass many changes, modifications and equivalents within the spirit and scope of the appended claims.

附图说明Description of drawings

图1为一种密钥流生成器并行化和抗动态退化方法的流程示意图;Fig. 1 is a schematic flow diagram of a key stream generator parallelization and anti-dynamic degradation method;

图2为本发明实施例中流密码解密的流程示意图;FIG. 2 is a schematic flow diagram of stream cipher decryption in an embodiment of the present invention;

图3为一种密钥流生成器并行化和抗动态退化方法的工作框图;Fig. 3 is a working block diagram of a kind of keystream generator parallelization and anti-dynamic degradation method;

图4为基于混沌映射算法的一种密钥流生成器并行化和抗动态退化方法的工作框图;Fig. 4 is the working block diagram of a kind of keystream generator parallelization and anti-dynamic degeneration method based on chaotic mapping algorithm;

图5为本发明中更新混沌映射方法的工作框图。Fig. 5 is a working block diagram of the method for updating the chaotic map in the present invention.

具体实施方式detailed description

为使本发明的目的、技术方案和优点更加清楚明了,下面通过附图中及实施例,对本发明进行进一步详细说明。但是应该理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限制本发明的范围。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below through the accompanying drawings and embodiments. However, it should be understood that the specific embodiments described here are only used to explain the present invention, and are not intended to limit the scope of the present invention.

需要说明的是,当元件被称为“设置于、设有”另一个元件,它可以直接在另一个元件上或者也可以存在居中的元件,当一个元件被认为是“连接、相连接”另一个元件,它可以是直接连接到另一个元件或者可能同时存在居中元件,“固连”为固定连接的含义,固定连接的方式有很多种,不作为本文的保护范围,本文中所使用的术语“垂直的”“水平的”“左”“右”以及类似的表述只是为了说明的目的,并不表示是唯一的实施方式。It should be noted that when an element is said to be "disposed on, provided with" another element, it may be directly on the other element or there may also be an intermediate element. A component, it can be directly connected to another component or there may be an intermediate component at the same time. "Fixed connection" means fixed connection. There are many ways of fixed connection, which are not within the scope of protection of this article. The term used in this article "Vertical", "horizontal", "left", "right" and similar expressions are for the purpose of illustration only and do not represent the only embodiment.

除非另有定义,本文所使用的所有技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同,本文中在说明书中所使用的术语只是为了描述具体的实施方式的目的,不是旨在限制本发明,本文中所使用的术语“和/或”包括一个或多个相关的所列项目的任意的和所有的组合;Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of the present invention. The terms used in the specification herein are only for the purpose of describing specific embodiments, not In order to limit the present invention, the term "and/or" used herein includes any and all combinations of one or more related listed items;

请参阅说明书附图1-5,对用于实施本发明的实施方式进行说明,在流密码工作过程中,应用一种密钥流生成器并行化和抗动态退化方法,一般来说,流密码一般以一组密钥初始化伪随机数生成器,然后批量生成比特串用户数据加密,具体的,Please refer to the accompanying drawings 1-5 of the description to illustrate the embodiment for implementing the present invention. In the stream cipher working process, a kind of key stream generator parallelization and anti-dynamic degradation method is applied. Generally speaking, the stream cipher Generally, a pseudo-random number generator is initialized with a set of keys, and then the bit string user data encryption is generated in batches. Specifically,

一个流密码体制由一个六元组(M1,C1,K1,Z,E,D)和函数g组成,其中 M1为明文空间,C1为密文空间,K1为所有可能的密钥集合,Z为所有可能的密钥流字符集合,它们满足:A stream cipher system consists of a six-tuple (M1, C1, K1, Z, E, D) and function g, where M1 is the plaintext space, C1 is the ciphertext space, K1 is all possible key sets, and Z is The set of all possible keystream characters such that:

函数g为一个密钥流生成器,它以密钥k∈K1为输入,完成初始化,然后输出密钥流z=z1,z2,…zn(zi∈Z)。Function g is a key stream generator, which takes key k∈K1 as input, completes initialization, and then outputs key stream z=z 1 , z 2 ,...z n (z i ∈ Z).

对任意的z∈Z,都存在一个加密函数ez∈E和相应的解密函数dz∈D。并且对每一ez:M1→C 1,dz:C1→M 1,对任意的明文m∈M1,均有 dz(ez(m1))=m1。For any z∈Z, there exists an encryption function e z ∈E and a corresponding decryption function d z ∈D. And for each e z :M1→C 1,d z :C1→M 1, for any plaintext m∈M1, d z (e z (m1))=m1.

如图2所示,流密码加密、解密过程一般为用户A输入密钥k1初始化密钥流生成器,密钥流生成器批量生成密钥流z并对明文m1加密生成密文 c1,通过信道传输给用户B。用户B使用相同密钥k1初始化密钥流生成器生成密钥流z,使用密钥流z对密文c1解密,可得到明文m1。As shown in Figure 2, the process of stream cipher encryption and decryption is generally that user A inputs key k1 to initialize the key stream generator, and the key stream generator generates key stream z in batches and encrypts plaintext m1 to generate ciphertext c1. transmitted to user B. User B uses the same key k1 to initialize the key stream generator to generate a key stream z, and uses the key stream z to decrypt the ciphertext c1 to obtain the plaintext m1.

流密码的核心密钥流生成器的一般工作过程如图2所示,以一组输入对密钥流生成器进行初始化,初始化后经过某种处理,生成第一个迭代结果z1,然后根据z1,再产生第二个迭代结果。已有的密钥流生成器工作过程可能略有不同,但基本都是根据前面产生的迭代结果,继续进行迭代生成密钥流。迭代结果之间的相关性造成密钥流生成器只能顺序工作,依次生成迭代结果,形成密钥流,难以并行工作,无法满足高速加解密应用场景的需求。The general working process of the core key stream generator of the stream cipher is shown in Figure 2. The key stream generator is initialized with a set of inputs. After initialization, after some processing, the first iteration result z 1 is generated, and then according to z 1 , and produce the result of the second iteration. The working process of existing key stream generators may be slightly different, but they basically continue to iteratively generate key streams based on the previous iteration results. The correlation between the iterative results causes the key stream generator to work only sequentially, generating iterative results in turn to form a key stream, which is difficult to work in parallel and cannot meet the needs of high-speed encryption and decryption application scenarios.

为提升密码流生成速度,在图1-图3中示出了一种密钥流生成器并行化和抗动态退化方法的一种实施例,在该实施例中,包括以下实施步骤:In order to improve the generation speed of the cipher stream, an embodiment of a key stream generator parallelization and anti-dynamic degradation method is shown in Fig. 1-Fig. 3, in this embodiment, the following implementation steps are included:

一种密钥流生成器并行化和抗动态退化方法,包括:A keystream generator parallelization and dynamic degradation resistance method, comprising:

S1、接收用户输入的初始密钥;在该步骤中,上述初始密钥的数量为至少一个;S1. Receive the initial key input by the user; in this step, the number of the above-mentioned initial key is at least one;

S2、基于初始密钥在所有密码流生成器上采用预设密钥序列生成方法分步或同时生成对应密码流生成器的密钥序列;S2. Based on the initial key, use a preset key sequence generation method on all cipher stream generators to generate step by step or simultaneously the key sequences corresponding to the cipher stream generators;

在该步骤中,基于初始密钥在所有密码流生成器上采用预设密钥序列生成方法分步生成对应密码流生成器的密钥序列,包括:In this step, the key sequence corresponding to the cipher stream generator is generated step by step on all cipher stream generators using the preset key sequence generation method based on the initial key, including:

在用户输入的初始密钥个数为K时,基于K个密码流生成器作为第一密码流生成器,采用预设密钥序列生成方法生成对应于每个第一密码流生成器的第一密钥序列,1≤K<M,其中M是密码流生成器的总个数;When the number of initial keys input by the user is K, based on K cipher stream generators as the first cipher stream generators, the preset key sequence generation method is used to generate the first key corresponding to each first cipher stream generator. Key sequence, 1≤K<M, where M is the total number of cipher stream generators;

基于余下M-K个密码流生成器作为第二密码流生成器,第二密码流生成器基于第一密钥序列中数据两两一组作为控制参数和初始条件,采用预设密钥序列生成方法生成对应于每个第二密码流生成器的第二密钥序列。Based on the remaining M-K cipher stream generators as the second cipher stream generator, the second cipher stream generator is based on the data in the first key sequence in pairs as control parameters and initial conditions, using the preset key sequence generation method to generate A second key sequence corresponding to each second cipher stream generator.

基于初始密钥在所有密码流生成器上采用预设密钥序列生成方法同时生成对应密码流生成器的密钥序列,包括:Based on the initial key, use the preset key sequence generation method on all cipher stream generators to simultaneously generate the key sequence of the corresponding cipher stream generator, including:

在用户输入的初始密钥个数为M时,基于每个初始密钥中分别作为每个密码流生成器的输入,采用预设密钥序列生成方法生成对应于每个密码流生成器的密钥序列,其中M是密码流生成器的总个数。When the number of initial keys input by the user is M, based on the input of each cipher stream generator in each initial key, the encryption corresponding to each cipher stream generator is generated by using the preset key sequence generation method key sequence, where M is the total number of cipher stream generators.

在该步骤S2中,当密钥流生成器迭代一定次数后,可能生成和前面迭代结果相同或极相似的迭代结果,可能使迭代陷入环,反复生成一组相同或类似的密钥流,削弱密钥流统计特性,降低系统安全性。In this step S2, when the key stream generator iterates for a certain number of times, it may generate the same or very similar iterative results as the previous iteration results, which may cause the iteration to fall into a loop and repeatedly generate a set of the same or similar key streams, weakening Statistical features of key streams reduce system security.

因此,在本发明中当密码流生成器中的混沌映射算法达到预设最大迭代次数时,采用第一抗动态退化方法或者第二抗动态退化方法对混沌映射算法的控制参数和初始条件进行初始化以更新混沌映射算法;Therefore, in the present invention, when the chaotic mapping algorithm in the cipher stream generator reaches the preset maximum number of iterations, the first anti-dynamic degradation method or the second anti-dynamic degradation method is used to initialize the control parameters and initial conditions of the chaotic mapping algorithm to update the chaotic mapping algorithm;

所述第一抗动态退化方法包括:The first anti-dynamic degradation method includes:

在密码流生成器自身达到最大迭代次数后,再迭代两次,将两个迭代结果作为控制参数和初始条件对自己进行重新初始化,或者直接基于密码流生成器自身生成的密钥序列中的两个参数作为控制参数和初始条件对自己进行重新初始化;After the cipher stream generator itself reaches the maximum number of iterations, it iterates twice, and uses the two iteration results as control parameters and initial conditions to reinitialize itself, or directly based on the two keys in the key sequence generated by the cipher stream generator itself. parameters as control parameters and initial conditions to reinitialize itself;

所述第二抗动态退化方法包括:在M个密码流生成器中利用未达到最大迭代次数的密码流生成器继续进行混沌映射迭代,基于所述未达到最大迭代次数的密码流生成器的迭代结果作为已经达到最大迭代次数的密码流生成器的新的控制参数和初始条件,实现对已经达到最大迭代次数的密码流生成器的重新初始化。The second anti-dynamic degradation method includes: using the cipher stream generator that has not reached the maximum number of iterations among the M cipher stream generators to continue to perform chaos map iterations, based on the iteration of the cipher stream generator that has not reached the maximum number of iterations The result is used as new control parameters and initial conditions of the cipher stream generator that has reached the maximum number of iterations, realizing the reinitialization of the cipher stream generator that has reached the maximum number of iterations.

S3、基于每个密码流生成器的密钥序列采用预设组合方法进行组合,获取用于加解密的密钥流。S3. Combining the key sequence based on each cipher stream generator using a preset combination method to obtain a key stream for encryption and decryption.

在该步骤中,存在两种获取用于加解密的密码流的方式。In this step, there are two ways to obtain the cipher stream used for encryption and decryption.

第一种获取用于加解密的密码流的方式:该方式对应基于初始密钥在所有密码流生成器上采用预设密钥序列生成方法分步生成对应密码流生成器的密钥序列的方法,在此方法后的步骤S3中,基于所有第二密钥序列采用预设组合方法进行组合,获取用于加解密的密钥流,相对应的,The first way to obtain the cipher stream used for encryption and decryption: this method corresponds to the method of generating the key sequence of the corresponding cipher stream generator step by step using the preset key sequence generation method on all cipher stream generators based on the initial key , in the step S3 after this method, based on all the second key sequences, they are combined using a preset combination method to obtain the key stream for encryption and decryption. Correspondingly,

第一种获取用于加解密的密码流的方式:该方式对应基于初始密钥在所有密码流生成器上采用预设密钥序列生成方法同步生成对应密码流生成器的密钥序列的方法,在此方法后的步骤S3中,基于M个密码流生成器生成的M个密钥序列,采用预设组合方法进行组合,获取用于加解密的密钥流。The first way to obtain the cipher stream used for encryption and decryption: this method corresponds to the method of synchronously generating the key sequence of the corresponding cipher stream generator on all cipher stream generators using the preset key sequence generation method based on the initial key, In step S3 following this method, based on M key sequences generated by M cipher stream generators, they are combined using a preset combination method to obtain key streams for encryption and decryption.

作为上述方案的进一步优化,预设组合方法包括顺序排列、交替排列及置乱排列。As a further optimization of the above solution, the preset combination methods include sequential arrangement, alternate arrangement and scrambling arrangement.

如图4及图5,对于上述一种密钥流生成器并行化和抗动态退化方法进行进一步讨论:As shown in Figure 4 and Figure 5, further discussion on the parallelization and anti-dynamic degradation method of the above-mentioned key stream generator:

所述预设密钥序列生成方法采用混沌映射算法,该算法包括以下步骤:The method for generating the preset key sequence adopts a chaotic mapping algorithm, which comprises the following steps:

基于初始密钥中的一个参数记为控制参数p∈(0,0.α),另一个参数记为初始条件x0∈[0,β],基于p和x0执行混沌映射生成迭代结果

Figure BDA0003815847920000091
Based on one parameter in the initial key is recorded as the control parameter p ∈ (0,0.α), and the other parameter is recorded as the initial condition x 0 ∈ [0, β], based on p and x 0 perform chaotic mapping to generate iteration results
Figure BDA0003815847920000091

所述混沌映射算法为:The chaotic mapping algorithm is:

Figure BDA0003815847920000092
Figure BDA0003815847920000092

所述混沌映射算法的迭代过程中,在迭代结果

Figure BDA0003815847920000093
时,将
Figure BDA0003815847920000094
作为p值。In the iterative process of the chaotic mapping algorithm, the iterative result
Figure BDA0003815847920000093
when, will
Figure BDA0003815847920000094
as a p-value.

下面基于混沌映射对一种密钥流生成器并行化和抗动态退化方法作优选实施例,在该优选实施例中上述初始密钥的数量选为1,初始密钥产生的两个参数分别为p∈(0,0.5),x0∈[0,1],p为控制参数,x为初始条件,。将两个参数代入F(x0,p)可生成迭代结果x1,再将x1代入F(x1,p)可生成迭代结果x2,以此类推,反复迭代生成一组迭代结果{x1,…,xn},生成的迭代结果可用于加密解密。The following is a preferred embodiment of a key stream generator parallelization and anti-dynamic degradation method based on chaotic mapping. In this preferred embodiment, the number of the above-mentioned initial keys is selected as 1, and the two parameters of the initial key generation are respectively p∈(0,0.5), x 0 ∈[0,1], p is the control parameter, x is the initial condition,. Substituting two parameters into F(x 0 ,p) can generate the iteration result x 1 , and then substituting x 1 into F(x 1 ,p) can generate the iteration result x 2 , and so on, repeat iterations to generate a set of iteration results{ x 1 ,…,x n }, the generated iteration result can be used for encryption and decryption.

由上述过程可知,每一个迭代结果的产生都和前面迭代过程相关,必须依次执行,无法并行处理,基于本发明可采用如下方案实现并行化,提升迭代结果产生速度:It can be seen from the above process that the generation of each iteration result is related to the previous iteration process, and must be executed sequentially, and cannot be processed in parallel. Based on the present invention, the following scheme can be used to realize parallelization and improve the generation speed of iteration results:

参考图4,设置参数p∈(0,0.5),x0∈[0,1],作为密钥初始化一个混沌映射,并生成一组迭代结果

Figure BDA0003815847920000095
Referring to Figure 4, set parameters p ∈ (0,0.5), x 0 ∈ [0,1], initialize a chaotic map as a key, and generate a set of iteration results
Figure BDA0003815847920000095

将上述迭代结果两两一组作为新的控制参数和初始条件,初始化一组混沌映射。注意因p∈(0,0.5),当迭代结果

Figure BDA0003815847920000101
时,可将
Figure BDA0003815847920000102
作为p 值。Use the above iterative results in pairs as new control parameters and initial conditions to initialize a set of chaotic maps. Note that due to p∈(0,0.5), when the iteration result
Figure BDA0003815847920000101
when, you can
Figure BDA0003815847920000102
as a p-value.

完成初始化后,多个混沌映射可以并行工作,同时生成迭代结果,有效提升迭代结果生成速度。After initialization, multiple chaotic maps can work in parallel and generate iteration results at the same time, effectively improving the speed of iteration result generation.

当混沌映射生成足够密钥后,将所有生成的迭代结果按一定规则组合。如下所示,可采用顺序排列的方式将所有迭代结果组织成

Figure BDA0003815847920000103
该序列可用于加解密。When the chaotic map generates enough keys, all generated iteration results are combined according to certain rules. As shown below, all iteration results can be organized in sequential order as
Figure BDA0003815847920000103
This sequence can be used for encryption and decryption.

对于上述过程,更新该混沌映射的方法如图5a及图5b所示:For the above process, the method of updating the chaotic map is shown in Figure 5a and Figure 5b:

图5a中,对于途中左侧混沌映射,达到迭代上限后,再迭代两次,将两个迭代结果作为控制参数和初始条件对自己进行重新初始化。In Figure 5a, for the chaotic map on the left side of the way, after reaching the upper limit of the iteration, iterate twice, and use the two iteration results as the control parameters and initial conditions to reinitialize itself.

图5b中,对于并行生成迭代结果的混沌映射,达到迭代上限后,图中左边混沌映射继续迭代,生成一组新的迭代结果,对右边混沌映射重新初始化。In Figure 5b, for the chaotic map that generates iteration results in parallel, after the upper limit of iteration is reached, the left chaotic map in the figure continues to iterate to generate a new set of iterative results, and the right chaotic map is reinitialized.

至此,本领域技术人员应认识到,虽然本文已详尽示出和描述了本发明的多个示例性实施例,但是,在不脱离本发明精神和范围的情况下,仍可根据本发明公开的内容直接确定或推导出符合本发明原理的许多其他变型或修改。因此,本发明的范围应被理解和认定为覆盖了所有这些其他变型或修改。So far, those skilled in the art should appreciate that, although a number of exemplary embodiments of the present invention have been shown and described in detail herein, without departing from the spirit and scope of the present invention, the disclosed embodiments of the present invention can still be used. Many other variations or modifications consistent with the principles of the invention are directly identified or derived from the content. Accordingly, the scope of the present invention should be understood and deemed to cover all such other variations or modifications.

Claims (7)

1.一种密钥流生成器并行化和抗动态退化方法,其特征在于,1. A key stream generator parallelization and anti-dynamic degradation method, is characterized in that, S1、接收初始密钥;S1. Receive the initial key; S2、基于初始密钥在所有密钥流生成器上采用预设密钥流生成器初始化方法同时或分步对密钥流生成器进行初始化,初始化后密钥流生成器采用预设并行工作方法,并行生成密钥流;S2. Based on the initial key, use the preset key stream generator initialization method on all key stream generators to initialize the key stream generators at the same time or step by step. After initialization, the key stream generators use the preset parallel working method , to generate the keystream in parallel; S3、对密钥流生成器生成的密钥流采用预设组合方法进行组合,生成用于加解密的最终密钥流。S3. Combining the key stream generated by the key stream generator using a preset combination method to generate a final key stream for encryption and decryption. S4、密钥流生成器迭代到指定迭代上限后,采用预设密钥流生成器重新初始化方法对密钥流生成器进行重新初始化。S4. After the key stream generator iterates to the specified iteration upper limit, the key stream generator is reinitialized by using a preset key stream generator reinitialization method. 2.根据权利要求1所述的一种密钥流生成器并行化和抗动态退化方法,其特征在于:初始密钥至少有1个密钥,1个密钥用于完成1个密钥流生成器的初始化,1个密钥至少由1个参数组成。2. A kind of key stream generator parallelization and anti-dynamic degradation method according to claim 1, it is characterized in that: initial key has at least 1 key, and 1 key is used for completing 1 key stream Initialization of the generator, 1 key consists of at least 1 parameter. 3.根据权利要求1所述的一种密钥流生成并行化和抗动态退化方法,其特征在于:密钥流生成器采用映射迭代法生成迭代结果,具体过程如下:3. A kind of key stream generation parallelization and anti-dynamic degeneration method according to claim 1, is characterized in that: key stream generator adopts mapping iteration method to generate iteration result, and concrete process is as follows: 映射记为F,密钥记为k0,将密钥代入映射完成密钥流生成器的初始化:F(k0)=z1,其中z1称为迭代结果;The map is denoted as F, the key is denoted as k 0 , and the key is substituted into the map to complete the initialization of the key stream generator: F(k 0 )=z 1 , where z 1 is called the iteration result; 使用z1替换k0中的一个或多个参数得到k1,将k1代入映射有:F(k1)=z2,根据F(ki-1)=zi进行迭代,可生成一组迭代结果(密钥流)z1,…,znUse z 1 to replace one or more parameters in k 0 to get k 1 , and substitute k 1 into the map: F(k 1 )=z 2 , and iterate according to F(k i-1 )= zi to generate a Group iteration results (keystream) z 1 ,...,z n . 4.根据权利要求1或3所述的一种密钥流生成器并行化和抗动态退化方法,其特征在于:记密钥流生成器总个数为M,则4. according to claim 1 or 3 described a kind of key stream generator parallelization and anti-dynamic degeneration method, it is characterized in that: remember key stream generator total number is M, then 所述S2中的同时对密钥流生成器进行初始化,包括:At the same time in the S2, the key stream generator is initialized, including: 基于初始密钥初始化M个密钥流生成器,所述初始密钥中的密钥个数为M;Initializing M key stream generators based on the initial key, where the number of keys in the initial key is M; 所述S2中的分步对密钥流生成器进行初始化,包括:The steps in S2 initialize the key stream generator, including: 首先使用初始密钥初始化K个密钥流生成器,所述初始密钥中的密钥个数为K,其中1≤K≤M,然后使用K个密钥流生成器的迭代结果根据k0的结构构造M-K个密钥,完成剩余密钥流生成器的初始化。First use the initial key to initialize K key stream generators, the number of keys in the initial key is K, where 1≤K≤M, and then use the iteration results of K key stream generators according to k 0 The structure constructs MK keys, and completes the initialization of the remaining key stream generators. 5.根据权利要求4所述的一种密钥流生成器并行化和抗动态退化方法,其特征在于:所述预设并行工作方法包括:5. A kind of key stream generator parallelization and anti-dynamic degradation method according to claim 4, it is characterized in that: described preset parallel working method comprises: 在S2中同时对密钥流生成器进行初始化的情况下:全部密钥流生成器并行迭代,生成的迭代结果采用预设组合方法进行组合,生成用于加解密的最终密钥流;In the case of initializing the key stream generators in S2 at the same time: all key stream generators iterate in parallel, and the generated iteration results are combined using a preset combination method to generate the final key stream for encryption and decryption; 在S2中分步对密钥流生成器进行初始化的情况下:K(1≤K≤M)个密钥流生成器用于生成密钥,其中M为密钥流生成器总个数,对剩余的M-K个密钥流生成器完成初始化,M-K个密钥流生成器并行迭代,生成的迭代结果采用预设组合方法进行组合,生成用于加解密的最终密钥流。In the case of step-by-step initialization of key stream generators in S2: K (1≤K≤M) key stream generators are used to generate keys, where M is the total number of key stream generators, and the remaining The M-K key stream generators are initialized, and the M-K key stream generators iterate in parallel, and the generated iteration results are combined using a preset combination method to generate the final key stream for encryption and decryption. 6.根据权利要求5所述的一种密钥流生成器并行化和抗动态退化方法,其特征在于:所述预设组合方法包括顺序排列、交替排列及置乱排列。6 . The method for parallelizing and anti-dynamic degradation of a key stream generator according to claim 5 , wherein the preset combination method includes sequential arrangement, alternate arrangement and scrambling arrangement. 7 . 7.根据权利要求1所述的一种密钥流生成器并行化和抗动态退化方法,其特征在于,所述S4中,预设密钥流生成器重新初始化方法包括:7. A kind of key stream generator parallelization and anti-dynamic degradation method according to claim 1, is characterized in that, in described S4, preset key stream generator reinitialization method comprises: 从密钥流生成器自身迭代结果中选择相应选择迭代结果构造新的密钥,将新密钥代入映射,对映射进行重新初始化;Select the corresponding selected iteration result from the key stream generator's own iteration result to construct a new key, substitute the new key into the map, and re-initialize the map; 和/或and / or 从其它密钥流生成器迭代结果中选择相应迭代结果构造新密钥,将新密钥代入映射,对映射进行重新初始化。Select corresponding iteration results from other key stream generator iteration results to construct a new key, substitute the new key into the map, and reinitialize the map.
CN202211026812.4A 2022-08-25 2022-08-25 A parallelization and anti-dynamic degradation method for key stream generator Pending CN115459906A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211026812.4A CN115459906A (en) 2022-08-25 2022-08-25 A parallelization and anti-dynamic degradation method for key stream generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211026812.4A CN115459906A (en) 2022-08-25 2022-08-25 A parallelization and anti-dynamic degradation method for key stream generator

Publications (1)

Publication Number Publication Date
CN115459906A true CN115459906A (en) 2022-12-09

Family

ID=84297893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211026812.4A Pending CN115459906A (en) 2022-08-25 2022-08-25 A parallelization and anti-dynamic degradation method for key stream generator

Country Status (1)

Country Link
CN (1) CN115459906A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010021254A1 (en) * 2000-03-09 2001-09-13 Soichi Furuya Method and apparatus for symmetric-key encryption
US20020054679A1 (en) * 2000-09-07 2002-05-09 Ivan Vesely Cascaded stream cipher
US20120128153A1 (en) * 2009-07-28 2012-05-24 Jovan Golic Symmetric-key encryption method and cryptographic system employing the method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010021254A1 (en) * 2000-03-09 2001-09-13 Soichi Furuya Method and apparatus for symmetric-key encryption
US20020054679A1 (en) * 2000-09-07 2002-05-09 Ivan Vesely Cascaded stream cipher
US20120128153A1 (en) * 2009-07-28 2012-05-24 Jovan Golic Symmetric-key encryption method and cryptographic system employing the method

Similar Documents

Publication Publication Date Title
JP7007384B2 (en) Increased ambiguity
CN105490802B (en) The parallel encryption and decryption communication means of improvement SM4 based on GPU
US6189095B1 (en) Symmetric block cipher using multiple stages with modified type-1 and type-3 feistel networks
CN107147487B (en) Symmetric key random block cipher
US20020006197A1 (en) Stream-cipher method and apparatus
CN109981249B (en) Encryption and decryption method and device based on zipper type dynamic hash and NLFSR
CN107425968A (en) A kind of SM2 elliptic curve public key cryptographic algorithms under binary field F2m realize system
CN104270247A (en) Efficient Universal Hash Function Authentication Scheme for Quantum Cryptosystem
Panda Data security in wireless sensor networks via AES algorithm
CN108933653A (en) A kind of AES encrypting and deciphering system and method based on large-scale data
CN113965315B (en) A lightweight cryptographically secure pseudo-random number generator and pseudo-random number generation method
CN114051208B (en) Method, device and computer-readable storage medium for vehicle-ground safety communication
CN115811398A (en) Dynamic S-box-based block cipher algorithm, device, system and storage medium
JP2006317802A (en) Pseudorandom number generation system, encryption system, and decryption system
GB2612142A (en) A method of constructing a public-key system in qap-based homomorphic encryption
CN117411618A (en) Key generation method, device and encryption method applied to international event
CN103701591A (en) Sequence password realization method and key stream generating method and device
Awad et al. Efficient image chaotic encryption algorithm with no propagation error
CN111262685A (en) Novel method and device for realizing Shield block cipher generated by secret key and readable storage medium
CN114124354A (en) Deterministic authentication encryption and decryption device and method
CN115459906A (en) A parallelization and anti-dynamic degradation method for key stream generator
CN117240430A (en) An encryption and decryption method and circuit based on asynchronous circuits
JP5207153B2 (en) Pseudo random number generation system
Xiaolin et al. POTA: A Pipelined Oblivious Transfer Acceleration Architecture for Secure Multi-Party Computation
Leermakers et al. Quantum Alice and Silent Bob: qubit-based quantum key recycling with almost no classical communication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination