CN111130768B - Method for quickly generating message digest in lightweight block chain - Google Patents

Method for quickly generating message digest in lightweight block chain Download PDF

Info

Publication number
CN111130768B
CN111130768B CN201911234608.XA CN201911234608A CN111130768B CN 111130768 B CN111130768 B CN 111130768B CN 201911234608 A CN201911234608 A CN 201911234608A CN 111130768 B CN111130768 B CN 111130768B
Authority
CN
China
Prior art keywords
message
length
evolution
input
stage
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
CN201911234608.XA
Other languages
Chinese (zh)
Other versions
CN111130768A (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.)
Nord Network Technology Co ltd
Original Assignee
Nord Logistics Co ltd
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 Nord Logistics Co ltd filed Critical Nord Logistics Co ltd
Priority to CN201911234608.XA priority Critical patent/CN111130768B/en
Publication of CN111130768A publication Critical patent/CN111130768A/en
Application granted granted Critical
Publication of CN111130768B publication Critical patent/CN111130768B/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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

The invention provides a method for quickly generating a message digest in a lightweight block chain, which is based on a lock iteration structure and converts any-length input into fixed-length output by combining a novel internal substitution function based on cellular automaton. The method utilizes the advantage that the front structure does not need forward feedback, and reduces the consumption of generating the message digest in hardware implementation. The internal substitution function constructed by utilizing the cellular automaton rule is divided into linear and nonlinear layers, the locality, complexity and parallelism of the cellular automaton rule evolution effectively improve the diffusivity and confusion of the algorithm, and the software and hardware realization efficiency of the algorithm is considered. The method for rapidly generating the message digest can meet the safety requirement of a lightweight block chain and the hardware realization requirement of resource-constrained equipment.

Description

