[go: up one dir, main page]

CN112202547B - A lightweight block cipher GFCS implementation method, device and readable storage medium - Google Patents

A lightweight block cipher GFCS implementation method, device and readable storage medium Download PDF

Info

Publication number
CN112202547B
CN112202547B CN202011254102.8A CN202011254102A CN112202547B CN 112202547 B CN112202547 B CN 112202547B CN 202011254102 A CN202011254102 A CN 202011254102A CN 112202547 B CN112202547 B CN 112202547B
Authority
CN
China
Prior art keywords
round
data
key
blocks
rounds
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.)
Active
Application number
CN202011254102.8A
Other languages
Chinese (zh)
Other versions
CN112202547A (en
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.)
Hengyang Hengjiu Space Decoration Design Engineering Co ltd
Original Assignee
Hengyang Normal 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 Hengyang Normal University filed Critical Hengyang Normal University
Priority to CN202011254102.8A priority Critical patent/CN112202547B/en
Publication of CN112202547A publication Critical patent/CN112202547A/en
Application granted granted Critical
Publication of CN112202547B publication Critical patent/CN112202547B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
    • 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/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0625Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation with splitting of the data block into left and right halves, e.g. Feistel based algorithms, DES, FEAL, IDEA or KASUMI

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 and a device for realizing a lightweight block cipher GFCS and a readable storage medium, wherein the method comprises the following steps: s1: taking a plaintext or ciphertext with the length of L as data to be encrypted or decrypted, and dividing the data into 4 data blocks; acquiring an initial key with the length of L, and dividing the initial key into 4 subblocks, wherein L is a positive integer divided by 4; s2: performing at least N rounds of key expansion round operations on the 4 sub-blocks of the initial key to obtain round keys of the 4 sub-blocks; s3: if the encryption operation is performed, performing N-1 rounds of XOR operation and shift operation by using the round key, the data to be encrypted and the round operation function, and performing a round of XOR operation to obtain a ciphertext; if the data is the decryption operation, firstly carrying out XOR operation once by using the round key, the data to be decrypted and the round operation function, and then carrying out XOR operation and shift operation in the N-1 round to obtain the plaintext. The method of the invention improves the algorithm efficiency while ensuring the safety.

Description

一种轻量级分组密码GFCS实现方法、装置及可读存储介质A lightweight block cipher GFCS implementation method, device and readable storage medium

技术领域technical field

本发明属于密码技术领域,具体涉及一种轻量级分组密码GFCS实现方法、装置及可读存储介质。The invention belongs to the technical field of cryptography, and in particular relates to a method, a device and a readable storage medium for implementing a lightweight block cipher GFCS.

背景技术Background technique

随着万网互联时代的不断推进,各种无线传感器、射频识别标签、智能卡等资源占用量少、耗电量低且实现效率高的嵌入式设备和人们的生活变得息息相关。而无线传感器等电量存储能力较低的资源受限设备中,选用传统的复杂的密码算法对其中的数据进行保护显然是不适用也不必要的,因此,轻量级分组密码算法的设计受到了越来越多的关注。With the continuous advancement of the Internet of Things era, various wireless sensors, radio frequency identification tags, smart cards and other embedded devices that occupy less resources, consume less power, and achieve high efficiency have become closely related to people's lives. In the resource-constrained devices with low power storage capacity such as wireless sensors, it is obviously inapplicable and unnecessary to use traditional complex cryptographic algorithms to protect the data in them. Therefore, the design of lightweight block cipher algorithms has been affected by more and more attention.

轻量级分组密码算法的设计,需要在保证一定安全性的同时,降低算法的运算成本或者是运算性能,使其可以达到资源消耗少,执行效率高,适用于软硬件实现的效果。另一方面,密码分析技术的不断发展,也给轻量级分组密码算法的设计提供了更多的思路和改进方向,促使轻量级分组密码算法既能保证安全性又能提供更好的实现效率。由于轻量级分组密码算法的相关标准并未制定,因此,如何设计出有一定安全性且实现效率高的轻量级分组密码算法仍然是接下来很长一段时间需要研究的重要问题。The design of the lightweight block cipher algorithm needs to reduce the computational cost or computational performance of the algorithm while ensuring certain security, so that it can achieve the effect of low resource consumption and high execution efficiency, which is suitable for software and hardware implementation. On the other hand, the continuous development of cryptanalysis technology also provides more ideas and improvement directions for the design of lightweight block cipher algorithms, which promotes lightweight block cipher algorithms to not only ensure security but also provide better implementation. efficiency. Since the relevant standards for lightweight block cipher algorithms have not been formulated, how to design a lightweight block cipher algorithm with certain security and high implementation efficiency is still an important issue that needs to be studied for a long time in the future.

发明内容SUMMARY OF THE INVENTION

本发明的目的是提供一种全新的手段实现轻量级分组密码算法的加密和解密,在保证安全性的同时,提高算法效率,降低算法的资源占用面积。The purpose of the present invention is to provide a brand-new means to realize the encryption and decryption of the lightweight block cipher algorithm, while ensuring the security, improving the efficiency of the algorithm and reducing the resource occupied area of the algorithm.

一方面,本发明提供的一种轻量级分组密码GFCS实现方法,包括如下步骤:On the one hand, a light-weight block cipher GFCS implementation method provided by the present invention comprises the following steps:

S1:将长度为L明文或密文作为待加密或待解密数据,并将其划分为4个数据块;以及获取长度为L的初始密钥,并将初始密钥划分为4个子块,L为被4整除的正整数;S1: Take plaintext or ciphertext of length L as the data to be encrypted or decrypted, and divide it into 4 data blocks; and obtain an initial key of length L, and divide the initial key into 4 sub-blocks, L is a positive integer divisible by 4;

S2:将所述初始密钥的4个子块进行至少N轮密钥扩展轮运算得到4个子块的轮密钥;S2: perform at least N rounds of key expansion round operations on the 4 sub-blocks of the initial key to obtain the round keys of the 4 sub-blocks;

S3:若为加密运算,利用轮密钥、待加密数据以及轮运算函数先进行N-1轮异或运算和移位运算,再进行一轮异或运算得到密文;S3: If it is an encryption operation, use the round key, the data to be encrypted and the round operation function to first perform N-1 rounds of XOR operation and shift operation, and then perform one round of XOR operation to obtain the ciphertext;

若为解密运算,利用轮密钥、待解密数据以及轮运算函数先进行一次异或运算,再进行N-1轮异或运算和移位运算得到明文。If it is a decryption operation, use the round key, the data to be decrypted and the round operation function to perform an XOR operation first, and then perform N-1 rounds of XOR operation and shift operation to obtain the plaintext.

