CN116155507A - Message hash chain construction method - Google Patents

Message hash chain construction method Download PDF

Info

Publication number
CN116155507A
CN116155507A CN202310031163.5A CN202310031163A CN116155507A CN 116155507 A CN116155507 A CN 116155507A CN 202310031163 A CN202310031163 A CN 202310031163A CN 116155507 A CN116155507 A CN 116155507A
Authority
CN
China
Prior art keywords
hash
value
message
chain
sent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310031163.5A
Other languages
Chinese (zh)
Inventor
蒋文保
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Information Science and Technology University
Original Assignee
Beijing Information Science and Technology 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 Beijing Information Science and Technology University filed Critical Beijing Information Science and Technology University
Publication of CN116155507A publication Critical patent/CN116155507A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3242Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides a method for constructing a message hash chain, which can form a hash chain related to a message sequence by carrying out iterative hash on a hash value of a transmitted message. The integrity, the authenticity and the synchronism of the message sequence can be ensured by the two communication parties through the hash chain, so that the safety of message transmission is greatly improved; when the data signature authentication is carried out, the communication parties only need to carry out the signature authentication according to the data messages with a certain interval, and the signature authentication is not needed to be carried out on each data message, so that the integrity and non-repudiation of a plurality of messages can be ensured, the expenditure of the signature authentication is reduced, and the efficiency of message transmission is effectively improved.

Description