Method for quickly generating message digest in lightweight block chain
Technical Field
The invention relates to the field of network security, in particular to a method for quickly generating a message digest in a lightweight block chain.
Background
The blockchain is a decentralized distributed ledger, and solves the security problem brought by a trust-based centralized model technically. The blockchain is based on a cryptographic algorithm, and a hash function and a time stamp mechanism are utilized to ensure traceability and non-falsification of data. The use of hash functions to generate message digest is an important technology in the cryptography field and is also an indispensable content in blockchains. The hash function can convert the data of files, texts and the like with any length into output with fixed length, and has wide application in the aspects of message authentication, digital signature, key exchange, pseudo-random sequence generation and the like. As the blockchain is applied to the field of the internet of things, the method for generating the message digest by utilizing the traditional hash function is difficult to meet the safety requirement of resource-constrained equipment, and the lightweight method is designed to be a research hotspot.
Designing a lightweight message digest generation method, wherein a spine structure is one of the structures commonly used at present, and adopting a simple iteration structure, an indefinite length message is compressed into a fixed length output through a fixed length internal state and a permutation function. Because the front structure has no forward feedback, the consumption of the hardware implementation is smaller, and therefore, the front structure is suitable for the design of a lightweight hash function. The permutation function used in the existing lightweight method mostly adopts the existing block encryption algorithm, nonlinear shift register, stream cipher and the like, such as advanced encryption standard AES, PRESENT and the like. Although the security of the algorithm is ensured, the implementation efficiency of the software and hardware of the algorithm cannot adapt to the application requirements of the resource-constrained environment. Therefore, a method for generating the message digest is required to be designed, which not only ensures the safety, but also can achieve the efficiency of software and hardware.
Disclosure of Invention
The invention provides a method for quickly generating a message digest in a lightweight block chain, aiming at the problem that the prior art is not suitable for equipment with limited resources. The method is based on a front structure, utilizes the high parallelism of cellular automaton and the complexity of local action to design an internal substitution function, designs a linear layer and a nonlinear layer by using different rules to realize better diffusion and confusion effects, improves the safety of an algorithm, and gives consideration to the realization efficiency of software and hardware of the algorithm.
In order to achieve the above purpose, the specific technical scheme of the invention is as follows: a method for quickly generating a message digest in a lightweight block chain comprises an initialization stage, an absorption stage and a squeezing stage; the method comprises an initialization stage, wherein the initialization stage is used for setting the initial state of a system, filling messages with any length L and then partitioning; an absorption stage, wherein the system state is evolved by utilizing an internal substitution function F (-) based on cellular automata; and in the squeezing stage, outputting an evolution result of the function F (-) until reaching the length of the digest value.
Further, the initialization stage includes the following steps:
1.1 Setting a system initial state IV, wherein iv=0| … |0|n|b|r|r ', n is the length of a digest value, b=r+c is the length of IV, r is the throughput rate, c is the system capacity, and r' is the output length of each evolution;
1.2 Judging the length L of the input message, if L≡0mod r is satisfied, turning to the step 1.4), otherwise turning to the step 1.3);
1.3 Filling the input message by appending 1 bit "1" and x bit "0" to the message such that x+1+l≡0mod r;
1.4 Block the message, each block having a length r.
Further, the above-mentioned absorption stage includes the following steps:
2.1 Exclusive or operation is carried out on the rightmost r bits of the initial state IV of the system and the first message block, and the result is used as the input of an internal substitution function F (-) based on the cellular automaton;
2.2 The output of the previous step is exclusive-ored with the next message block, and the result is input into a function F ();
2.3 Repeating the steps until the last message block completes the operation of step 2.2).
Further, the squeezing stage includes the following steps:
3.1 Outputting the rightmost r' bit of the system state after the end of the adsorption stage;
3.2 The system state is used as the input of a function F (-), the evolution is continued, and the rightmost r' bit is output after the evolution is finished;
3.3 Repeating the above steps until all outputs are concatenated together to reach n bits, the digest of the message.
Further, the internal substitution function F (·) of the cellular automaton in step 2.1) is composed of a linear layer and a nonlinear layer; in the linear layer, the system state evolves by the initial rule 90/150 of cellular automaton, the first bit of the state is input as a control character, and the rule used in each evolution is determined; the nonlinear layer is made up of a number of parallel 4 x 4S-boxes, where the S-boxes are generated by four nonlinear rules 30, 149, 202 and 218, whose algebraic paradigm is as follows:
Figure BDA0002304543130000031
Figure BDA0002304543130000032
Figure BDA0002304543130000033
Figure BDA0002304543130000034
the invention provides a method for quickly generating a message digest in a lightweight block chain, which is based on a lock iteration structure and converts any-length input into fixed-length output by combining a novel internal substitution function based on cellular automaton. The method utilizes the advantage that the front structure does not need forward feedback, and reduces the consumption of generating the message digest in hardware implementation. The internal substitution function constructed by utilizing the cellular automaton rule is divided into linear and nonlinear layers, the locality, complexity and parallelism of the cellular automaton rule evolution effectively improve the diffusivity and confusion of the algorithm, and the software and hardware realization efficiency of the algorithm is considered. The method for rapidly generating the message digest can meet the safety requirement of a lightweight block chain and the hardware realization requirement of resource-constrained equipment.
Drawings
Fig. 1 is a front iteration structure in the present invention.
Detailed Description
The invention will be described in further detail with reference to the drawings and the detailed description, but the scope of the invention is not limited thereto.
The method for lightweight quick generation of the message digest adopts a lock iteration structure, and comprises an initialization stage, an absorption stage and a squeezing stage, as shown in fig. 1, and comprises the following steps:
1) Initializing, and setting a system initial state. A message of arbitrary length L is taken as input, and the message is filled and then blocked.
In the present invention, since the length of the inputted message is arbitrary, in order to be able to evolve by using a permutation function with a fixed length, the inputted message needs to be grouped with a fixed length. The size of the message packet length has a direct influence on the efficiency and the safety of the algorithm, and different values can be set according to the requirements of specific application scenes on the safety or the efficiency. The length of the message is not necessarily a multiple of the set packet length, so that the first padding regroups are first 1 followed by a number of 0 s to ensure that the last packet is not all 0 s. The specific steps of the initialization stage are as follows:
1.1 Setting a system initial state IV, wherein iv=0| … |0|n|b|r|r ', wherein n is the length of the digest value, b=r+c is the length of IV, r is the throughput rate, c is the system capacity, and r' is the output length of the digest value.
1.2 Judging the length L of the input message, if L≡0mod r is satisfied, proceeding to step 1.4), otherwise proceeding to step 1.3).
1.3 Filling the incoming message with 1 and 0 of the x bits, such that x+1+l≡0mod r.
1.4 A) the padded message packets, each group having a length r.
2) and in the absorpting stage, evolution is carried out by utilizing an internal substitution function F (-) based on cellular automaton.
In the invention, a front iteration structure is mainly used, an input message is combined with the initial state of the system through an absorption stage, and an internal substitution function based on a cellular automaton is used for evolution after a new system state is obtained. The length of the system state is far greater than that of the message group, the result after exclusive-or operation is carried out on one group of messages and part of the system states is used as the input of an internal substitution function, the result of the substitution function is exclusive-or operated with the next group of messages, the steps are repeated until all the last group of messages are exclusive-or with the system states, and evolution is carried out by using the substitution function. The process makes the information in the message fully diffused, and the linear layer and the nonlinear layer in the substitution function make the output value approximate to the pseudo-random sequence, so that the diffusion and confusion effects of the algorithm are obviously improved. The specific steps of the absorption stage are as follows:
2.1 The rightmost r bits of the initial state IV are xored with the first message block, and the result is used as an input of an internal permutation function F (·) based on cellular automata.
2.2 The output of the previous step is exclusive-ored with the next message block, and the result is input into the function F ().
2.3 Repeating the steps until the last message block completes the operation of step 2.2).
Further, in the above step 2.1, the result of the exclusive-or operation is taken as the input of the function F (·). The function consists of a linear layer and a nonlinear layer. At the linear layer, the system state evolves from the cellular automaton's initial rule 90/150. The first bit of the state is input as a control character to determine the rules used in each evolution round. The nonlinear layer is composed of p parallel 4 x 4S boxes. Wherein the number of S boxes
Figure BDA0002304543130000051
The S-box is generated by four non-linear rules 30, 149, 202 and 218, whose algebraic paradigm is as follows:
Figure BDA0002304543130000052
Figure BDA0002304543130000053
Figure BDA0002304543130000054
Figure BDA0002304543130000055
3) And in the squeezing stage, outputting an evolution result of the function F (-) until the length of the message digest value is reached.
In the invention, after the message is evolved by the substitution function in the absorption stage, the evolution result is output. The length of each output value is variable, the length has direct influence on the efficiency and the safety intensity of the algorithm, and the shorter the length of the output value is, the more the message is evolved, the safety is improved, and the efficiency of the algorithm is reduced. Therefore, the output length can be adjusted according to the specific application scene, and the algorithm has more flexibility. The specific steps of the squeezing stage are as follows:
3.1 Outputting the rightmost r' bit of the system state after the end of the adsorption stage;
3.2 The system state is used as the input of a function F (-), the evolution is continued, and the rightmost r' bit is output after the evolution is finished;
3.3 Repeating the above steps until all outputs are connected together to reach n bits.
The invention provides a method for quickly generating a message digest in a lightweight block chain, which is based on a lock iteration structure and converts any-length input into fixed-length output by combining a novel internal substitution function based on cellular automaton. The method utilizes the advantage that the front structure does not need forward feedback, and reduces the consumption of generating the message digest in hardware implementation. The internal substitution function constructed by utilizing the cellular automaton rule is divided into linear and nonlinear layers, the locality, complexity and parallelism of the cellular automaton rule evolution effectively improve the diffusivity and confusion of the algorithm, and the software and hardware realization efficiency of the algorithm is considered. The method for rapidly generating the message digest can meet the safety requirement of a lightweight block chain and the hardware realization requirement of resource-constrained equipment.

