CN112202547A - Lightweight block cipher GFCS (generic fragment signature Circuit) implementation method and device and readable storage medium - Google Patents

Lightweight block cipher GFCS (generic fragment signature Circuit) implementation method and device and readable storage medium Download PDF

Info

Publication number
CN112202547A
CN112202547A CN202011254102.8A CN202011254102A CN112202547A CN 112202547 A CN112202547 A CN 112202547A CN 202011254102 A CN202011254102 A CN 202011254102A CN 112202547 A CN112202547 A CN 112202547A
Authority
CN
China
Prior art keywords
round
data
key
blocks
functions
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.)
Granted
Application number
CN202011254102.8A
Other languages
Chinese (zh)
Other versions
CN112202547B (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

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

Lightweight block cipher GFCS (generic fragment signature Circuit) implementation method and device and readable storage medium
Technical Field
The invention belongs to the technical field of passwords, and particularly relates to a lightweight block cipher GFCS (software code conversion) implementation method and device and a readable storage medium.
Background
With the continuous push of the internet era of ten thousands of networks, embedded devices such as various wireless sensors, radio frequency identification tags, smart cards and the like which have small occupied amount of resources, low power consumption and high realization efficiency become relevant to the life of people. In resource-limited devices with low electric quantity storage capacity, such as wireless sensors, the traditional complex cryptographic algorithm is obviously not suitable for or unnecessary for protecting data in the resource-limited devices, so that the design of the lightweight block cryptographic algorithm is concerned more and more.
The design of the lightweight block cipher algorithm needs to ensure certain security and reduce the operation cost or operation performance of the algorithm, so that the algorithm can achieve the effects of low resource consumption, high execution efficiency and suitability for realizing software and hardware. On the other hand, the continuous development of the cryptoanalysis technology also provides more ideas and improvement directions for the design of the lightweight block cipher algorithm, and prompts the lightweight block cipher algorithm to ensure the security and provide better realization efficiency. Because the relevant standards of the lightweight block cipher algorithm are not established, how to design the lightweight block cipher algorithm with certain safety and high implementation efficiency is still an important problem to be researched for a long time.
Disclosure of Invention
The invention aims to provide a brand new means for realizing encryption and decryption of a lightweight block cipher algorithm, and improve the efficiency of the algorithm and reduce the resource occupation area of the algorithm while ensuring the security.
On one hand, the invention provides a method for realizing a lightweight block cipher GFCS, which 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 GFCS block cipher algorithm provided by the invention is mainly based on a cipher algorithm of a generalized Feistel structure, basic operation components of the algorithm are simple and light, the algorithm is only composed of general components of XOR, logical AND, logical NOT and cyclic shift, and round functions repeatedly use basic components of a key expansion algorithm, so that the hardware realization efficiency can be further improved.
In the first N-1 rounds of XOR operation and shift operation of encryption operation, the encrypted data of a mark bit i is arranged according to the shift sequence for each data block of the r round
Figure BDA0002772550790000021
Round key with flag bit i
Figure BDA0002772550790000022
And the encrypted data of the next flag bit
Figure BDA0002772550790000023
Or the next marker bit of the encrypted data
Figure BDA0002772550790000024
F function F of input flag bit iiOutput result of (2)
Figure BDA0002772550790000025
Or
Figure BDA0002772550790000026
Performing an exclusive-or operation as encrypted data of a next round with a next flag bit in a shift order
Figure BDA0002772550790000027
If the encrypted data of the next marker bit is the encrypted data of the next marker bit in the next round, the encrypted data of the next marker bit is selected to be input into the F function of the marker bit i, wherein three F functions corresponding to the four data blocks and the round operation function F corresponding to the round key of the same identification marker are the same function, and one F function is satisfied: f (x) x.
In the last round of XOR operation, the encrypted data of the mark bit i
Figure BDA0002772550790000028
Round key with flag bit i
Figure BDA0002772550790000029
And the encrypted data of the next flag bit
Figure BDA00027725507900000210
F function F of input flag bit iiOutput result of (2)
Figure BDA00027725507900000211
And carrying out XOR operation to obtain a ciphertext.
The decryption process corresponds to the encryption process, the shift sequence in the decryption process is just opposite to the encryption process, the F functions also correspond one by one, and the round keys obtained by expanding the Nth round key to the first round key are used for participating in N rounds of operations of decryption in sequence.
Optionally, if the encryption operation is performed, the calculation formula corresponding to the preceding N-1 rounds of xor operation and shift operation of 4 data blocks of the data to be encrypted is as follows:
Figure BDA00027725507900000212
Figure BDA00027725507900000213
Figure BDA00027725507900000214
Figure BDA00027725507900000215
wherein, subscripts a, b, c and d are data block identification marks which are sequentially arranged according to the shifting sequence in the shifting operation in the encryption process, X represents encrypted data, superscript r represents the number of rounds,
Figure BDA00027725507900000216
representing a round key corresponding to the identification mark a obtained in the r +1 round key expansion round operation; fa、Fb、Fc、FdThe F function in three formulas and the round operation function F corresponding to the round key of the same identification mark are the same function, and the F function in one formula meets the following conditions: f (x) x.
Optionally, if the encryption operation is performed, the formula of the N-th round xor operation on the 4 data blocks of the data to be encrypted is as follows:
Figure BDA00027725507900000217
Figure BDA00027725507900000218
Figure BDA00027725507900000219
Figure BDA00027725507900000220
if encryption is performed, the plaintext P of L length is divided into 4 data blocks,
Figure BDA00027725507900000221
the initial key K is also divided into 4 sub-blocks, K ═ K0,k1,k2,k3) For each subblock, a round function f is setiF, (i ═ 0,1,2,3), in the encryption process, the shifting sequence of the 4 data blocks in the plaintext P may be sequentially shifted according to the sequence of 0 → 1 → 2 → 3 → 0, or may be shifted according to another sequence of the 4 data blocks, for example, 0 → 1 → 3 → 2 → 0, and the present invention is not particularly limited to this, and in order to protect various shifting sequences, the present invention marks the 4 data blocks according to the shifting sequence, and marks them as a, b, c, d, and the shifting sequence set correspondingly is: a → b → c → d → a; at the same time, Fa、Fb、Fc、FdIn which there are three functions and f0、f1、f2、f3Correspondingly, there is a function that satisfies: f (x) is not limited to x, and specific examples thereof are not intended to limit the scope of the present invention.
Optionally, if the operation is decryption, the ciphertext is targeted
Figure BDA0002772550790000031
The formula for performing the first exclusive-or operation is as follows:
Figure BDA0002772550790000032
Figure BDA0002772550790000033
Figure BDA0002772550790000034
Figure BDA0002772550790000035
in the formula, subscript d,c. b, a are data block identification marks which are sequentially arranged according to the shifting sequence in the shifting operation in the decryption process, Y represents the decrypted data,
Figure BDA0002772550790000036
the data block identification mark d in the ciphertext C corresponds to the decryption result of the first exclusive-or operation, the superscript N represents the round number,
Figure BDA0002772550790000037
representing a round key corresponding to the identification mark a obtained in the N round key expansion round operation; fa、Fb、Fc、FdAll the three formulas are set F functions, the F functions in the three formulas and the round operation functions F corresponding to the round keys of the same identification mark are the same function, and the F functions in the remaining one formula meet the following conditions: f (x) x.
Similarly, the shift sequence of the decryption process is just opposite to that of the encryption process, and the shift sequence of the decryption process of the invention is as follows: d → c → b → a → d, so the same identification mark represents the same data block for both the encryption process and the decryption process. For the same reason, above-mentioned Fa、Fb、Fc、FdIn which there are three functions and f0、f1、f2、f3Correspondingly, there is a function that satisfies: f (x) x, which corresponds to the encryption process one to one.
Optionally, in the process of performing N-1 rounds of xor and shift operations on the ciphertext C to obtain the plaintext, a formula of each round of xor and shift operations is as follows:
Figure BDA0002772550790000038
Figure BDA0002772550790000039
Figure BDA00027725507900000310
Figure BDA00027725507900000311
optionally, 4 sub-blocks K of the initial key K in step S20,k1,k2,k3Corresponding to the round key K of the r-th round in the N-round key expansion round operationrIs recorded as:
Figure BDA00027725507900000312
wherein the content of the first and second substances,
Figure BDA00027725507900000313
four sub-blocks, f, representing round keys of round r0,f1,f2,f3And representing wheel functions f corresponding to the four sub-blocks respectively, wherein the wheel functions are recorded as:
f:(x0,x1,x2,x3)→(y0,y1,y2,y3)
in the formula, x0,x1,x2,x34 subblock data, y, each representing an input round function f0,y1,y2,y3Respectively represent corresponding output data, and satisfy:
Figure BDA0002772550790000041
Figure BDA0002772550790000042
Figure BDA0002772550790000043
Figure BDA0002772550790000044
the algorithm adds logical AND and logical NOT operation in the round function to further improve the confusability of the algorithm, and the round function repeatedly uses the basic components of the key expansion algorithm to further improve the hardware realization efficiency.
Optionally, 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 for each data block is 64.
In a second aspect, the present invention further provides an apparatus based on the foregoing implementation method, including:
a data loading module: for obtaining plaintext or ciphertext with length L, and obtaining initial key with length L,
a round key generation module: 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
An encryption and decryption module: when the method is used for encryption operation, the round key, the data to be encrypted and the round operation function are utilized to perform N-1 round XOR operation and shift operation, and then a round XOR operation is performed to obtain a ciphertext; or when the method is used for 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 N-1 round XOR operation and shift operation to obtain a plaintext.
In a third aspect, the present invention further provides an apparatus comprising a memory and a processor, the memory storing a computer program, and the processor calling the computer program to execute the steps of the lightweight block cipher GFCS implementation method.
In a fourth aspect, the present invention also provides a readable storage medium storing a computer program, which is called by a processor to execute the steps of the lightweight block cipher GFCS implementation method.
Advantageous effects
The method provided by the invention only utilizes simple XOR operation and cyclic shift operation, and has good confusion diffusion capability, so that the lightweight block cipher can further save hardware resources and improve the realization efficiency while ensuring certain security, and the security and the efficiency of the lightweight block cipher are verified through experiments.
Drawings
Fig. 1 is a schematic structural diagram of a GFCS implementation method for lightweight block ciphers according to an embodiment of the present invention.
Detailed Description
The invention provides a method for realizing a lightweight block cipher GFCS, which aims to further reduce the resource occupation area of an algorithm and improve the realization efficiency while ensuring the safety of the block cipher. In the present embodiment, 4 data blocks of plaintext P are used
Figure BDA0002772550790000045
The shifting sequence of (1) can be the sequence of 0 → 1 → 2 → 3 → 0, and the invention will be further described with reference to the following embodiments.
The method in the embodiment comprises the following steps:
step 1: and loading the 128-bit plaintext/ciphertext and the 128-bit key into a register to be used as data to be encrypted/decrypted.
Step 2: expanding the 128-bit initial key into N128-bit round keys by using an N-round key expansion algorithm, wherein the key expansion algorithm is as follows:
the initial key K is divided into 4 32-bit sub-blocks, i.e. K ═ K0,k1,k2,k3) And the input of the round key of the r-th round is recorded as
Figure BDA0002772550790000051
Figure BDA0002772550790000052
Wherein the 4 functions are respectively expressed as fi=f<<<ai(i=0,1,2,3;ai1,7,11,2) is a set of functions based on exclusive or, non-operation, and operation and cyclic shift operation, where f is a function that acts on the input as 32 bits,<<<for the round-robin left-shift operation, note: f (x)0,x1,x2,x3)→(y0,y1,y2,y3) There is:
Figure BDA0002772550790000053
Figure BDA0002772550790000054
Figure BDA0002772550790000055
Figure BDA0002772550790000056
wherein r is the current number of wheels,
Figure BDA0002772550790000057
~、&respectively, an exclusive or operation, a non-operation, and operation.
And step 3: if the operation is encryption operation, the encryption process is as follows:
the input plaintext P is divided into 4 subblocks of length 32 bits, i.e.
Figure BDA0002772550790000058
The following operations are first repeatedly performed N-1 times:
Figure BDA0002772550790000059
Figure BDA00027725507900000510
Figure BDA00027725507900000511
Figure BDA00027725507900000512
wherein r is the current number of wheels, fi(i ═ 0,1,2) is the same as the first three functions in the key expansion algorithm; the following operations were then performed 1 time:
Figure BDA00027725507900000513
Figure BDA00027725507900000514
Figure BDA00027725507900000515
Figure BDA00027725507900000516
finally, the ciphertext is output
Figure BDA00027725507900000517
If the operation is decryption operation, the decryption process is as follows:
the input ciphertext C is divided into 4 sub-blocks of length 32 bits, i.e.
Figure BDA00027725507900000518
First, the following operation is performed 1 time:
Figure BDA0002772550790000061
Figure BDA0002772550790000062
Figure BDA0002772550790000063
Figure BDA0002772550790000064
then, the following operations are repeatedly performed N-1 times:
Figure BDA0002772550790000065
Figure BDA0002772550790000066
Figure BDA0002772550790000067
Figure BDA0002772550790000068
wherein r is the current number of wheels, fi(i ═ 0,1,2) is the same as the first three functions in the key expansion algorithm. Finally, the plaintext is output
Figure BDA0002772550790000069
It should be understood that, in the above embodiment, the plaintext length or the ciphertext length 128 is taken as an example, and the invention is not limited to this embodiment; and in this embodiment is F3The function satisfies: f (x) x. Other F0、F1、F2Are each independently of f0、f1、f2Accordingly, the invention is not limited to this embodiment.
In some possible solutions, the present invention provides an apparatus based on the above-mentioned lightweight block cipher GFCS implementation method, including:
a data loading module: for obtaining plaintext or ciphertext with length L, and obtaining initial key with length L,
a round key generation module: 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
An encryption and decryption module: when the method is used for encryption operation, the round key, the data to be encrypted and the round operation function are utilized to perform N-1 round XOR operation and shift operation, and then a round XOR operation is performed to obtain a ciphertext; or when the method is used for 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 N-1 round XOR operation and shift operation to obtain a plaintext.
For the implementation process of each module, please refer to the content of the above method, which is not described herein again. It should be understood that the above described division of functional blocks is merely a division of logical functions and that in actual implementation there may be additional divisions, for example, where multiple elements or components may be combined or integrated into another system or where some features may be omitted, or not implemented. Meanwhile, the integrated unit can be realized in a hardware form, and can also be realized in a software functional unit form.
In some possible solutions, the present invention also provides an apparatus comprising a memory and a processor, the memory storing a computer program, the processor calling the computer program to execute the steps of the lightweight block cipher GFCS implementation method.
In some possible solutions, the present invention also provides a readable storage medium storing a computer program, which is called by a processor to execute the steps of the lightweight block cipher GFCS implementation method.
The specific implementation process may also refer to the above method content. It should be understood that in the embodiments of the present invention, the Processor may be a Central Processing Unit (CPU), and the Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) 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 may include both read-only memory and random access memory, and provides instructions and data to the processor. The portion of memory may also include non-volatile random access memory. For example, the memory may also store device type information.
The readable storage medium is a computer readable storage medium, which may be an internal storage unit of the controller according to any of the foregoing embodiments, for example, 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 Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the controller. 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 for storing the computer program and other programs and data required by the controller. The readable storage medium may also be used to temporarily store data that has been output or is to be output.
And (3) experimental verification:
the test data of 40 iterations of the GFCS-128 algorithm of the present invention is shown in Table 1:
TABLE 1 GFCS Algorithm test data
Figure BDA0002772550790000071
The GFCS cryptographic algorithm is realized by hardware in an ASIC (application specific integrated circuit), and is synthesized in Synopsys Design Compiler Version B-2008.09, wherein a comprehensive process library is SMIC 0.18um, and in a comprehensive experiment, the unit of area resources is 1622 GE. The resource area occupied by the GFCS-128 algorithm is 1622 GE. The area comparison of each lightweight block cipher algorithm implementation is shown in table 2.
TABLE 2 area comparison for lightweight block cipher algorithms
Figure BDA0002772550790000081
It should be emphasized that the examples described herein are illustrative and not restrictive, and thus the invention is not to be limited to the examples described herein, but rather to other embodiments that may be devised by those skilled in the art based on the teachings herein, and that various modifications, alterations, and substitutions are possible without departing from the spirit and scope of the present invention.