Message hash chain construction method
The application is a divisional application of patent application named 'a method and a device for constructing a message hash chain', the application date of the original application is 2021, 4 months and 2 days, and the application number is 202110360263.3.
Technical Field
The invention relates to the technical field of computers, in particular to a method for constructing a message hash chain.
Background
The integrity of the message can be verified by utilizing the message authentication code in the current network data transmission process, the safety of the data transmission can be improved by utilizing a shared key method, but the non-repudiation of the message cannot be ensured. The method for signature authentication of the message by using the public and private keys can ensure that the message cannot be repudiated, but the method has high cost and low data transmission performance.
Disclosure of Invention
The invention aims to provide a message hash chain construction method, which forms a hash chain related to a message sequence by carrying out iterative hash on a hash value of a transmitted message, ensures the integrity, the authenticity and the synchronism of the message sequence by two communication parties through the hash chain, and further greatly improves the safety and the efficiency of message transmission.
In order to achieve the above object, the present invention provides the following solutions:
a method for constructing a message hash chain comprises the following steps:
building a hash chain, the hash chain comprising: the method comprises the steps of sequentially connecting a first node value, an intermediate node value and a chain tail node value, wherein the chain tail node value is the latest node value of the hash chain, and the hash chain continuously grows along with updating transformation of the chain tail node value;
carrying out hash calculation on a current message to be sent to obtain a hash value corresponding to the current message to be sent, carrying out hash calculation on the hash value corresponding to the current message to be sent and a current chain tail node value to obtain a new hash value, and taking the new hash value as the chain tail node value and the current chain tail node value as the intermediate node value.
Optionally, the performing hash calculation on the current message to be sent to obtain a hash value corresponding to the current message to be sent includes:
and obtaining a shared secret key, and carrying out hash calculation on the shared secret key and the current message to be sent to obtain a hash value corresponding to the current message to be sent.
Optionally, the performing hash calculation on the current message to be sent to obtain a hash value corresponding to the current message to be sent, performing hash calculation on the hash value corresponding to the current message to be sent and a current tail node value to obtain a new hash value, using the new hash value as the tail node value, and using the current tail node value as the intermediate node value includes:
obtaining a salt value required for generating the hash chain;
carrying out hash calculation on the current message to be sent to obtain a hash value corresponding to the current message to be sent, carrying out hash calculation on the hash value corresponding to the current message to be sent, the salt value and the current chain tail node value to obtain a new hash value, taking the new hash value as the chain tail node value, and taking the current chain tail node value as the intermediate node value.
Optionally, the current message to be sent includes:
a sending end sends a message to a receiving end; or alternatively
And the message sent by the sending end to the receiving end and the message sent by the receiving end to the sending end.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects:
the method and the device for constructing the message Wen Haxi chain can form a hash chain related to a message sequence by carrying out iterative hash on the hash value of the transmitted message. The integrity, the authenticity and the synchronism of the message sequence can be ensured by the two communication parties through the hash chain, so that the safety of message transmission is greatly improved; when carrying out data signature authentication, the two communication parties only need to carry out signature authentication on data messages according to a certain interval, and do not need to carry out signature authentication on each data message, so that the integrity and non-repudiation of a plurality of messages can be ensured, the expenditure of signature authentication is reduced, and the efficiency of message transmission is effectively improved
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for constructing a chain of messages Wen Haxi provided by an embodiment of the present invention;
FIG. 2 is a schematic diagram of a basic construction method of a report Wen Haxi chain according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a shared key construction report Wen Haxi chain process according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a method for constructing a chain of datagrams Wen Haxi with a shared key according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a hash salt structure report Wen Haxi chain process according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hash salt building packet Wen Haxi chain process according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a message sent to a counterpart by two communication terminals for multiple times according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a bi-directional message Wen Haxi link configuration provided by an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a device for constructing a chain of messages Wen Haxi according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention aims to provide a message hash chain construction method, which forms a hash chain related to a message sequence by carrying out iterative hash on a hash value of a transmitted message, ensures the integrity, the authenticity and the synchronism of the message sequence by two communication parties through the hash chain, and further greatly improves the safety and the efficiency of message transmission.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Fig. 1 shows a flowchart of a method for constructing a chain of a report Wen Haxi provided by an embodiment of the present invention, referring to fig. 1, the method for constructing a chain of a report Wen Haxi provided by the embodiment of the present invention includes:
s1, constructing a hash chain, wherein the hash chain comprises: the method comprises the steps of sequentially connecting a first node value, an intermediate node value and a chain tail node value, wherein the chain tail node value is the latest node value of a hash chain, and the hash chain grows continuously along with updating transformation of the chain tail node value.
S2, carrying out hash calculation on the current message to be sent to obtain a hash value corresponding to the current message to be sent, carrying out hash calculation on the hash value corresponding to the current message to be sent and the current chain tail node value to obtain a new hash value, and taking the new hash value as the chain tail node value and the current chain tail node value as the intermediate node value.
Specifically, the present invention regards the entire data message at both communication ends as a message queue, for example, messages 1 to n in fig. 2 to 5 are all messages communicated at one time, and these messages are regarded as a message queue. For each message, the hash value is calculated by a hash function, for example, in fig. 2 to 5, the hash values h1 to hn can be obtained by calculating the hash function from the message 1 to the message n, and the hash values h1 to hn are used as a hash sequence.
The message queue may include 1 message, 2 messages, or multiple messages, which is not specifically limited in the present invention.
When the message queue comprises N messages, N is more than or equal to 1, and the hash chain has the following conditions:
when n=1, the hash chain may include only: the end-of-chain node value (or first node value). The end-of-chain node value is one node value with the first node value or is equal to the first node value. As an alternative implementation of the embodiment of the present invention, the first node value includes: a new first hash value or 1 st hash value, wherein: the 1 st hash value is the 1 st hash value corresponding to the first message obtained by carrying out hash calculation on the first message to be sent; the new first hash value is obtained by performing iterative hash calculation on the 1 st hash value.
When n=2, the hash chain may include: a first node value and a tail node value. The intermediate node value is one node value with the first node value or is equal to the first node value. As an alternative implementation of the embodiment of the present invention, the hash chain may be formed by:
performing iterative hash calculation on a 1 st hash value obtained by performing hash calculation on a first message to be sent to obtain a new first hash value, and performing hash calculation on the new first hash value and a 2 nd hash value obtained by performing hash calculation on a second message to be sent to obtain a new second hash value, wherein the first node value is the new first hash value, and the end node value is the new second hash value; or carrying out hash calculation on a 1 st hash value obtained by carrying out hash calculation on the first message to be sent and a 2 nd hash value obtained by carrying out hash calculation on the second message to be sent to obtain a new first hash value, wherein the chain tail node value is the new first hash value.
When N > 2, the hash chain may include: a first node value, an intermediate node value, and a tail node value. As an alternative implementation of the embodiment of the present invention, the hash chain may be formed by:
performing iterative hash calculation on a 1 st hash value obtained by performing hash calculation on a first message to be sent to obtain a new first hash value, performing hash calculation on the new first hash value and a 2 nd hash value obtained by performing hash calculation on a second message to be sent to obtain a new second hash value, until performing hash calculation on a new n-1 st hash value in a hash sequence and an n-th hash value obtained by performing hash calculation on the n-th message to obtain a new n-th hash value, wherein the first node value is a new first hash value, and the intermediate node value comprises: the new second hash value to the new n-1 hash value, and the chain tail node value is the new n hash value; or carrying out hash calculation on a 1 st hash value obtained by carrying out hash calculation on a first message to be sent and a 2 nd hash value obtained by carrying out hash calculation on a second message to be sent to obtain a new first hash value, carrying out hash calculation on the new first hash value and a 3 rd hash value obtained by carrying out hash calculation on a third message to be sent to obtain a new second hash value until carrying out hash calculation on the new n-2 th hash value and the n-th hash value in the hash sequence to obtain a new n-1 th hash value, wherein the first node value is the new first hash value, and the intermediate node value comprises: the new second hash value to the new n-2 hash value and the chain tail node value are the new n-1 hash values.
Specifically, the invention generates a group of hash chains through the hash sequence, the hash chain is a hash chain related to the message sequence, and both communication parties can ensure the integrity of a plurality of messages and record the communication state through the hash chain, thereby improving the efficiency and the safety of message transmission.
In specific implementation, the hash chain generation mode includes:
1. if n=1, the hash chain includes: carrying out hash calculation on a first message to be sent to obtain a 1 st hash value corresponding to the first message.
2. If n=1, the hash chain includes: and performing iterative hash calculation on the 1 st hash value obtained by performing hash calculation on the first message to be sent.
3. If n=2, the hash chain includes: performing iterative hash calculation on a 1 st hash value obtained by performing hash calculation on a first message to be sent to obtain a new first hash value, and performing hash calculation on the new first hash value and a 2 nd hash value obtained by performing hash calculation on a second message to be sent to obtain a new second hash value.
Specifically, in the case where n=2, the 1 st hash value is subjected to hash calculation to obtain a new first hash value, and then the new first hash value and the 2 nd hash value are subjected to hash calculation to obtain a new second hash value, where the new first hash value and the new second hash value may be used as a hash chain.
4. If n=2, the hash chain includes: and carrying out hash calculation on a 1 st hash value obtained by carrying out hash calculation on the first message to be sent and a 2 nd hash value obtained by carrying out hash calculation on the second message to be sent to obtain a new first hash value.
Specifically, in the case where n=2, hash calculation is performed on the 1 st hash value and the 2 nd hash value, and a new first hash value can be directly obtained, and the first hash value is used as a hash chain.
5. If N > 2, the hash chain includes: performing iterative hash calculation on a 1 st hash value obtained by performing hash calculation on a first message to be sent to obtain a new first hash value, performing hash calculation on the new first hash value and a 2 nd hash value obtained by performing hash calculation on a second message to be sent to obtain a new second hash value until performing hash calculation on the new n-1 st hash value and an n-th hash value obtained by performing hash calculation on the n-th message to obtain a new n-th hash value.
Specifically, when N > 2, a new first hash value may be obtained after performing hash calculation from the 1 st hash value, and then a new second hash value may be obtained by performing hash calculation with the 2 nd hash value, so that the new nth hash value may be obtained, and the new first hash value, the new second hash value and the new nth hash value may be used as a hash chain.
6. If N > 2, the hash chain includes: carrying out hash calculation on a 1 st hash value obtained by carrying out hash calculation on a first message to be sent and a 2 nd hash value obtained by carrying out hash calculation on a second message to be sent to obtain a new first hash value, carrying out hash calculation on the new first hash value and a 3 rd hash value obtained by carrying out hash calculation on a third message to be sent to obtain a new second hash value, and carrying out hash calculation on the new n-2 nd hash value and an n-1 th hash value obtained by carrying out hash calculation on a youth message to be sent to obtain a new n-1 th hash value.
Specifically, under the condition that N is more than 2, carrying out hash calculation on the 1 st hash value and the 2 nd hash value to obtain a new first hash value, carrying out hash calculation on the new first hash value and the 3 rd hash value to obtain a new second hash value, and reciprocating the steps until the new N-2 th hash value and the N-th hash value in the hash sequence are subjected to hash calculation to obtain a new N-1 th hash value, and taking the new first hash value, the new second hash value and the new N-1 th hash value as hash chains.
For example, referring to fig. 2, the present invention fetches an element of the hash queue head, calculates a new hash value together with a chain tail element of the hash chain through a hash function, and adds a pointer of the new hash value to the hash chain tail as the hash chain element to the hash chain, wherein the hash chain initially has a null element with a value of "". For example, hash value h1 and hash value h2 are calculated together by a hash function to obtain hash value h (1, 2). And then the hash value h ((1, 2), 3) and the hash value h (((1, 2), 3), 4) are calculated by the same method, and then the hash value h1, the hash value h (1, 2), the hash value h ((1, 2), 3) and the hash value h (((1, 2), 3), 4) form a hash chain.
The message sent by the sending end needs to carry the hash value of the message and the corresponding hash chain value, and is used for verifying the correctness of the message at the receiving end. For example, after the transmitting end A transmits the receiving end B of the message 1, the receiving end B firstly calculates the hash value of the message, compares whether the hash value carried by the message is consistent with the hash value of the message to verify the message, and inserts the hash value into a hash queue after verification. The method for constructing the hash chain by the hash queue is consistent with the sending end, and a hash chain is obtained by calculation according to the same method: hash value h1', hash value h (1, 2) ', hash value h ((1, 2), 3) ' and hash value h (((1, 2), 3), 4) ', wherein hash value h1' is used to compare with hash chain value carried by message to authenticate message 1, and authentication method of other messages is consistent with the method.
As an optional implementation manner of the embodiment of the present invention, performing hash calculation on a current message to be sent, where obtaining a hash value corresponding to the current message to be sent includes: and obtaining the shared secret key, and carrying out hash calculation on the shared secret key and the current message to be sent to obtain a hash value corresponding to the current message to be sent.
Specifically, in this aspect, a manner of participating in establishing a hash chain with a shared key may be set, specifically referring to fig. 3, two communication parties may have a shared key before data transmission, in a process of calculating a hash queue in a message queue, the shared key and a message are calculated together through a hash function to obtain a hash value, the message is directly modified in a manner of calculating the hash value through the hash function, when the hash value is to be obtained in the message calculation, a local shared key table is read to obtain the shared key, the shared key is inserted into the message content, then the hash value is generated through the hash function calculation together, and the hash value is inserted into the hash queue as an element of the hash queue. The hash value is calculated by combining the shared secret key and the message, so that the security of the data in the transmission process can be greatly improved.
As an optional implementation manner of the embodiment of the present invention, performing hash calculation on a current message to be sent to obtain a hash value corresponding to the current message to be sent, performing hash calculation on the hash value corresponding to the current message to be sent and a current end-of-chain node value to obtain a new hash value, using the new hash value as the end-of-chain node value, and using the current end-of-chain node value as an intermediate node value includes: obtaining a salt value required for generating a hash chain; carrying out hash calculation on the current message to be sent to obtain a hash value corresponding to the current message to be sent, carrying out hash calculation on the hash value, the salt value and the current chain tail node value corresponding to the current message to be sent to obtain a new hash value, and taking the new hash value as the chain tail node value and the current chain tail node value as the intermediate node value.
Specifically, the invention can take the hash value of a certain message sent by the sending end or the hash value of a certain message received by the receiving end as a salt variable, or take the hash value of a certain number of messages sent by the sending end or the hash value of a certain number of messages received by the receiving end as a salt variable, or take the generated hash chain node value as a salt variable. In addition, data preset or negotiated by other modes of the two communication parties can be used as a salt value variable, and a generation mode of the salt value variable can be adopted.
There may be a variety of ways. Fig. 5 shows a specific manner, but the present invention is not limited thereto.
In specific implementation, referring to fig. 6, the sending end uses the hash value of a certain message sent as a salt value, and the receiving end uses the hash value of a message received corresponding to the sending end as the salt value, where the MAC is the salt value calculated by the message. In the data transmission process, the hash queue generates a hash chain, the original hash queue head element and the hash chain tail element directly form a combined hash element, the hash value is calculated through a hash function, and the hash value is obtained through the hash function calculation after the salt value is inserted into the combined hash element. And pointing the pointer of the obtained hash value to the tail of the hash chain, and adding the pointer as a hash chain element into the hash chain.
As an optional implementation manner of the embodiment of the present invention, the current message to be sent includes: a sending end sends a message to a receiving end; or the message sent by the sending end to the receiving end and the message sent by the receiving end to the sending end.
Specifically, in the actual communication process, there is a situation as shown in fig. 7, that is, in a case that two ends of a communication send a message to each other multiple times in one communication, if a new hash chain is separately formed for each change of the data transmission flow direction, the problems of large resource overhead and difficult tracing of a problem message will be caused.
In view of this, the present invention adopts a method of forming a hash chain from all communication messages of both communication parties. For example, as shown in fig. 8, the communication parties a and B form a message queue from a message sequence of a message sent from a to B and a message sent from B to a, and the hash chain formed by the sending and receiving of the two parties is identical to the hash chain received by verification. The method for forming the hash chain by the bidirectional messages can reduce the overhead of independent chaining each time and enable the messages with problems to be more easily traced.
Therefore, by using the method for constructing the message Wen Haxi chain provided by the embodiment of the invention, the hash value of the transmitted message can be subjected to iterative hash to form a hash chain related to the message sequence. The integrity, the authenticity and the synchronism of the message sequence can be ensured by the two communication parties through the hash chain, so that the safety of message transmission is greatly improved; when the data signature authentication is carried out, the communication parties only need to carry out the signature authentication according to the data messages with a certain interval, and the signature authentication is not needed to be carried out on each data message, so that the integrity and non-repudiation of a plurality of messages can be ensured, the expenditure of the signature authentication is reduced, and the efficiency of message transmission is effectively improved.
Fig. 9 is a schematic structural diagram of a device for constructing a chain of a report Wen Haxi, which is provided by an embodiment of the present invention, where the device for constructing a chain of a report Wen Haxi applies the method described above, and only the structure of the device for constructing a chain of a report Wen Haxi is described below, and other less matters are described, please refer to the related description in the method for constructing a chain of a report Wen Haxi, and referring to fig. 9, the device for constructing a chain of a report Wen Haxi provided by an embodiment of the present invention includes:
the construction module is used for constructing a hash chain, and the hash chain comprises: the method comprises the steps of sequentially connecting a first node value, an intermediate node value and a chain tail node value, wherein the chain tail node value is the latest node value of a hash chain, and the hash chain grows continuously along with updating transformation of the chain tail node value.
The computing module is used for carrying out hash computation on the current message to be sent to obtain a hash value corresponding to the current message to be sent, carrying out hash computation on the hash value corresponding to the current message to be sent and the current chain tail node value to obtain a new hash value, and taking the new hash value as the chain tail node value and the current chain tail node value as the intermediate node value.
As an alternative implementation of the embodiment of the present invention, the first node value includes: a new first hash value or 1 st hash value, wherein: the 1 st hash value is the 1 st hash value corresponding to the first message obtained by carrying out hash calculation on the first message to be sent; the new first hash value is obtained by performing iterative hash calculation on the 1 st hash value.
As an optional implementation manner of the embodiment of the present invention, the calculation module performs hash calculation on the current message to be sent to obtain a hash value corresponding to the current message to be sent in the following manner: the calculation module is specifically configured to obtain a shared key, and perform hash calculation on the shared key and a current message to be sent to obtain a hash value corresponding to the current message to be sent.
As an optional implementation manner of the embodiment of the present invention, the calculation module performs hash calculation on a current message to be sent to obtain a hash value corresponding to the current message to be sent, performs hash calculation on the hash value corresponding to the current message to be sent and a current end-of-chain node value to obtain a new hash value, and uses the new hash value as the end-of-chain node value and the current end-of-chain node value as the intermediate node value: the computing module is specifically used for obtaining a salt value required by generating a hash chain; carrying out hash calculation on the current message to be sent to obtain a hash value corresponding to the current message to be sent, carrying out hash calculation on the hash value, the salt value and the current chain tail node value corresponding to the current message to be sent to obtain a new hash value, and taking the new hash value as the chain tail node value and the current chain tail node value as the intermediate node value.
As an optional implementation manner of the embodiment of the present invention, a sending end sends a message to a receiving end; or the message sent by the sending end to the receiving end and the message sent by the receiving end to the sending end.
Therefore, by using the construction device of the message Wen Haxi chain provided by the embodiment of the invention, the hash value of the transmitted message can be subjected to iterative hash to form a hash chain related to the message sequence. The integrity, the authenticity and the synchronism of the message sequence can be ensured by the two communication parties through the hash chain, so that the safety of message transmission is greatly improved; when the data signature authentication is carried out, the communication parties only need to carry out the signature authentication according to the data messages with a certain interval, and the signature authentication is not needed to be carried out on each data message, so that the integrity and non-repudiation of a plurality of messages can be ensured, the expenditure of the signature authentication is reduced, and the efficiency of message transmission is effectively improved.
The invention also provides a device for constructing the message hash chain, which comprises the following steps: the memory is used for storing program codes of the processing procedure of the hash chain construction method; and a processor for executing the program code.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to assist in understanding the methods of the present invention and the core ideas thereof; also, it is within the scope of the present invention to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the invention.