本发明提供的GFCS分组密码算法主要是基于广义Feistel结构的密码算法,此算法基础运算部件简单轻量,仅由通用部件异或,逻辑与,逻辑非及循环移位构成,并且轮函数重复使用密钥扩展算法的基础部件,可以进一步提高硬件实现效率。The GFCS block cipher algorithm provided by the present invention is mainly a cipher algorithm based on the generalized Feistel structure. The basic operation components of the algorithm are simple and lightweight, and only consist of general components XOR, logical AND, logical NOT and cyclic shift, and the round function is repeatedly used. The basic component of the key expansion algorithm can further improve the efficiency of hardware implementation.

加密运算的前N-1轮异或运算和移位运算中,针对第r轮的每个数据块,按照移位顺序,将标记位i的加密数据

Figure BDA0002772550790000021
标记位i的轮密钥
Figure BDA0002772550790000022
以及下一个标记位的加密数据
Figure BDA0002772550790000023
或下下一个标记位的加密数据
Figure BDA0002772550790000024
输入标记位i的F函数Fi的输出结果
Figure BDA0002772550790000025
Figure BDA0002772550790000026
进行异或运算作为按移位顺序的下一个标记位在下一轮的加密数据
Figure BDA0002772550790000027
其中,若下一个标记位的加密数据是下一个标记位在下一轮的加密数据,则选择下下个标记位的加密数据输入至标记位i的F函数中,其中,四个数据块中对应存在三个F函数与同一识别标记的轮密钥对应的轮运算函数f为同一函数,存在一个F函数满足:F(x)=x。In the first N-1 rounds of XOR operation and shift operation of the encryption operation, for each data block in the rth round, according to the shift order, the encrypted data of the marked bit i is
Figure BDA0002772550790000021
round key for bit i
Figure BDA0002772550790000022
and the encrypted data for the next flag bit
Figure BDA0002772550790000023
or the encrypted data of the next flag bit
Figure BDA0002772550790000024
The output result of the F function F i with the input flag i
Figure BDA0002772550790000025
or
Figure BDA0002772550790000026
XOR operation is performed as the encrypted data in the next round of the next mark bit in the shift order
Figure BDA0002772550790000027
Among them, if the encrypted data of the next marker bit is the encrypted data of the next marker bit in the next round, then select the encrypted data of the next marker bit and input it into the F function of the marker bit i, wherein the corresponding There are three F functions and the round operation function f corresponding to the round key of the same identification mark is the same function, and there is one F function satisfying: F(x)=x.

最后一轮异或运算中,将标记位i的加密数据

Figure BDA0002772550790000028
标记位i的轮密钥
Figure BDA0002772550790000029
以及下一个标记位的加密数据
Figure BDA00027725507900000210
输入标记位i的F函数Fi的输出结果
Figure BDA00027725507900000211
进行异或运算得到密文。In the last round of XOR operation, the encrypted data of bit i will be marked
Figure BDA0002772550790000028
round key for bit i
Figure BDA0002772550790000029
and the encrypted data for the next flag bit
Figure BDA00027725507900000210
The output result of the F function F i with the input flag i
Figure BDA00027725507900000211
Perform an exclusive OR operation to obtain the ciphertext.

解密过程与加密过程相对应,解密过程中移位顺序与加密过程恰好相反,F函数也一一对应,轮密钥的使用是从第N轮密钥扩展到第一轮密钥扩展得到的轮密钥依次参与解密的N轮运算中。The decryption process corresponds to the encryption process. The shift order in the decryption process is exactly the opposite of the encryption process. The F function also corresponds to one-to-one. The keys participate in the N rounds of decryption in turn.

可选地,若为加密运算,待加密数据的4个数据块在前N-1轮异或运算和移位运算对应的计算公式如下:Optionally, if it is an encryption operation, the calculation formulas corresponding to the first N-1 rounds of XOR operation and shift operation of the four data blocks of the data to be encrypted are as follows:

Figure BDA00027725507900000212
Figure BDA00027725507900000212

Figure BDA00027725507900000213
Figure BDA00027725507900000213

Figure BDA00027725507900000214
Figure BDA00027725507900000214

Figure BDA00027725507900000215
Figure BDA00027725507900000215

其中,下标a、b、c、d是加密过程按照移位运算中移位顺序依次设置的数据块识别标记,X表示加密数据,上标r表示轮数,

Figure BDA00027725507900000216
表示第r+1轮密钥扩展轮运算中得到的识别标记a对应的轮密钥;Fa、Fb、Fc、Fd存在三个公式中F函数与同一识别标记的轮密钥对应的轮运算函数f为同一函数,存在一个公式中的F函数满足:F(x)=x。Among them, the subscripts a, b, c, and d are the data block identification marks set sequentially in the encryption process according to the shift sequence in the shift operation, X represents the encrypted data, and the superscript r represents the number of rounds.
Figure BDA00027725507900000216
Indicates the round key corresponding to the identification mark a obtained in the r+1th round of key expansion round operation; F a , F b , F c , and F d exist in three formulas in which the F function corresponds to the round key of the same identification mark The round operation function f of is the same function, and the F function in a formula satisfies: F(x)=x.

可选地,若为加密运算,待加密数据的4个数据块在第N轮异或运算的公式如下:Optionally, if it is an encryption operation, the formula for the N-th XOR operation of the four data blocks of the data to be encrypted is as follows:

Figure BDA00027725507900000217
Figure BDA00027725507900000217

Figure BDA00027725507900000218
Figure BDA00027725507900000218

Figure BDA00027725507900000219
Figure BDA00027725507900000219

Figure BDA00027725507900000220
Figure BDA00027725507900000220

若加密运算,L长度的明文P划分为4个数据块,