Claims (10)

1. A method for realizing lightweight block cipher GFCS is characterized in that: 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.
2. The method of claim 1, wherein: if the data is the encryption operation, the calculation formula corresponding to the preceding N-1 rounds of XOR operation and shift operation of 4 data blocks of the data to be encrypted is as follows:
Figure FDA0002772550780000011
Figure FDA0002772550780000012
Figure FDA0002772550780000013
Figure FDA0002772550780000014
wherein, subscripts a, b, c and d are data block identification marks which are sequentially arranged according to the shifting sequence in the shifting operation in the encryption process, X represents encrypted data, superscript r represents the number of rounds,
Figure FDA0002772550780000015
representing a round key corresponding to the identification mark a obtained in the r +1 round key expansion round operation; fa、Fb、Fc、FdAll the three formulas are set F functions, the F functions in the three formulas and the round operation functions F corresponding to the round keys of the same identification mark are the same function, and the F functions in the remaining one formula meet the following conditions: f (x) x.
3. The method of claim 2, wherein: if the encryption operation is performed, the formula of the N-th round exclusive-or operation on the 4 data blocks of the data to be encrypted is as follows:
Figure FDA0002772550780000016
Figure FDA0002772550780000017
Figure FDA0002772550780000018
Figure FDA0002772550780000019
4. the method of claim 1, wherein: if the operation is decryption, the ciphertext is targeted
Figure FDA00027725507800000110
The formula for performing the first exclusive-or operation is as follows:
Figure FDA00027725507800000111
Figure FDA00027725507800000112
Figure FDA00027725507800000113
Figure FDA00027725507800000114
in the formula, subscripts d, c, b, a are data block identification marks sequentially set in the decryption process according to the shift sequence in the shift operation, Y represents the decryption data,
Figure FDA0002772550780000029
the data block identification mark d in the ciphertext C corresponds to the decryption result of the first exclusive-or operation, the superscript N represents the round number,
Figure FDA00027725507800000210
indicates the Nth wheelA round key corresponding to the identification mark a obtained in the key expansion round operation; fa、Fb、Fc、FdAll the three formulas are set F functions, the F functions in the three formulas and the round operation functions F corresponding to the round keys of the same identification mark are the same function, and the F functions in the remaining one formula meet the following conditions: f (x) x.
5. The method of claim 4, wherein: in the process of carrying out N-1 rounds of XOR operation and shift operation on the ciphertext C to obtain the plaintext, the formula of each round of XOR operation and shift operation is as follows:
Figure FDA0002772550780000021
Figure FDA0002772550780000022
Figure FDA0002772550780000023
Figure FDA0002772550780000024
6. the method of claim 2, wherein: 4 sub-blocks K of the initial key K in step S20,k1,k2,k3Corresponding to the round key K of the r-th round in the N-round key expansion round operationrIs recorded as:
Figure FDA00027725507800000211
Figure FDA00027725507800000212
wherein the content of the first and second substances,
Figure FDA00027725507800000213
round key K representing the r-th roundrFour sub-blocks of (a), (b), f)0,f1,f2,f3And representing wheel functions f corresponding to the four sub-blocks respectively, wherein the wheel functions are recorded as:
f:(x0,x1,x2,x3)→(y0,y1,y2,y3)
in the formula, x0,x1,x2,x34 subblock data, y, each representing an input round function f0,y1,y2,y3Respectively represent corresponding output data, and satisfy:
Figure FDA0002772550780000025
Figure FDA0002772550780000026
Figure FDA0002772550780000027
Figure FDA0002772550780000028
wherein the content of the first and second substances,
Figure FDA00027725507800000214
~、&respectively, an exclusive or operation, a non-operation, and operation.
7. The method of 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 for each data block is 64.
8. An apparatus based on the method of any one of claims 1-7, characterized in that: the method comprises the following steps:
a data loading module: for obtaining plaintext or ciphertext with length L, and obtaining initial key with length L,
a round key generation module: 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
An encryption and decryption module: when the method is used for encryption operation, the round key, the data to be encrypted and the round operation function are utilized to perform N-1 round XOR operation and shift operation, and then a round XOR operation is performed to obtain a ciphertext; or when the method is used for 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 N-1 round XOR operation and shift operation to obtain a plaintext.
9. An apparatus, characterized by: comprising a memory storing a computer program and a processor invoking said computer program for performing the steps of the method of any one of claims 1-7.
10. A readable storage medium, characterized by: a computer program is stored, which is called by a processor to perform the steps of the method of any of claims 1-7.
CN202011254102.8A 2020-11-11 2020-11-11 Lightweight block cipher GFCS (generic fragment signature Circuit) implementation method and 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 Lightweight block cipher GFCS (generic fragment signature Circuit) implementation method and 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 Lightweight block cipher GFCS (generic fragment signature Circuit) implementation method and device and readable storage medium