Claims (4)

1. The method for constructing the message hash chain is characterized by comprising the following steps:
building a hash chain, the hash chain comprising: the method comprises the steps of sequentially connecting a first node value, an intermediate node value and a chain tail node value, wherein the chain tail node value is the latest node value of the hash chain, and the hash chain continuously grows along with updating transformation of the chain tail node value;
carrying out hash calculation on a current message to be sent to obtain a hash value corresponding to the current message to be sent, carrying out hash calculation on the hash value corresponding to the current message to be sent and a current chain tail node value to obtain a new hash value, and taking the new hash value as the chain tail node value and the current chain tail node value as the intermediate node value.
2. The method of claim 1, wherein the performing hash computation on the current message to be sent to obtain a hash value corresponding to the current message to be sent comprises:
and obtaining a shared secret key, and carrying out hash calculation on the shared secret key and the current message to be sent to obtain a hash value corresponding to the current message to be sent.
3. The method of claim 1, wherein the performing hash calculation on the current message to be sent to obtain a hash value corresponding to the current message to be sent, performing hash calculation on the hash value corresponding to the current message to be sent and a current end-of-chain node value to obtain a new hash value, using the new hash value as the end-of-chain node value, and using the current end-of-chain node value as the intermediate node value includes:
obtaining a salt value required for generating the hash chain;
carrying out hash calculation on the current message to be sent to obtain a hash value corresponding to the current message to be sent, carrying out hash calculation on the hash value corresponding to the current message to be sent, the salt value and the current chain tail node value to obtain a new hash value, taking the new hash value as the chain tail node value, and taking the current chain tail node value as the intermediate node value.
4. The method of claim 1, wherein the current message to be sent comprises:
a sending end sends a message to a receiving end; or alternatively
And the message sent by the sending end to the receiving end and the message sent by the receiving end to the sending end.
CN202310031163.5A 2021-03-01 2021-04-02 Message hash chain construction method Pending CN116155507A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN2021102244034 2021-03-01
CN202110224403 2021-03-01
CN202110360263.3A CN113114471A (en) 2021-03-01 2021-04-02 Message hash chain construction method and device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN202110360263.3A Division CN113114471A (en) 2021-03-01 2021-04-02 Message hash chain construction method and device