Figure BDA00027725507900000221
初始密钥K分也划分为4个子块,K=(k0,k1,k2,k3),针对各个子块设置了轮函数fi=f,(i=0,1,2,3),本发明在加密过程中,针对明文P的4个数据块的移位顺序可以是按照0→1→2→3→0的顺序依次进行移位,还可以针对4个数据块以其他顺序进行移位,譬如0→1→3→2→0,本发明对此不进行具体的限定,为了保护各种移位顺序,本发明按照移位顺序将4个数据块进行了标记,标记为a、b、c、d,对应设置的移位顺序为:a→b→c→d→a;于此同时,上述Fa、Fb、Fc、Fd中存在三个函数与f0、f1、f2、f3对应一致,存在一个函数满足:F(x)=x,具体哪一个本发明对此不进行限定。If the encryption operation is performed, the plaintext P of length L is divided into 4 data blocks,
Figure BDA00027725507900000221
The initial key K is also divided into 4 sub-blocks, K=(k 0 , k 1 , k 2 , k 3 ), and the round function f i =f is set for each sub-block, (i=0,1,2, 3), in the encryption process of the present invention, the shift sequence for the 4 data blocks of the plaintext P may be shifted in the order of 0→1→2→3→0, or the 4 data blocks may be shifted by other Shift in sequence, such as 0→1→3→2→0, which is not specifically limited in the present invention. In order to protect various shift sequences, the present invention marks 4 data blocks according to the shift sequence. are a, b, c, and d, and the corresponding shift order is: a→b→c→d→a; at the same time, there are three functions in the above F a , F b , F c , and F d and f 0 , f 1 , f 2 , and f 3 correspond to the same, and there is a function that satisfies: F(x)=x, which is not limited in the present invention.

可选地,若为解密运算,针对密文

Figure BDA0002772550790000031
进行第一次异或运算的公式如下:Optionally, if it is a decryption operation, for the ciphertext
Figure BDA0002772550790000031
The formula to perform the first XOR operation is as follows:

Figure BDA0002772550790000032
Figure BDA0002772550790000032

Figure BDA0002772550790000033
Figure BDA0002772550790000033

Figure BDA0002772550790000034
Figure BDA0002772550790000034

Figure BDA0002772550790000035
Figure BDA0002772550790000035

式中,下标d、c、b、a是解密过程按照移位运算中移位顺序依次设置的数据块识别标记,Y表示解密数据,

Figure BDA0002772550790000036
表示密文C中数据块识别标记d对应在第一次异或运算的解密结果,上标N表示轮数,
Figure BDA0002772550790000037
表示第N轮密钥扩展轮运算中得到的识别标记a对应的轮密钥;Fa、Fb、Fc、Fd均为设置的F函数,且在三个公式中F函数与同一识别标记的轮密钥对应的轮运算函数f为同一函数,剩余一个公式中的F函数满足:F(x)=x。In the formula, the subscripts d, c, b, and a are the data block identification marks set sequentially in the decryption process according to the shift sequence in the shift operation, Y represents the decrypted data,
Figure BDA0002772550790000036
Indicates that the data block identification mark d in the ciphertext C corresponds to the decryption result of the first XOR operation, and the superscript N represents the number of rounds,
Figure BDA0002772550790000037
Indicates the round key corresponding to the identification mark a obtained in the Nth round of key expansion round operation; F a , F b , F c , and F d are all set F functions, and in the three formulas, the F function is the same as the same identification The round operation function f corresponding to the marked round key is the same function, and the F function in the remaining formula satisfies: F(x)=x.

同理,解密过程的移位顺序与加密过程恰好相反,本发明解密过程的移位顺序为:d→c→b→a→d,所以加密过程和解密过程同一识别标记表示同一个数据块。同理,上述Fa、Fb、Fc、Fd中存在三个函数与f0、f1、f2、f3对应一致,存在一个函数满足:F(x)=x,此过程中与加密过程是一一对应的。Similarly, the shift sequence of the decryption process is just opposite to that of the encryption process. The shift sequence of the decryption process of the present invention is: d→c→b→a→d, so the same identification mark in the encryption process and the decryption process represents the same data block. Similarly, there are three functions in the above F a , F b , F c , and F d that correspond to f 0 , f 1 , f 2 , and f 3 , and there is a function that satisfies: F(x)=x, in this process There is a one-to-one correspondence with the encryption process.

可选地,针对密文C进行N-1轮异或运算和移位运算得到明文的过程中,每一轮异或运算和移位运算公式如下:Optionally, in the process of performing N-1 rounds of XOR operation and shift operation on ciphertext C to obtain plaintext, the formula for each round of XOR operation and shift operation is as follows:

Figure BDA0002772550790000038
Figure BDA0002772550790000038

Figure BDA0002772550790000039
Figure BDA0002772550790000039

Figure BDA00027725507900000310
Figure BDA00027725507900000310

Figure BDA00027725507900000311
Figure BDA00027725507900000311

可选地,步骤S2中初始密钥K的4个子块k0,k1,k2,k3对应在N轮密钥扩展轮运算中,第r轮的轮密钥Kr记为:

Figure BDA00027725507900000312
其中,
Figure BDA00027725507900000313
表示第r轮的轮密钥的四个子块,f0,f1,f2,f3表示四个子块分别对应的轮函数f,其中,轮函数记为:Optionally, the four sub-blocks k 0 , k 1 , k 2 , and k 3 of the initial key K in step S2 correspond to N rounds of key expansion round operations, and the round key K r of the rth round is recorded as:
Figure BDA00027725507900000312
in,
Figure BDA00027725507900000313
Represents the four sub-blocks of the round key of the rth round, f 0 , f 1 , f 2 , f 3 represent the round function f corresponding to the four sub-blocks respectively, where the round function is denoted as:

f:(x0,x1,x2,x3)→(y0,y1,y2,y3)f: (x 0 , x 1 , x 2 , x 3 )→(y 0 , y 1 , y 2 , y 3 )

式中,x0,x1,x2,x3分别表示输入轮函数f的4个子块数据,y0,y1,y2,y3分别表示对应的输出数据,且满足:In the formula, x 0 , x 1 , x 2 , and x 3 respectively represent the four sub-block data of the input round function f, and y 0 , y 1 , y 2 , and y 3 respectively represent the corresponding output data, and satisfy:

Figure BDA0002772550790000041
Figure BDA0002772550790000041

Figure BDA0002772550790000042
Figure BDA0002772550790000042

Figure BDA0002772550790000043
Figure BDA0002772550790000043

Figure BDA0002772550790000044
Figure BDA0002772550790000044

本算法在轮函数中加入逻辑与和逻辑非运算进一步提高算法的混淆性,并且轮函数重复使用密钥扩展算法的基础部件,可以进一步提高硬件实现效率。The algorithm adds logical AND and logical NOT operations to the round function to further improve the confusion of the algorithm, and the round function reuses the basic components of the key expansion algorithm, which can further improve the hardware implementation efficiency.

可选地,若L为128,对应每个数据块的长度为32;若L为64,对应每个数据块的长度为16;若L为256,对应每个数据块的长度为64。Optionally, if L is 128, the corresponding length of each data block is 32; if L is 64, the corresponding length of each data block is 16; if L is 256, the corresponding length of each data block is 64.

第二方面,本发明还提供一种基于上述实现方法的装置,包括:In a second aspect, the present invention also provides a device based on the above implementation method, comprising:

数据加载模块:用于获取长度为L明文或密文,以及获取长度为L的初始密钥,Data loading module: used to obtain the plaintext or ciphertext of length L, and to obtain the initial key of length L,

轮密钥生成模块:用于将所述初始密钥的4个子块进行至少N轮密钥扩展轮运算得到4个子块的轮密钥Round key generation module: used to perform at least N rounds of key expansion round operations on the 4 sub-blocks of the initial key to obtain the round keys of the 4 sub-blocks

加解密模块:用于加密运算时,利用轮密钥、待加密数据以及轮运算函数先N-1轮异或运算和移位运算,再进行一轮异或运算得到密文;或用于解密运算时,利用轮密钥、待解密数据以及轮运算函数先进行一次异或运算,再进行N-1轮异或运算和移位运算得到明文。Encryption and decryption module: When used for encryption operation, use the round key, the data to be encrypted and the round operation function to perform N-1 rounds of XOR operation and shift operation, and then perform one round of XOR operation to obtain the ciphertext; or for decryption During the operation, use the round key, the data to be decrypted and the round operation function to perform an XOR operation first, and then perform N-1 rounds of XOR operation and shift operation to obtain the plaintext.

第三方面,本发明还提供一种装置,包括存储器和处理器,所述存储器存储了计算机程序,所述处理器调用所述计算机程序以执行所述轻量级分组密码GFCS实现方法的步骤。In a third aspect, the present invention further provides an apparatus comprising a memory and a processor, wherein the memory stores a computer program, and the processor invokes the computer program to execute the steps of the method for implementing the lightweight block cipher GFCS.

第四方面,本发明还提供一种可读存储介质,存储了计算机程序,所述计算机程序被处理器调用以执行所述轻量级分组密码GFCS实现方法的步骤。In a fourth aspect, the present invention further provides a readable storage medium storing a computer program, the computer program being invoked by a processor to execute the steps of the method for implementing the lightweight block cipher GFCS.

有益效果beneficial effect

本发明提供的所述方法只利用了简单的异或运算以及循环移位运算,并具有良好的混淆扩散能力,进而使得这种轻量级分组密码在保证一定安全性的同时可以进一步节约硬件资源,提高实现效率,且本发明也通过实验对其安全性和效率进行了验证。The method provided by the present invention only utilizes simple XOR operation and cyclic shift operation, and has good confusion and diffusion capability, so that this lightweight block cipher can further save hardware resources while ensuring certain security , the realization efficiency is improved, and the safety and efficiency of the present invention are also verified through experiments.

附图说明Description of drawings

图1是本发明实施例提供的轻量级分组密码GFCS实现方法的架构示意图。FIG. 1 is a schematic structural diagram of a method for implementing a lightweight block cipher GFCS provided by an embodiment of the present invention.

具体实施方式Detailed ways

本发明提供的一种轻量级分组密码GFCS实现方法的目的在于保证分组密码安全性的同时,进一步降低算法的资源占用面积和提高实现效率。本实施例中以明文P的4个数据块

Figure BDA0002772550790000045
的移位顺序可以是按照0→1→2→3→0的顺序依次进行移位为例进行说明,下面将结合实施例对本发明做进一步的说明。The purpose of the light-weight block cipher GFCS implementation method provided by the present invention is to further reduce the resource occupation area of the algorithm and improve the implementation efficiency while ensuring the security of the block cipher. In this embodiment, four data blocks of plaintext P are used
Figure BDA0002772550790000045
The shift sequence of , can be described by taking the sequence of 0→1→2→3→0 as an example for description, and the present invention will be further described below with reference to the embodiments.

本实施例中所述方法包括:The method described in this embodiment includes:

步骤1:将128比特明文/密文及128比特密钥加载至寄存器,作为待加/解密数据。Step 1: Load the 128-bit plaintext/ciphertext and the 128-bit key into the register as data to be encrypted/decrypted.

步骤2:将128比特的初始密钥进行N轮的密钥扩展算法扩展为N个长度为128比特的轮密钥,密钥扩展算法如下:Step 2: Extend the 128-bit initial key to N rounds of key expansion algorithms into N round keys with a length of 128 bits. The key expansion algorithm is as follows:

将初始密钥K分成4个32比特的子块,即K=(k0,k1,k2,k3),第r轮的轮密钥的输入记为

Figure BDA0002772550790000051
Figure BDA0002772550790000052
其中4个函数分别表示为fi=f<<<ai(i=0,1,2,3;ai=1,7,11,2)是一组基于异或运算,非运算,与运算和循环移位运算的函数,其中f是作用于输入为32比特的函数,<<<为循环左移运算,记为:f:(x0,x1,x2,x3)→(y0,y1,y2,y3),存在:Divide the initial key K into four 32-bit sub-blocks, namely K=(k 0 , k 1 , k 2 , k 3 ), and the input of the round key of the rth round is denoted as
Figure BDA0002772550790000051
Figure BDA0002772550790000052
The four functions are respectively expressed as f i =f<<<a i (i=0,1,2,3; a i =1,7,11,2) is a group based on XOR operation, NOT operation, and The function of operation and cyclic shift operation, where f is the function that acts on the input of 32 bits, <<< is the cyclic left shift operation, denoted as: f:(x 0 , x 1 , x 2 , x 3 )→( y 0 , y 1 , y 2 , y 3 ), exist:

Figure BDA0002772550790000053
Figure BDA0002772550790000053

Figure BDA0002772550790000054
Figure BDA0002772550790000054

Figure BDA0002772550790000055
Figure BDA0002772550790000055

Figure BDA0002772550790000056
Figure BDA0002772550790000056

其中,r为当前轮数,

Figure BDA0002772550790000057
~、&分别表示异或运算,非运算,与运算。where r is the current round number,
Figure BDA0002772550790000057
~ and & represent XOR, NOT, and AND respectively.

步骤3:若为加密运算,则加密过程为:Step 3: If it is an encryption operation, the encryption process is:

将输入明文P分成4个长度为32比特的子块,即

Figure BDA0002772550790000058
首先重复执行下列操作N-1次:Divide the input plaintext P into 4 sub-blocks of length 32 bits, namely
Figure BDA0002772550790000058
First repeat the following N-1 times:

Figure BDA0002772550790000059
Figure BDA0002772550790000059

Figure BDA00027725507900000510
Figure BDA00027725507900000510

Figure BDA00027725507900000511
Figure BDA00027725507900000511

Figure BDA00027725507900000512
Figure BDA00027725507900000512