Publications (2)

Publication Number Publication Date
CN112202547A true CN112202547A (en) 2021-01-08
CN112202547B 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 Lightweight block cipher GFCS (generic fragment signature Circuit) implementation method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN112202547B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910630A (en) * 2021-02-02 2021-06-04 浙江大华技术股份有限公司 Method and device for replacing expanded key
CN113452508A (en) * 2021-08-27 2021-09-28 北京华云安信息技术有限公司 Data encryption method, device, equipment and computer readable storage medium
CN114070552A (en) * 2021-10-28 2022-02-18 国核自仪系统工程有限公司 Data encryption method and device, data decryption method and device, equipment and medium
CN114598470A (en) * 2022-03-17 2022-06-07 北京启明星辰信息安全技术有限公司 Encryption method, decryption method, device and computer readable storage medium
CN115987489A (en) * 2022-12-28 2023-04-18 北京电子科技学院 Lightweight encryption and decryption method and device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6891950B1 (en) * 1999-08-31 2005-05-10 Kabushiki Kaisha Toshiba Extended key generator, encryption/decryption unit, extended key generation method, and storage medium
US20130336480A1 (en) * 2012-06-15 2013-12-19 Electronics And Telecommunications Research Institute Low-power encryption apparatus and method
CN104333446A (en) * 2014-11-10 2015-02-04 衡阳师范学院 Novel ultra-lightweight QTL (Quasi-Transmission Line) block cipher implementation method
CN109768854A (en) * 2019-03-29 2019-05-17 衡阳师范学院 A kind of implementation method of lightweight block cipher Wheel
CN111245598A (en) * 2020-03-31 2020-06-05 衡阳师范学院 Method for realizing lightweight AEROGEL block cipher
CN111431697A (en) * 2020-03-31 2020-07-17 衡阳师范学院 Novel method for realizing lightweight block cipher COR L
CN111464564A (en) * 2020-05-08 2020-07-28 郑州信大捷安信息技术股份有限公司 Data high-speed encryption and decryption method and device based on symmetric cryptographic algorithm

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6891950B1 (en) * 1999-08-31 2005-05-10 Kabushiki Kaisha Toshiba Extended key generator, encryption/decryption unit, extended key generation method, and storage medium
US20130336480A1 (en) * 2012-06-15 2013-12-19 Electronics And Telecommunications Research Institute Low-power encryption apparatus and method
CN104333446A (en) * 2014-11-10 2015-02-04 衡阳师范学院 Novel ultra-lightweight QTL (Quasi-Transmission Line) block cipher implementation method
CN109768854A (en) * 2019-03-29 2019-05-17 衡阳师范学院 A kind of implementation method of lightweight block cipher Wheel
CN111245598A (en) * 2020-03-31 2020-06-05 衡阳师范学院 Method for realizing lightweight AEROGEL block cipher
CN111431697A (en) * 2020-03-31 2020-07-17 衡阳师范学院 Novel method for realizing lightweight block cipher COR L
CN111464564A (en) * 2020-05-08 2020-07-28 郑州信大捷安信息技术股份有限公司 Data high-speed encryption and decryption method and device based on symmetric cryptographic algorithm

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910630A (en) * 2021-02-02 2021-06-04 浙江大华技术股份有限公司 Method and device for replacing expanded key
CN113452508A (en) * 2021-08-27 2021-09-28 北京华云安信息技术有限公司 Data encryption method, device, equipment and computer readable storage medium
CN113452508B (en) * 2021-08-27 2021-12-10 北京华云安信息技术有限公司 Data encryption method, device, equipment and computer readable storage medium
CN114070552A (en) * 2021-10-28 2022-02-18 国核自仪系统工程有限公司 Data encryption method and device, data decryption method and device, equipment and medium
CN114598470A (en) * 2022-03-17 2022-06-07 北京启明星辰信息安全技术有限公司 Encryption method, decryption method, device and computer readable storage medium
CN114598470B (en) * 2022-03-17 2023-12-19 北京启明星辰信息安全技术有限公司 Encryption method, decryption method, device, and computer-readable storage medium
CN115987489A (en) * 2022-12-28 2023-04-18 北京电子科技学院 Lightweight encryption and decryption method and device and storage medium
CN115987489B (en) * 2022-12-28 2023-10-20 北京电子科技学院 Lightweight encryption and decryption method and device and storage medium