Publications (1)

Publication Number Publication Date
CN116155507A true CN116155507A (en) 2023-05-23

Family

ID=76713546

Family Applications (5)

Application Number Title Priority Date Filing Date
CN202310031163.5A Pending CN116155507A (en) 2021-03-01 2021-04-02 Message hash chain construction method
CN202110360263.3A Pending CN113114471A (en) 2021-03-01 2021-04-02 Message hash chain construction method and device
CN202110360749.7A Active CN113114749B (en) 2021-03-01 2021-04-02 Hash chain construction and file data synchronization method, device and system
CN202310076478.1A Pending CN116094731A (en) 2021-03-01 2021-04-02 Signature authentication method and system based on Wen Haxi chain
CN202110360757.1A Pending CN113114472A (en) 2021-03-01 2021-04-02 Authentication method and system based on message hash chain

Family Applications After (4)

Application Number Title Priority Date Filing Date
CN202110360263.3A Pending CN113114471A (en) 2021-03-01 2021-04-02 Message hash chain construction method and device
CN202110360749.7A Active CN113114749B (en) 2021-03-01 2021-04-02 Hash chain construction and file data synchronization method, device and system
CN202310076478.1A Pending CN116094731A (en) 2021-03-01 2021-04-02 Signature authentication method and system based on Wen Haxi chain
CN202110360757.1A Pending CN113114472A (en) 2021-03-01 2021-04-02 Authentication method and system based on message hash chain