其中,r为当前轮数,fi(i=0,1,2)与密钥扩展算法中的前三个函数相同;然后执行下列操作1次:where r is the current round number, f i (i=0,1,2) is the same as the first three functions in the key expansion algorithm; then perform the following operations once:

Figure BDA00027725507900000513
Figure BDA00027725507900000513

Figure BDA00027725507900000514
Figure BDA00027725507900000514

Figure BDA00027725507900000515
Figure BDA00027725507900000515

Figure BDA00027725507900000516
Figure BDA00027725507900000516

最后输出密文

Figure BDA00027725507900000517
The final output ciphertext
Figure BDA00027725507900000517

若为解密运算,解密过程为:If it is a decryption operation, the decryption process is:

将输入密文C分成4个长度为32比特的子块,即

Figure BDA00027725507900000518
首先,执行下列操作1次:Divide the input ciphertext C into 4 sub-blocks of length 32 bits, namely
Figure BDA00027725507900000518
First, do the following 1 time:

Figure BDA0002772550790000061
Figure BDA0002772550790000061

Figure BDA0002772550790000062
Figure BDA0002772550790000062

Figure BDA0002772550790000063
Figure BDA0002772550790000063

Figure BDA0002772550790000064
Figure BDA0002772550790000064

然后,重复执行下列操作N-1次:Then, repeat the following operations N-1 times:

Figure BDA0002772550790000065
Figure BDA0002772550790000065

Figure BDA0002772550790000066
Figure BDA0002772550790000066

Figure BDA0002772550790000067
Figure BDA0002772550790000067

Figure BDA0002772550790000068
Figure BDA0002772550790000068

其中,r为当前轮数,fi(i=0,1,2)与密钥扩展算法中的前三个函数相同。最后输出明文

Figure BDA0002772550790000069
Among them, r is the current round number, and f i (i=0, 1, 2) is the same as the first three functions in the key expansion algorithm. final output plaintext
Figure BDA0002772550790000069

应当理解,上述实施例中以明文长度或密文长度128为例,本发明并不局限于此实施例;且本实施例中是F3函数满足:F(x)=x。其他F0、F1、F2分别与f0、f1、f2对应,但本发明并不局限于此实施例。It should be understood that in the above embodiment, the plaintext length or the ciphertext length 128 is used as an example, and the present invention is not limited to this embodiment; and in this embodiment, the F3 function satisfies: F(x) = x. The other F 0 , F 1 , and F 2 correspond to f 0 , f 1 , and f 2 respectively, but the present invention is not limited to this embodiment.

在一些可行的方案中,本发明提供了一种基于上述轻量级分组密码GFCS实现方法的装置,包括:In some feasible solutions, the present invention provides a device based on the above-mentioned lightweight block cipher GFCS implementation method, including:

数据加载模块:用于获取长度为L明文或密文,以及获取长度为L的初始密钥,Data loading module: used to obtain the plaintext or ciphertext of length L, and to obtain the initial key of length L,

轮密钥生成模块:用于将所述初始密钥的4个子块进行至少N轮密钥扩展轮运算得到4个子块的轮密钥Round key generation module: used to perform at least N rounds of key expansion round operations on the 4 sub-blocks of the initial key to obtain the round keys of the 4 sub-blocks

加解密模块:用于加密运算时,利用轮密钥、待加密数据以及轮运算函数先N-1轮异或运算和移位运算,再进行一轮异或运算得到密文;或用于解密运算时,利用轮密钥、待解密数据以及轮运算函数先进行一次异或运算,再进行N-1轮异或运算和移位运算得到明文。Encryption and decryption module: When used for encryption operation, use the round key, the data to be encrypted and the round operation function to perform N-1 rounds of XOR operation and shift operation, and then perform one round of XOR operation to obtain the ciphertext; or for decryption During the operation, use the round key, the data to be decrypted and the round operation function to perform an XOR operation first, and then perform N-1 rounds of XOR operation and shift operation to obtain the plaintext.

具体各个模块的实现过程请参照上述方法的内容,在此不再赘述。应该理解到,上述功能模块的划分仅仅是一种逻辑功能的划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。同时,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。For the specific implementation process of each module, please refer to the content of the above method, which will not be repeated here. It should be understood that the division of the above functional modules is only a division of logical functions, and other division methods may be used in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored. or not. Meanwhile, the above-mentioned integrated units may be implemented in the form of hardware, and may also be implemented in the form of software functional units.

在一些可行的方案中,本发明还提供一种装置,包括存储器和处理器,所述存储器存储了计算机程序,所述处理器调用所述计算机程序以执行所述轻量级分组密码GFCS实现方法的步骤。In some feasible solutions, the present invention also provides an apparatus including a memory and a processor, the memory stores a computer program, and the processor invokes the computer program to execute the lightweight block cipher GFCS implementation method A step of.

在一些可行的方案中,本发明还提供一种可读存储介质,存储了计算机程序,所述计算机程序被处理器调用以执行所述轻量级分组密码GFCS实现方法的步骤。In some feasible solutions, the present invention also provides a readable storage medium storing a computer program, the computer program being invoked by a processor to execute the steps of the method for implementing the lightweight block cipher GFCS.

其中,具体的实现过程还可以参照上述方法内容。应当理解,在本发明实施例中,所称处理器可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable GateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。存储器可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。The specific implementation process may also refer to the content of the above method. It should be understood that, in this embodiment of the present invention, the processor may be a central processing unit (Central Processing Unit, CPU), and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory, which may include read-only memory and random access memory, provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.

所述可读存储介质为计算机可读存储介质,其可以是前述任一实施例所述的控制器的内部存储单元,例如控制器的硬盘或内存。所述可读存储介质也可以是所述控制器的外部存储设备,例如所述控制器上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述可读存储介质还可以既包括所述控制器的内部存储单元也包括外部存储设备。所述可读存储介质用于存储所述计算机程序以及所述控制器所需的其他程序和数据。所述可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。The readable storage medium is a computer-readable storage medium, which may be an internal storage unit of the controller described in any of the foregoing embodiments, such as a hard disk or a memory of the controller. The readable storage medium may also be an external storage device of the controller, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the controller card, flash card (Flash Card) and so on. Further, the readable storage medium may also include both an internal storage unit of the controller and an external storage device. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium can also be used to temporarily store data that has been output or is to be output.

实验验证:Experimental verification:

本发明GFCS-128算法迭代40轮的测试数据如表1所示:The test data of the GFCS-128 algorithm iteration of the present invention for 40 rounds are shown in Table 1:

表1 GFCS算法测试数据Table 1 GFCS algorithm test data

Figure BDA0002772550790000071
Figure BDA0002772550790000071