Claims (3)

1. A method for quickly generating a message digest in a lightweight block chain is characterized by comprising an initialization stage, an absorption stage and a squeezing stage; the initialization stage is to set the initial state of the system and to fill the messages with any length L and then divide the messages into blocks; the absorption stage utilizes an internal substitution function F (-) evolution system state based on cellular automata; outputting an evolution result of the function F (-) until reaching the length of the abstract value in the squeezing stage;
the absorption stage comprises the following steps:
2.1 Exclusive or operation is carried out on the rightmost r bits of the initial state IV of the system and the first message block, and the result is used as the input of an internal substitution function F (-) based on the cellular automaton;
2.2 The output of the previous step is exclusive-ored with the next message block, and the result is input into a function F ();
2.3 Repeating the steps until the last message block completes the operation of step 2.2);
the internal substitution function F (-) of the cellular automaton in the step 2.1) consists of a linear layer and a nonlinear layer; in the linear layer, the system state evolves by the initial rule 90/150 of cellular automaton, the first bit of the state is input as a control character, and the rule used in each evolution is determined; the nonlinear layer is made up of a number of parallel 4 x 4S-boxes, where the S-boxes are generated by four nonlinear rules 30, 149, 202 and 218, whose algebraic paradigm is as follows:
Figure FDA0004202815170000011
Figure FDA0004202815170000012
Figure FDA0004202815170000013
Figure FDA0004202815170000014
2. the method for quickly generating a message digest in a lightweight blockchain of claim 1, wherein the initialization phase includes the steps of:
1.1 Setting a system initial state IV, wherein iv=0| … |0|n|b|r|r ', n is the length of a digest value, b=r+c is the length of IV, r is the throughput rate, c is the system capacity, and r' is the output length of each evolution;
1.2 Judging the length L of the input message, if L=0 mod r is satisfied, turning to the step 1.4), otherwise turning to the step 1.3);
1.3 Filling the input message by attaching 1 bit "1" and x bit "0" to the message such that x+1+l=0 mod r;
1.4 Block the message, each block having a length r.
3. The method for quickly generating a message digest in a lightweight blockchain of claim 1, wherein the squeezing phase includes the steps of:
3.1 Outputting the rightmost r' bit of the system state after the end of the adsorption stage;
3.2 The system state is used as the input of a function F (-), the evolution is continued, and the rightmost r' bit is output after the evolution is finished;
3.3 Repeating the above steps until all outputs are concatenated together to reach n bits, the digest of the message.
CN201911234608.XA 2019-12-05 2019-12-05 Method for quickly generating message digest in lightweight block chain Active CN111130768B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911234608.XA CN111130768B (en) 2019-12-05 2019-12-05 Method for quickly generating message digest in lightweight block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911234608.XA CN111130768B (en) 2019-12-05 2019-12-05 Method for quickly generating message digest in lightweight block chain