Also Published As

Publication number Publication date
CN112202547B (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN112202547B (en) Lightweight block cipher GFCS (generic fragment signature Circuit) implementation method and device and readable storage medium
US7720225B2 (en) Table splitting for cryptographic processes
CN1648967A (en) Cryptographic apparatus, cryptographic method, and storage medium thereof
US8619985B2 (en) Table splitting for cryptographic processes
WO2007083528A1 (en) Encryption/decryption device, encryption/decryption method, and computer program
CN110190951B (en) Power consumption attack method and system for DES algorithm L register turning
KR100800468B1 (en) Hardware cryptographic engine and method improving power consumption and operation speed
US10326596B2 (en) Techniques for secure authentication
Feizi et al. A hardware implementation of simon cryptography algorithm
CN111478766B (en) Method, device and storage medium for realizing block cipher MEG
Mandal et al. Sycon: A new milestone in designing ASCON-like permutations
CN111314054B (en) Lightweight ECEG block cipher realization method, system and storage medium
Dhanuskodi et al. Efficient register renaming architectures for 8-bit AES datapath at 0.55 pJ/bit in 16-nm FinFET
JP2004054128A (en) Encrypting system
CN114826560B (en) Lightweight block cipher CREF implementation method and system
Gafsi et al. Hardware implementation of a strong pseudorandom number generator based block‐cipher system for color image encryption and decryption
CN112287333B (en) Lightweight adjustable block cipher realization method, system, electronic equipment and readable storage medium
CN115766244A (en) Internet of vehicles information encryption method and device, computer equipment and storage medium
CN110071927B (en) Information encryption method, system and related components
JP2004078053A (en) Ciphering device
Ege et al. Memory encryption for smart cards
Wei et al. A small first-order DPA resistant AES implementation with no fresh randomness
Lee et al. Lightweight and Low-Latency AES Accelerator Using Shared SRAM
Balamanikandan et al. Low area ASIC implementation of LUT–CLA–QTL architecture for cryptography applications
CN112134691B (en) NLCS block cipher realization method, device and medium with repeatable components

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