本发明所述的GFCS密码算法在ASIC进行硬件实现,同时在Synopsys DesignCompiler Version B-2008.09进行综合,其中综合工艺库为SMIC 0.18um,在综合实验中,面积资源单位为1622GE。GFCS-128算法所占用的资源面积是1622GE。各轻量级分组密码算法实现面积比较如表2所示。The GFCS cryptographic algorithm of the present invention is implemented in hardware in ASIC and synthesized in Synopsys DesignCompiler Version B-2008.09, wherein the integrated process library is SMIC 0.18um, and in the comprehensive experiment, the area resource unit is 1622GE. The resource area occupied by the GFCS-128 algorithm is 1622GE. The implementation area comparison of each lightweight block cipher algorithm is shown in Table 2.

表2各轻量级分组密码算法实现面积比较Table 2 Comparison of the implementation area of each lightweight block cipher algorithm

Figure BDA0002772550790000081
Figure BDA0002772550790000081

需要强调的是,本发明所述的实例是说明性的,而不是限定性的,因此本发明不限于具体实施方式中所述的实例,凡是由本领域技术人员根据本发明的技术方案得出的其他实施方式,不脱离本发明宗旨和范围的,不论是修改还是替换,同样属于本发明的保护范围。It should be emphasized that the examples described in the present invention are illustrative rather than restrictive, so the present invention is not limited to the examples described in the specific implementation manner, and all those obtained by those skilled in the art according to the technical solutions of the present invention Other embodiments that do not depart from the spirit and scope of the present invention, whether modified or replaced, also belong to the protection scope of the present invention.

Claims (10)