Publications (2)

Publication Number Publication Date
CN111130768A CN111130768A (en) 2020-05-08
CN111130768B true CN111130768B (en) 2023-06-27

Family

ID=70497358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911234608.XA Active CN111130768B (en) 2019-12-05 2019-12-05 Method for quickly generating message digest in lightweight block chain

Country Status (1)

Country Link
CN (1) CN111130768B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003302901A (en) * 2002-04-11 2003-10-24 Sony Corp Method and data processing apparatus for calculating hash value based on cellular automata
US9438416B2 (en) * 2014-07-18 2016-09-06 Harris Corporation Customizable encryption algorithm based on a sponge construction with authenticated and non-authenticated modes of operation
CN106372550A (en) * 2016-08-25 2017-02-01 辽宁工业大学 Hash function-based MH lightweight security authentication system and method
CN107769911B (en) * 2017-11-30 2020-07-28 西安理工大学 Lightweight hash function construction method based on span structure

Also Published As

Publication number Publication date
CN111130768A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
EP3588838A1 (en) Chaotic map-based digital chaotic encryption method
US8509427B2 (en) Hybrid mode cryptographic method and system with message authentication
US20120008767A1 (en) System for encrypting and decrypting a plaintext message with authentication
EP2975798B1 (en) Customizable encryption algorithm based on a sponge construction with authenticated and non-authenticated modes of operation
CN107147487B (en) Symmetric key random block cipher
CN109861809B (en) Practical grouping random encryption and decryption method
CN110795762A (en) Reserved format encryption method based on stream cipher
EP3480999B1 (en) Customizable encryption/decryption algorithm
US11057193B2 (en) Enhanced randomness for digital systems
Patel et al. Hybrid security algorithms for data transmission using AES-DES
CN106788965B (en) Digital chaotic cipher method based on chaotic number spectrum
CN111130768B (en) Method for quickly generating message digest in lightweight block chain
CN116980194A (en) Safe and efficient data transmission method and system based on cloud edge end cooperation
Gangadari et al. FPGA implementation of compact S-box for AES algorithm using composite field arithmetic
Ye et al. Parallelizable Authenticated Encryption Schemes based on AES Round Function
Srivastava et al. Ascon-sign
Kocheta et al. A review of some recent stream ciphers
CN116132016A (en) Method for realizing additive expansion of cipher algorithm
CN101262334A (en) Encryption method for Bluetooth data transmission
Xiao et al. Data transmission scheme based on AES and polar codes
RU2738321C1 (en) Cryptographic transformation method and device for its implementation
KR101076747B1 (en) Method and apparatus for random accessible encryption and decryption by using a hierarchical tree structure of stream cipher module
Licayan et al. Performance Analysis of Playfair Cipher Color Substitution Variants
Jin et al. Low transmission overhead for polar coding physical-layer encryption
Muehlberghuber et al. 100 gbit/s authenticated encryption based on quantum key distribution

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
CP03 Change of name, title or address

Address after: No. 1 Zhufeng Road, Jinrun Avenue, Zhenjiang City, Jiangsu Province, 212300

Patentee after: Nord Network Technology Co.,Ltd.

Country or region after: China

Address before: 212311 No. 1, Zhufeng Road, Jinrun Avenue, Zhenjiang City, Jiangsu Province

Patentee before: Nord Logistics Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address