Country Status (1)

Country Link
CN (5) CN116155507A (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125080A (en) * 2021-09-29 2022-03-01 北京信息科技大学 Message link terminal protocol stack construction method and analysis method, device and terminal
CN114553431A (en) * 2022-01-27 2022-05-27 北京信息科技大学 Communication method and device with memory function
CN114726543B (en) * 2022-04-12 2023-07-18 北京信息科技大学 Key chain generation and message sending and receiving methods and devices based on message chain
CN116055065B (en) * 2023-03-30 2023-06-20 中国民航大学 ADS-B data security authentication method based on tree chain mixing
CN116319112B (en) * 2023-05-24 2023-09-22 中国人民解放军军事科学院系统工程研究院 Message integrity verification method and system
CN116702230A (en) * 2023-08-08 2023-09-05 天津市城市规划设计研究总院有限公司 Method and system for guaranteeing data consistency in urban planning field

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI252413B (en) * 2004-12-10 2006-04-01 Hon Hai Prec Ind Co Ltd System and method for updating remote computer files
CN102446250A (en) * 2010-10-13 2012-05-09 索尼公司 Methods, apparatuses and methods for protecting and verifying data integrity
US20130304705A1 (en) * 2012-05-11 2013-11-14 Twin Peaks Software, Inc. Mirror file system
CN102946410A (en) * 2012-10-15 2013-02-27 北京奇虎科技有限公司 Method and device for network synchronization
CN103888449A (en) * 2014-03-05 2014-06-25 亿赞普(北京)科技有限公司 Method and device for packet reassembly
CN107040509B (en) * 2016-11-23 2019-12-06 杭州迪普科技股份有限公司 message sending method and device
KR101948214B1 (en) * 2018-02-09 2019-02-14 경희대학교 산학협력단 Method for estimating integrity of packet in sensor network
CN109327311B (en) * 2018-08-03 2021-09-21 克洛斯比尔有限公司 Hash timestamp creating method and device and readable storage medium
CN110177142A (en) * 2019-05-24 2019-08-27 无锡华云数据技术服务有限公司 A kind of method of data synchronization, device and electronic equipment
JP7277912B2 (en) * 2019-06-06 2023-05-19 株式会社ワイビーエム Hash chain use data non-falsification proof system and data management device therefor
CN110650018A (en) * 2019-09-06 2020-01-03 南京南瑞继保工程技术有限公司 Message tamper-proof method and device
CN111523151A (en) * 2020-04-21 2020-08-11 贵州大学 Method and system for storing electronic data based on block chain technology
CN111726224A (en) * 2020-05-13 2020-09-29 北京信息科技大学 Quantum secret communication-based data integrity rapid authentication method, system, terminal and storage medium
CN111831997B (en) * 2020-06-18 2021-07-27 华东师范大学 Method for establishing credible relationship between client and centralized database
CN111884949B (en) * 2020-08-05 2022-05-17 支付宝(杭州)信息技术有限公司 Method, device and system for determining and realizing shunting scheme of AB experiment
CN112307511A (en) * 2020-11-06 2021-02-02 珠海格力电器股份有限公司 File protection method and system

Also Published As

Publication number Publication date
CN113114472A (en) 2021-07-13
CN113114749B (en) 2023-06-06
CN116094731A (en) 2023-05-09
CN113114749A (en) 2021-07-13
CN113114471A (en) 2021-07-13

Similar Documents

Publication Publication Date Title
CN116155507A (en) Message hash chain construction method
CN104243456B (en) Suitable for signature of the cloud computing based on SM2 algorithms and decryption method and system
US8397062B2 (en) Method and system for source authentication in group communications
Fitzi et al. Detectable Byzantine agreement secure against faulty majorities
CN110943838A (en) Method, apparatus and storage medium for determining consensus of blocks in a blockchain network
CN102724211A (en) Key agreement method
CN113507513B (en) Zk-snark-based ubiquitous power Internet of things transaction data management method
CN113328997A (en) Alliance chain cross-chain system and method
CN115174570A (en) Cross-chain consensus method and system based on dynamic committee
US20210194676A1 (en) Secure key management
CN113360935A (en) Account checking method and system based on block chain technology
CN102761520B (en) Method and system for processing authentication information
CN111600703A (en) SM 2-based signature method and system, electronic device and storage medium
CN115361455B (en) Data transmission storage method and device and computer equipment
US9438425B2 (en) Robust MAC aggregation with short MAC tags
CN111274613B (en) Iterative SM2 digital signature generation method, system, medium and device
CN113867690A (en) Generation method and device of random number in block chain and block chain link point
Chen et al. Multi-dimensional resource management system based on blockchain and cybertwin
JPWO2007138876A1 (en) Communication node authentication system and method, communication node authentication program
CN116861390B (en) Cross-block chain batch transaction authentication method and device based on aggregated signature
CN116192382B (en) DH (digital rights management) key third party tamper verification method and system based on blockchain
CN113839921B (en) Data processing method, device, computer equipment and storage medium
CN113328935B (en) Distributed safety tracing block chain system based on industrial internet
CN113542285B (en) Multi-stage automatic formal verification method for Terdermint consensus protocol
CN116582327A (en) Unmanned aerial vehicle CAN bus encryption communication system and method based on secret sharing algorithm

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