1.一种轻量级分组密码GFCS实现方法,其特征在于:包括如下步骤:1. a lightweight block cipher GFCS implementation method, is characterized in that: comprise the steps: S1:将长度为L明文或密文作为待加密或待解密数据,并将其划分为4个数据块;以及获取长度为L的初始密钥,并将初始密钥划分为4个子块,L为被4整除的正整数;S1: Take plaintext or ciphertext of length L as the data to be encrypted or decrypted, and divide it into 4 data blocks; and obtain an initial key of length L, and divide the initial key into 4 sub-blocks, L is a positive integer divisible by 4; S2:将所述初始密钥的4个子块进行至少N轮密钥扩展轮运算得到4个子块的轮密钥;S2: perform at least N rounds of key expansion round operations on the 4 sub-blocks of the initial key to obtain the round keys of the 4 sub-blocks; S3:若为加密运算,利用轮密钥、待加密数据以及轮运算函数先进行N-1轮异或运算和移位运算,再进行一轮异或运算得到密文;S3: If it is an encryption operation, use the round key, the data to be encrypted and the round operation function to first perform N-1 rounds of XOR operation and shift operation, and then perform one round of XOR operation to obtain the ciphertext; 若为解密运算,利用轮密钥、待解密数据以及轮运算函数先进行一次异或运算,再进行N-1轮异或运算和移位运算得到明文;If it is a decryption operation, use the round key, the data to be decrypted and the round operation function to perform an XOR operation first, and then perform N-1 rounds of XOR operation and shift operation to obtain the plaintext; 其中,加密运算的前N-1轮异或运算和移位运算中,针对第r轮的每个数据块,按照移位顺序,将标记位i的加密数据
Figure FDA0003526283530000011
标记位i的轮密钥
Figure FDA0003526283530000012
以及下一个标记位的加密数据
Figure FDA0003526283530000013
或下下一个标记位的加密数据
Figure FDA0003526283530000014
输入标记位i的F函数Fi的输出结果
Figure FDA0003526283530000015
Figure FDA0003526283530000016
进行异或运算作为按移位顺序的下一个标记位在下一轮的加密数据
Figure FDA0003526283530000017
其中,若下一个标记位的加密数据是下一个标记位在下一轮的加密数据,则选择下下个标记位的加密数据输入至标记位i的F函数中,其中,三个F函数与轮密钥对应的轮运算函数fi(i=0,1,2,3)中任意三个为同一函数,存在一个F函数满足:F(x)=x;
Among them, in the first N-1 rounds of XOR operation and shift operation of the encryption operation, for each data block in the rth round, according to the shift order, the encrypted data of the marked bit i is
Figure FDA0003526283530000011
round key for bit i
Figure FDA0003526283530000012
and the encrypted data for the next flag bit
Figure FDA0003526283530000013
or the encrypted data of the next flag bit
Figure FDA0003526283530000014
The output result of the F function F i with the input flag i
Figure FDA0003526283530000015
or
Figure FDA0003526283530000016
XOR operation is performed as the encrypted data in the next round of the next mark bit in the shift order
Figure FDA0003526283530000017
Among them, if the encrypted data of the next marker bit is the encrypted data of the next marker bit in the next round, then select the encrypted data of the next marker bit and input it into the F function of the marker bit i, wherein, the three F functions and the round Any three of the round operation functions f i (i=0, 1, 2, 3) corresponding to the key are the same function, and there is an F function that satisfies: F(x)=x;
解密过程与加密过程相对应,解密过程中移位顺序与加密过程恰好相反,F函数一一对应,轮密钥的使用是从第N轮密钥扩展到第一轮密钥扩展得到的轮密钥依次参与解密的N轮运算中。The decryption process corresponds to the encryption process. The shift order in the decryption process is exactly the opposite of the encryption process. The F function corresponds one-to-one. The use of the round key is the round obtained from the Nth round key expansion to the first round key expansion. The keys participate in the N rounds of decryption in turn.
2.根据权利要求1所述的方法,其特征在于:若为加密运算,待加密数据的4个数据块在前N-1轮异或运算和移位运算对应的计算公式如下:2. method according to claim 1, is characterized in that: if it is encryption operation, 4 data blocks of the data to be encrypted are as follows in front N-1 round XOR operation and the corresponding calculation formula of shift operation:
Figure FDA0003526283530000018
Figure FDA0003526283530000018
Figure FDA0003526283530000019
Figure FDA0003526283530000019
Figure FDA00035262835300000110
Figure FDA00035262835300000110
Figure FDA00035262835300000111
Figure FDA00035262835300000111
其中,下标a、b、c、d是加密过程按照移位运算中移位顺序依次设置的数据块识别标记,X表示加密数据,上标r表示轮数,
Figure FDA00035262835300000112
表示第r+1轮密钥扩展轮运算中得到的识别标记a对应的轮密钥;Fa、Fb、Fc、Fd均为设置的F函数。
Among them, the subscripts a, b, c, and d are the data block identification marks set sequentially in the encryption process according to the shift sequence in the shift operation, X represents the encrypted data, and the superscript r represents the number of rounds.
Figure FDA00035262835300000112
Indicates the round key corresponding to the identification mark a obtained in the r+1th round of key expansion round operation; F a , F b , F c , and F d are all set F functions.
3.根据权利要求2所述的方法,其特征在于:若为加密运算,待加密数据的4个数据块在第N轮异或运算的公式如下:3. method according to claim 2 is characterized in that: if it is encryption operation, the formula of 4 data blocks of data to be encrypted is as follows in the Nth round XOR operation:
Figure FDA00035262835300000113
Figure FDA00035262835300000113
Figure FDA0003526283530000021
Figure FDA0003526283530000021
Figure FDA0003526283530000022
Figure FDA0003526283530000022
Figure FDA0003526283530000023
Figure FDA0003526283530000023
4.根据权利要求1所述的方法,其特征在于:若为解密运算,针对密文
Figure FDA0003526283530000024
进行第一次异或运算的公式如下:
4. method according to claim 1 is characterized in that: if it is decryption operation, for ciphertext
Figure FDA0003526283530000024
The formula to perform the first XOR operation is as follows:
Figure FDA0003526283530000025
Figure FDA0003526283530000025
Figure FDA0003526283530000026
Figure FDA0003526283530000026
Figure FDA0003526283530000027
Figure FDA0003526283530000027
Figure FDA0003526283530000028
Figure FDA0003526283530000028
式中,下标d、c、b、a是解密过程按照移位运算中移位顺序依次设置的数据块识别标记,Y表示解密数据,
Figure FDA0003526283530000029
表示密文C中数据块识别标记d对应在第一次异或运算的解密结果,上标N表示轮数,
Figure FDA00035262835300000210
表示第N轮密钥扩展轮运算中得到的识别标记a对应的轮密钥;Fa、Fb、Fc、Fd均为设置的F函数。
In the formula, the subscripts d, c, b, and a are the data block identification marks set sequentially in the decryption process according to the shift sequence in the shift operation, Y represents the decrypted data,
Figure FDA0003526283530000029
Indicates that the data block identification mark d in the ciphertext C corresponds to the decryption result of the first XOR operation, and the superscript N represents the number of rounds,
Figure FDA00035262835300000210
Indicates the round key corresponding to the identification mark a obtained in the Nth round of key expansion round operation; F a , F b , F c , and F d are all set F functions.
5.根据权利要求4所述的方法,其特征在于:针对密文C进行N-1轮异或运算和移位运算得到明文的过程中,每一轮异或运算和移位运算公式如下:5. method according to claim 4, is characterized in that: carry out N-1 round XOR operation and shift operation to obtain the process of plaintext for ciphertext C, each round XOR operation and shift operation formula are as follows:
Figure FDA00035262835300000211
Figure FDA00035262835300000211
Figure FDA00035262835300000212
Figure FDA00035262835300000212
Figure FDA00035262835300000213
Figure FDA00035262835300000213
Figure FDA00035262835300000214
Figure FDA00035262835300000214
6.根据权利要求2所述的方法,其特征在于:步骤S2中初始密钥K的4个子块k0,k1,k2,k3对应在N轮密钥扩展轮运算中,第r轮的轮密钥Kr记为:
Figure FDA00035262835300000215
Figure FDA00035262835300000216
其中,
Figure FDA00035262835300000217
表示第r轮的轮密钥Kr的四个子块,f0,f1,f2,f3表示四个子块对应的4个函数分别表示为fi=f<<<ai(i=0,1,2,3;ai=1,7,11,2),其中f记为:
6. The method according to claim 2, characterized in that: in step S2, the 4 sub-blocks k 0 , k 1 , k 2 , and k 3 of the initial key K correspond to N rounds of key expansion round operations, and the rth The round key K r of the round is denoted as:
Figure FDA00035262835300000215
Figure FDA00035262835300000216
in,
Figure FDA00035262835300000217
Represents the four sub-blocks of the round key K r of the rth round, f 0 , f 1 , f 2 , f 3 represent the four functions corresponding to the four sub-blocks, respectively expressed as f i =f<<<a i (i= 0,1,2,3; a i =1,7,11,2), where f is recorded as:
f:(x0,x1,x2,x3)→(y0,y1,y2,y3)f: (x 0 , x 1 , x 2 , x 3 )→(y 0 , y 1 , y 2 , y 3 ) 式中,x0,x1,x2,x3分别表示输入轮函数f的4个子块数据,y0,y1,y2,y3分别表示对应的输出数据,且满足:In the formula, x 0 , x 1 , x 2 , and x 3 respectively represent the four sub-block data of the input round function f, and y 0 , y 1 , y 2 , and y 3 respectively represent the corresponding output data, and satisfy:
Figure FDA00035262835300000218
Figure FDA00035262835300000218
Figure FDA00035262835300000219
Figure FDA00035262835300000219
Figure FDA00035262835300000220
Figure FDA00035262835300000220
Figure FDA00035262835300000221
Figure FDA00035262835300000221
其中,
Figure FDA0003526283530000031
~、&分别表示异或运算,非运算,与运算。
in,
Figure FDA0003526283530000031
~ and & represent XOR, NOT, and AND respectively.
7.根据权利要求1所述的方法,其特征在于:若L为128,对应每个数据块的长度为32;若L为64,对应每个数据块的长度为16;若L为256,对应每个数据块的长度为64。7. The method according to claim 1, wherein: if L is 128, the length corresponding to each data block is 32; if L is 64, the length corresponding to each data block is 16; if L is 256, The length corresponding to each data block is 64. 8.一种基于权利要求1-7任一项所述方法的装置,其特征在于:包括:8. A device based on the method of any one of claims 1-7, characterized in that: comprising: 数据加载模块:用于获取长度为L明文或密文,以及获取长度为L的初始密钥,Data loading module: used to obtain the plaintext or ciphertext of length L, and to obtain the initial key of length L, 轮密钥生成模块:用于将所述初始密钥的4个子块进行至少N轮密钥扩展轮运算得到4个子块的轮密钥Round key generation module: used to perform at least N rounds of key expansion round operations on the 4 sub-blocks of the initial key to obtain the round keys of the 4 sub-blocks 加解密模块:用于加密运算时,利用轮密钥、待加密数据以及轮运算函数先N-1轮异或运算和移位运算,再进行一轮异或运算得到密文;或用于解密运算时,利用轮密钥、待解密数据以及轮运算函数先进行一次异或运算,再进行N-1轮异或运算和移位运算得到明文。Encryption and decryption module: When used for encryption operation, use the round key, the data to be encrypted and the round operation function to perform N-1 rounds of XOR operation and shift operation, and then perform one round of XOR operation to obtain the ciphertext; or for decryption During the operation, use the round key, the data to be decrypted and the round operation function to perform an XOR operation first, and then perform N-1 rounds of XOR operation and shift operation to obtain the plaintext. 9.一种装置,其特征在于:包括存储器和处理器,所述存储器存储了计算机程序,所述处理器调用所述计算机程序以执行权利要求1-7任一项所述方法的步骤。9. An apparatus, characterized by comprising a memory and a processor, wherein the memory stores a computer program, and the processor invokes the computer program to execute the steps of the method of any one of claims 1-7. 10.一种计算机可读存储介质,其特征在于:存储了计算机程序,所述计算机程序被处理器调用以执行权利要求1-7任一项所述方法的步骤。10. A computer-readable storage medium, characterized in that: a computer program is stored, and the computer program is invoked by a processor to execute the steps of the method of any one of claims 1-7.
CN202011254102.8A 2020-11-11 2020-11-11 A lightweight block cipher GFCS implementation method, device and readable storage medium Active CN112202547B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011254102.8A CN112202547B (en) 2020-11-11 2020-11-11 A lightweight block cipher GFCS implementation method, device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011254102.8A CN112202547B (en) 2020-11-11 2020-11-11 A lightweight block cipher GFCS implementation method, device and readable storage medium

Publications (2)

Publication Number Publication Date
CN112202547A CN112202547A (en) 2021-01-08
CN112202547B true CN112202547B (en) 2022-04-12

Family

ID=74033409

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011254102.8A Active CN112202547B (en) 2020-11-11 2020-11-11 A lightweight block cipher GFCS implementation method, device and readable storage medium

Country Status (1)

Country Link
CN (1) CN112202547B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910630B (en) * 2021-02-02 2022-12-06 浙江大华技术股份有限公司 Method and device for replacing expanded key
CN113452508B (en) * 2021-08-27 2021-12-10 北京华云安信息技术有限公司 Data encryption method, device, equipment and computer readable storage medium
CN114070552B (en) * 2021-10-28 2022-11-08 国核自仪系统工程有限公司 Data encryption method and device, data decryption method and device, equipment and medium
CN114598470B (en) * 2022-03-17 2023-12-19 北京启明星辰信息安全技术有限公司 Encryption method, decryption method, device, and computer-readable storage medium
CN115694796A (en) * 2022-10-08 2023-02-03 国网江苏省电力有限公司电力科学研究院 Internet of things security encryption method and device, storage medium and electronic equipment
CN115987489B (en) * 2022-12-28 2023-10-20 北京电子科技学院 Lightweight encryption and decryption method and device and storage medium
CN118869192A (en) * 2024-07-04 2024-10-29 北京海泰方圆科技股份有限公司 Dynamic packet length encryption method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111431697A (en) * 2020-03-31 2020-07-17 衡阳师范学院 A New Lightweight Block Cipher CORL Implementation Method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW556111B (en) * 1999-08-31 2003-10-01 Toshiba Corp Extended key generator, encryption/decryption unit, extended key generation method, and storage medium
KR101330664B1 (en) * 2012-06-15 2013-11-15 한국전자통신연구원 Low power encryption apparatus and method
CN104333446B (en) * 2014-11-10 2016-01-13 衡阳师范学院 A new ultra-lightweight QTL block cipher implementation method
CN109768854B (en) * 2019-03-29 2020-02-04 衡阳师范学院 Method for realizing lightweight block cipher algorithm
CN111245598B (en) * 2020-03-31 2022-06-14 衡阳师范学院 A Realization Method of Lightweight AEROGEL Block Cipher
CN111464564B (en) * 2020-05-08 2022-12-23 郑州信大捷安信息技术股份有限公司 Data high-speed encryption and decryption method and device based on symmetric cryptographic algorithm

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111431697A (en) * 2020-03-31 2020-07-17 衡阳师范学院 A New Lightweight Block Cipher CORL Implementation Method

Also Published As

Publication number Publication date
CN112202547A (en) 2021-01-08

Similar Documents

Publication Publication Date Title
CN112202547B (en) A lightweight block cipher GFCS implementation method, device and readable storage medium
CN101626289B (en) Design method of AES encryption chip and computer encryptor
CN104639314A (en) Device based on AES (advanced encryption standard) encryption/decryption algorithm and pipelining control method
CN102006161B (en) Nonlinear transformation method for symmetric key encryption and implementation method thereof
CN1648967A (en) Cryptographic apparatus, cryptographic method, and storage medium thereof
CN106254062A (en) Stream cipher realizes device and sequential cipher realization method thereof
Lu et al. A compact, lightweight and low-cost 8-bit datapath AES circuit for IOT applications in 28nm CMOS
US20110261958A1 (en) Table splitting for cryptographic processes
CN114640454A (en) Cryptosystem of post-quantum cryptography Kyber protocol
CN102664730B (en) 128 bit secret key expansion method based on AES (Advanced Encryption Standard)
CN112134691A (en) Method, device and medium for realizing NLCS block cipher with repeatable components
CN106982116B (en) A Local File Encryption Method Based on AES Based on Reversible Logic Circuit
CN113949504B (en) High-speed SM4 cryptographic algorithm circuit suitable for mobile device
CN111478766B (en) Method, device and storage medium for realizing block cipher MEG
CN105472602A (en) Encryption device and encryption method
JP2004054128A (en) Encrypting system
CN111314054B (en) A lightweight ECEG block cipher implementation method, system and storage medium
Duc et al. Hardware implementation of AES with S-Box using composite-field for WLAN systems
CN107171782B (en) AES private log encryption method based on reversible logic circuit
CN114826560B (en) Lightweight block cipher CREF implementation method and system
CN109039608B (en) An 8-bit AES circuit based on dual S cores
CN111614457A (en) Improved lightweight packet encryption and decryption method, device and storage medium based on P permutation
JP2004078053A (en) Ciphering device
CN116647328A (en) Lightweight block cipher realization method and system of novel PSP structure
CN112054889B (en) Method and device for generating message authentication code and computer readable storage medium

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20231208

Address after: 421000 Northwest storefront on the second floor of Linghu Township Sports Center, Zhuhui District, Hengyang City, Hunan Province

Patentee after: Hengyang Hengjiu Space Decoration Design Engineering Co.,Ltd.

Address before: 421002 Hengyang Teachers College, No.16, Henghua Road, Zhuhui District, Hengyang City, Hunan Province

Patentee before: Hengyang Normal University

TR01 Transfer of patent right