CN112636925A - SM3 digital signature authentication method, device and equipment based on TCP - Google Patents
SM3 digital signature authentication method, device and equipment based on TCP Download PDFInfo
- Publication number
- CN112636925A CN112636925A CN202011554106.8A CN202011554106A CN112636925A CN 112636925 A CN112636925 A CN 112636925A CN 202011554106 A CN202011554106 A CN 202011554106A CN 112636925 A CN112636925 A CN 112636925A
- Authority
- CN
- China
- Prior art keywords
- digital signature
- communication terminal
- password
- tcp
- communication
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000004891 communication Methods 0.000 claims abstract description 148
- 230000001360 synchronised effect Effects 0.000 claims abstract description 19
- 238000004422 calculation algorithm Methods 0.000 claims description 19
- 238000010586 diagram Methods 0.000 description 15
- 238000003860 storage Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 10
- 230000006872 improvement Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 229920001296 polysiloxane Polymers 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000005728 strengthening Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3226—Cryptographic 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 a predetermined code, e.g. password, passphrase or PIN
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/163—In-band adaptation of TCP data exchange; In-band control procedures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3247—Cryptographic 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the specification discloses a method, a device and equipment for SM3 digital signature authentication based on TCP, wherein the method comprises the following steps: the first communication end sets a first password which is the same as that of the second communication end; the method comprises the steps that a first communication end receives a synchronous message which is sent by a second communication end and carries a first SM3 digital signature in a TCP option, wherein the TCP option comprises a first SM3 digital signature and TCP related information; and the first communication terminal determines a second SM3 digital signature according to the first password and the TCP related information, and determines that the first SM3 digital signature passes authentication when the first SM3 digital signature is verified to be the same as the second SM3 digital signature. The first communication end and the second communication end are provided with the same first password, when the first communication end receives the synchronous message which is sent by the second communication end and carries the first SM3 digital signature in the TCP option, the first SM3 digital signature is authenticated through the first password, and the first password is only stored in the first communication end and the second communication end, so that the security can be greatly ensured when the first SM3 digital signature is authenticated.
Description
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method, an apparatus, and a device for authenticating SM3 digital signature based on TCP.
Background
The digital signature is a digital string which can be generated only by a sender of the information and cannot be forged by others, and the digital string is also a valid proof of the authenticity of the information sent by the sender of the information. It is a method for authenticating digital information that is similar to a common physical signature written on paper, but is implemented using techniques in the field of cryptographic encryption.
With the continuous update of the technology, the possibility that the existing digital signature authentication mode is cracked is higher and higher, so a safer digital signature authentication mode is needed at present.
Disclosure of Invention
One or more embodiments of the present specification provide a method, an apparatus, and a device for authenticating a SM3 digital signature based on TCP, so as to solve the following technical problems: there is a need for a more secure way of authenticating digital signatures.
One or more embodiments of the present disclosure adopt the following technical solutions:
one or more embodiments of the present specification provide a method for verifying a digital signature of a SM3 based on TCP, including:
the first communication end sets a first password which is the same as that of the second communication end;
the first communication terminal receives a synchronous message which is sent by the second communication terminal and carries a first SM3 digital signature in a TCP option, wherein the TCP option comprises the first SM3 digital signature and TCP related information;
and the first communication terminal determines a second SM3 digital signature according to the first password and the TCP related information, and determines that the first SM3 digital signature passes authentication when the first SM3 digital signature is verified to be the same as the second SM3 digital signature.
One or more embodiments of the present specification provide an SM3 digital signature authentication apparatus based on a TCP protocol, including:
the configuration unit is used for setting a first password which is the same as that of the second communication terminal by the first communication terminal;
a message receiving unit, configured to receive, by the first communication end, a synchronization message that carries a first SM3 digital signature in a TCP option sent by the second communication end, where the TCP option includes the first SM3 digital signature and TCP related information;
and the signature authentication unit is used for determining a second SM3 digital signature by the first communication terminal according to the first password and the TCP related information, and determining that the first SM3 digital signature passes authentication when the first SM3 digital signature is verified to be the same as the second SM3 digital signature.
One or more embodiments of the present specification provide a SM3 digital signature authentication device based on a TCP protocol, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
the first communication end sets a first password which is the same as that of the second communication end;
the first communication terminal receives a synchronous message which is sent by the second communication terminal and carries a first SM3 digital signature in a TCP option, wherein the TCP option comprises the first SM3 digital signature and TCP related information;
and the first communication terminal determines a second SM3 digital signature according to the first password and the TCP related information, and determines that the first SM3 digital signature passes authentication when the first SM3 digital signature is verified to be the same as the second SM3 digital signature.
One or more embodiments of the present specification provide a non-transitory computer storage medium storing computer-executable instructions configured to:
the first communication end sets a first password which is the same as that of the second communication end;
the first communication terminal receives a synchronous message which is sent by the second communication terminal and carries a first SM3 digital signature in a TCP option, wherein the TCP option comprises the first SM3 digital signature and TCP related information;
and the first communication terminal determines a second SM3 digital signature according to the first password and the TCP related information, and determines that the first SM3 digital signature passes authentication when the first SM3 digital signature is verified to be the same as the second SM3 digital signature.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects: in the embodiment of the description, the same first password is set by the first communication end and the second communication end, and when the first communication end receives the sync message which is sent by the second communication end and carries the first SM3 digital signature in the TCP option, the first SM3 digital signature is authenticated by the first password, and because the first password is only stored in the first communication end and the second communication end, the security can be greatly ensured when the first SM3 digital signature is authenticated.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort. In the drawings:
fig. 1 is a flowchart illustrating a method for authenticating a digital signature of a SM3 based on TCP according to one or more embodiments of the present disclosure
Fig. 2 is a schematic flowchart of setting a password at a current communication end according to one or more embodiments of the present disclosure;
fig. 3 is a schematic flowchart of sending a synchronization packet according to one or more embodiments of the present disclosure;
fig. 4 is a schematic flow diagram of SM3 digital signature authentication provided in one or more embodiments of the present description;
fig. 5 is a schematic structural diagram of an SM3 digital signature authentication apparatus based on a TCP protocol according to one or more embodiments of the present disclosure;
fig. 6 is a schematic structural diagram of an SM3 digital signature authentication device based on a TCP protocol according to one or more embodiments of the present disclosure.
Detailed Description
The embodiment of the specification provides a method, a device and equipment for SM3 digital signature authentication based on TCP.
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present specification without any creative effort shall fall within the protection scope of the present specification.
At present, MD5 message digest authentication is mostly adopted in a security authentication algorithm of a Linux TCP protocol, an option of a TCP MD5 is mainly used for strengthening the security of a BGP protocol, and the basic principle is that MD5 message digest is carried in an option of a TCP PDU. The message digest is authenticated similarly to a digital signature of the message, which contains information that only two parties to communicate authenticate each other. The BGP protocol uses TCP as its transport layer protocol, and signature authentication using TCP MD5 is effective in reducing security risks.
But recently, a collision attack method of the MD5 algorithm is proposed, so that the MD5 algorithm is no longer safe.
The embodiment of the specification adopts SM3 algorithm to realize the safety certification of the digital signature.
Fig. 1 is a flow diagram of a TCP-based SM3 digital signature authentication method according to one or more embodiments of the present disclosure, which may be executed by a computing device in the communication field, and some input parameters or intermediate results in the flow allow manual intervention to adjust to help improve accuracy.
The process in fig. 1 may include the following steps:
s101: the first communication terminal is provided with a first password which is the same as that of the second communication terminal.
In one or more embodiments of the present description, the step may specifically include: in the password pool stored locally, the first communication terminal judges whether a related second password exists in the local password pool or not according to the network address (IPv4 address or IPv6 address) and the protocol number (IPv4 is 2 or IPv6 is 10) of the second communication terminal; if the first communication terminal judges that the local password pool has the associated second password, replacing the second password with the first password; and if the first communication terminal judges that no associated second password exists in the local password pool, allocating an SM3 digital signature pool containing an SM3 algorithm, and associating the first password with the network address and the protocol number of the second communication terminal. The first password and the second password may be plaintext passwords.
The second password may be a password set when the SM3 digital signature is authenticated last time, and if the second password exists, it may be stated that the first communication terminal has the SM3 digital signature pool. In addition, the password pool can be used for storing the associated first password and the network address and the protocol number of the second communication terminal, and when the first password is needed, the network address and the protocol number of the second communication terminal can be used for searching.
Further, in one or more embodiments of the present specification, if the first communication terminal determines that there is no associated second password in the local password pool, allocating an SM3 digital signature pool including an SM3 algorithm may specifically include:
if the first communication terminal judges that no associated second password exists in the local password pool, when the first communication terminal judges that no SM3 digital signature pool exists, the first communication terminal allocates an SM3 digital signature pool; and when the SM3 digital signature pool is judged to exist, the first password is associated with the network address and the protocol number of the second communication terminal.
S102: the first communication end receives a synchronous message which is sent by the second communication end and carries a first SM3 digital signature in a TCP option, and the TCP option comprises a first SM3 digital signature and TCP related information.
In one or more embodiments of the present description, the step may specifically include: the second communication terminal locally acquires an SM3 digital signature pool, locally acquires TCP related information, acquires a locally stored first password according to the network address and the protocol number of the first communication terminal, determines a first SM3 digital signature according to an SM3 algorithm, the TCP related information and the first password in the SM3 digital signature pool, and sends a synchronous message carrying the first SM3 digital signature in a TCP option to the first communication terminal; and the first communication terminal receives the synchronous message. Wherein, the synchronous message contains TCP options.
Further, in one or more embodiments of the present specification, before the second communication terminal locally obtains the SM3 digital signature pool, the method further includes: the second communication terminal judges whether a first password exists in a local password pool or not according to the network address and the protocol number of the first communication terminal; if the second communication terminal judges that the first password exists in the local password pool, executing a step that the second communication terminal locally acquires an SM3 digital signature pool; and if the second communication terminal judges that the first password does not exist in the local password pool, the synchronous message is sent to the first communication terminal (the synchronous message which does not carry the first SM3 digital signature in the TCP option).
S103: and the first communication terminal determines a second SM3 digital signature according to the first password and the TCP related information, and determines that the first SM3 digital signature passes authentication when the first SM3 digital signature is verified to be the same as the second SM3 digital signature.
In one or more embodiments of the present description, the step may specifically include: the first communication end acquires a first SM3 digital signature in a TCP option; the first communication terminal acquires TCP related information in the TCP option and acquires a first password locally; the first communication end determines a second SM3 digital signature according to the TCP related information and the local first password.
Further, in one or more embodiments of the present specification, before the first communication terminal obtains the digital signature of the first SM3 in the TCP option, the method further includes: the first communication terminal judges whether a first password exists in a local password pool or not according to the network address and the protocol number of the second communication terminal; if the first communication terminal judges that the first password exists in the local password pool, the first communication terminal acquires a first SM3 digital signature in a TCP option; and if the first communication terminal judges that the first password does not exist in the local password pool, determining that the first SM3 digital signature authentication does not pass.
Further, the TCP related information includes TCP pseudo header information and TCP protocol header information, and the TCP pseudo header information includes a source network address, a destination network address, a protocol number, and a message length.
Further, the embodiment of this specification may also be implemented by referring to a first end and a second end, and referring to fig. 2, a schematic flow chart illustrating that a current communication end sets a password, where the password is used for SM3 digital signature authentication, and the first end is a home end and the second end is an opposite end, which specifically includes:
step 11: setting the same password at the current end and the opposite end;
step 12: in a locally stored password pool, searching a password (the password is used for carrying out SM3 digital signature authentication last time) according to a network address (IPv4 address or IPv6 address) and a protocol number (IPv4 is 2 or IPv6 is 10) of an opposite terminal, if the password is found, updating the password to be a set password, otherwise, continuing to execute the following steps;
step 13: checking whether to allocate an SM3 digital signature authentication pool, if not allocating an SM3 digital signature pool, allocating a new SM3 digital signature pool, while associating the correspondent network address and protocol number with the set password in a password pool stored locally.
Further, referring to fig. 3, a schematic diagram of a flow of sending a synchronization packet is shown, where the first end is an opposite end, and the second end is a home end, which may specifically include:
step 21: in a locally stored password pool, searching a set password according to a network address (IPv4 address or IPv6 address) and a protocol number (IPv4 is 2 or IPv6 is 10) of an opposite terminal, and if the password cannot be found, not carrying an SM3 digital signature in a TCP option in a SYN message (synchronous message);
step 22: if a corresponding password is found, the following calculation of the SM3 digital signature is performed:
a) acquiring an SM3 digital signature pool;
b) acquiring TCP pseudo header (including source IP, destination IP, TCP protocol number and message length) information;
c) acquiring TCP protocol header information;
d) acquiring a locally stored password;
e) forming a message word used for SM3 authentication according to the information acquired in the steps b, c and d, calculating an SM3 digital signature by using an SM3 algorithm in an SM3 digital signature pool, and filling an SM3 digital signature in a TCP option;
step 23: send SYN message carrying SM3 digital signature information in TCP options.
Further, referring to fig. 4, a schematic flow chart of SM3 digital signature authentication is shown, where the first end is a home end, and the second end is an opposite end, which may specifically include:
step 31: in a password pool stored locally, searching a set password according to a network address (IPv4 address or IPv6 address) and a protocol number (IPv4 is 2 or IPv6 is 10) of an opposite terminal, if the password cannot be found, indicating that the authentication fails, and the TCP connection establishment fails, otherwise, continuing the following steps;
step 32: if the password is found, the following authentication of the SM3 digital signature is started:
a) acquiring the SM3 digital signature at the TCP option;
b) acquiring TCP pseudo header (including source IP, destination IP, TCP protocol number and message length) information;
c) acquiring TCP protocol header information;
d) acquiring a locally stored password;
e) forming a message word used for SM3 authentication according to the information acquired in the steps b, c and d, and calculating an SM3 digital signature by using an SM3 algorithm;
C) and if the newly-calculated SM3 digital signature is consistent with the acquired SM3 digital signature in the TCP option, the authentication is passed.
It should be noted that the SM3 algorithm is a chinese commercial cipher hash algorithm standard published by the chinese national cipher authority. The SM3 algorithm is suitable for digital signature and verification in commercial cryptography application, and is an algorithm for improving implementation on the basis of SHA-256. The SM3 algorithm uses a Merkle-Damgard structure with a message packet length of 512 bits and a digest value length of 256 bits. Up to now, the security of the SM3 algorithm was relatively high.
In addition, the key of the SM3 digital signature authentication in the embodiment of the present specification is that an asymmetric encryption algorithm is adopted to ensure that authentication cannot be successfully performed without knowing a password, and the authentication is safer than the internationally used MD5, thereby ensuring data security in network communication.
Fig. 5 is a schematic structural diagram of an SM3 digital signature authentication apparatus based on a TCP protocol according to one or more embodiments of the present specification, where the apparatus includes: a configuration unit 1, a message receiving unit 2 and a signature authentication unit 3.
The configuration unit 1 is used for setting a first password which is the same as that of a second communication terminal by a first communication terminal;
the message receiving unit 2 is configured to receive, by the first communication end, a synchronization message that is sent by the second communication end and carries a first SM3 digital signature in a TCP option, where the TCP option includes a first SM3 digital signature and TCP related information;
the signature authentication unit 3 is used for the first communication terminal to determine the second SM3 digital signature according to the first password and the TCP-related information, and when the first SM3 digital signature is verified to be the same as the second SM3 digital signature, it is determined that the first SM3 digital signature passes authentication.
Fig. 6 is a schematic structural diagram of an SM3 digital signature authentication device based on a TCP protocol according to one or more embodiments of the present specification, where the apparatus includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to cause the at least one processor to:
the first communication end sets a first password which is the same as that of the second communication end;
the method comprises the steps that a first communication end receives a synchronous message which is sent by a second communication end and carries a first SM3 digital signature in a TCP option, wherein the TCP option comprises a first SM3 digital signature and TCP related information;
and the first communication terminal determines a second SM3 digital signature according to the first password and the TCP related information, and determines that the first SM3 digital signature passes authentication when the first SM3 digital signature is verified to be the same as the second SM3 digital signature.
One or more embodiments of the present specification provide a non-transitory computer storage medium storing computer-executable instructions configured to:
the first communication end sets a first password which is the same as that of the second communication end;
the method comprises the steps that a first communication end receives a synchronous message which is sent by a second communication end and carries a first SM3 digital signature in a TCP option, wherein the TCP option comprises a first SM3 digital signature and TCP related information;
and the first communication terminal determines a second SM3 digital signature according to the first password and the TCP related information, and determines that the first SM3 digital signature passes authentication when the first SM3 digital signature is verified to be the same as the second SM3 digital signature.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is merely one or more embodiments of the present disclosure and is not intended to limit the present disclosure. Various modifications and alterations to one or more embodiments of the present description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of the claims of the present specification.
Claims (10)
1. A SM3 digital signature authentication method based on TCP is characterized by comprising the following steps:
the first communication end sets a first password which is the same as that of the second communication end;
the first communication terminal receives a synchronous message which is sent by the second communication terminal and carries a first SM3 digital signature in a TCP option, wherein the TCP option comprises the first SM3 digital signature and TCP related information;
and the first communication terminal determines a second SM3 digital signature according to the first password and the TCP related information, and determines that the first SM3 digital signature passes authentication when the first SM3 digital signature is verified to be the same as the second SM3 digital signature.
2. The method according to claim 1, wherein the first communication end sets a first password that is the same as that of the second communication end, and specifically includes:
the first communication terminal judges whether a second password associated with the first communication terminal exists locally or not according to the network address and the protocol number of the second communication terminal;
if the first communication terminal judges that the associated second password exists locally, replacing the second password with the first password;
and if the first communication terminal judges that the associated second password does not exist locally, distributing an SM3 digital signature pool containing an SM3 algorithm, and associating the first password with the network address and the protocol number of the second communication terminal.
3. The method of claim 2, wherein if the first communication terminal determines that the associated second password does not exist locally, allocating an SM3 digital signature pool containing an SM3 algorithm, specifically comprises:
and if the first communication terminal judges that the associated second password does not exist locally, distributing the SM3 digital signature pool when the first communication terminal judges that the SM3 digital signature pool does not exist.
4. The method according to claim 1, wherein the receiving, by the first communication end, the sync packet sent by the second communication end and carrying the first SM3 digital signature in the TCP option specifically includes:
the second communication terminal locally acquires an SM3 digital signature pool;
the second communication terminal locally acquires the TCP related information;
the second communication terminal acquires the first password stored locally according to the network address and the protocol number of the first communication terminal;
the second communication terminal determines the first SM3 digital signature according to the SM3 algorithm, the TCP related information and the first password in the SM3 digital signature pool, and sends the synchronous message carrying the first SM3 digital signature in the TCP option to the first communication terminal;
and the first communication terminal receives the synchronous message.
5. The method of claim 4, wherein before the second communication end locally obtains the SM3 digital signature pool, the method further comprises:
the second communication terminal judges whether the first password exists locally or not according to the network address and the protocol number of the first communication terminal;
if the second communication terminal judges that the first password exists locally, executing a step that the second communication terminal acquires an SM3 digital signature pool locally;
and if the second communication end judges that the first password does not exist locally, the synchronous message is sent to the first communication end.
6. The method according to claim 1, wherein the determining, by the first communication terminal, the second SM3 digital signature according to the first password and the TCP-related information specifically includes:
the first communication terminal acquires the first SM3 digital signature in the TCP option;
the first communication terminal acquires the TCP related information in the TCP option and acquires the first password locally;
and the first communication terminal determines the digital signature of the second SM3 according to the TCP related information and the local first password.
7. The method of claim 6, wherein before the first communication end obtains the first SM3 digital signature in the TCP option, the method further comprises:
the first communication terminal judges whether the first password is stored locally according to the network address and the protocol number of the second communication terminal;
if the first communication end judges that the first password exists locally, the first communication end acquires the first SM3 digital signature in the TCP option;
and if the first communication terminal judges that the first password does not exist locally, determining that the first SM3 digital signature authentication does not pass.
8. The method according to any of claims 1-7, wherein the TCP related information comprises TCP pseudo header information and TCP protocol header information, and the TCP pseudo header information comprises a source network address, a destination network address, a protocol number and a message length.
9. An SM3 digital signature authentication device based on TCP protocol, comprising:
the configuration unit is used for setting a first password which is the same as that of the second communication terminal by the first communication terminal;
a message receiving unit, configured to receive, by the first communication end, a synchronization message that carries a first SM3 digital signature in a TCP option sent by the second communication end, where the TCP option includes the first SM3 digital signature and TCP related information;
and the signature authentication unit is used for determining a second SM3 digital signature by the first communication terminal according to the first password and the TCP related information, and determining that the first SM3 digital signature passes authentication when the first SM3 digital signature is verified to be the same as the second SM3 digital signature.
10. An SM3 digital signature authentication device based on a TCP protocol, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
the first communication end sets a first password which is the same as that of the second communication end;
the first communication terminal receives a synchronous message which is sent by the second communication terminal and carries a first SM3 digital signature in a TCP option, wherein the TCP option comprises the first SM3 digital signature and TCP related information;
and the first communication terminal determines a second SM3 digital signature according to the first password and the TCP related information, and determines that the first SM3 digital signature passes authentication when the first SM3 digital signature is verified to be the same as the second SM3 digital signature.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011554106.8A CN112636925B (en) | 2020-12-24 | 2020-12-24 | SM3 digital signature authentication method, device and equipment based on TCP |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011554106.8A CN112636925B (en) | 2020-12-24 | 2020-12-24 | SM3 digital signature authentication method, device and equipment based on TCP |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112636925A true CN112636925A (en) | 2021-04-09 |
CN112636925B CN112636925B (en) | 2023-02-03 |
Family
ID=75324576
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011554106.8A Active CN112636925B (en) | 2020-12-24 | 2020-12-24 | SM3 digital signature authentication method, device and equipment based on TCP |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112636925B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070160063A1 (en) * | 2006-01-10 | 2007-07-12 | Mynam Satish K | Approaches for switching transport protocol connection keys |
CN102685093A (en) * | 2011-12-08 | 2012-09-19 | 陈易 | Mobile-terminal-based identity authentication system and method |
CN107947938A (en) * | 2017-11-21 | 2018-04-20 | 杭州尚尚签网络科技有限公司 | SM3 algorithms and the verification method and system of SM2 algorithm digital signature are used for PDF |
CN109818747A (en) * | 2018-12-28 | 2019-05-28 | 苏州科达科技股份有限公司 | Digital signature method and device |
CN110380852A (en) * | 2019-07-22 | 2019-10-25 | 中国联合网络通信集团有限公司 | Mutual authentication method and communication system |
CN112118223A (en) * | 2020-08-11 | 2020-12-22 | 北京智芯微电子科技有限公司 | Authentication method of master station and terminal, master station, terminal and storage medium |
-
2020
- 2020-12-24 CN CN202011554106.8A patent/CN112636925B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070160063A1 (en) * | 2006-01-10 | 2007-07-12 | Mynam Satish K | Approaches for switching transport protocol connection keys |
CN102685093A (en) * | 2011-12-08 | 2012-09-19 | 陈易 | Mobile-terminal-based identity authentication system and method |
CN107947938A (en) * | 2017-11-21 | 2018-04-20 | 杭州尚尚签网络科技有限公司 | SM3 algorithms and the verification method and system of SM2 algorithm digital signature are used for PDF |
CN109818747A (en) * | 2018-12-28 | 2019-05-28 | 苏州科达科技股份有限公司 | Digital signature method and device |
CN110380852A (en) * | 2019-07-22 | 2019-10-25 | 中国联合网络通信集团有限公司 | Mutual authentication method and communication system |
CN112118223A (en) * | 2020-08-11 | 2020-12-22 | 北京智芯微电子科技有限公司 | Authentication method of master station and terminal, master station, terminal and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112636925B (en) | 2023-02-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10997808B2 (en) | Secure smart unlocking | |
CN108140093B (en) | Migrating secrets using a hardware root of trust for a device | |
CN107395557B (en) | A service request processing method and device | |
EP3497878B1 (en) | Apparatus and methods for distributed certificate enrollment | |
EP3284000B1 (en) | Secure software authentication and verification | |
US9021267B2 (en) | System and method for using digital signatures to assign permissions | |
CN110781140B (en) | Method, device, computer equipment and storage medium for signing data in blockchain | |
JP2019036251A (en) | Update controller, software update system, and update control method | |
CN110391900A (en) | Private key processing method, terminal and key center based on SM2 algorithm | |
CN104765999A (en) | User resource information processing method, terminal and server | |
CN105577379A (en) | An information processing method and device | |
JP2015511082A (en) | Policy for secure packet transmission using required node path and cryptographic signature | |
CN112788036A (en) | Identity verification method and device | |
CN105009507A (en) | Generating a key derived from a cryptographic key using a physically unclonable function | |
CN105812313B (en) | Method and server for recovering session and method and device for generating session certificate | |
CN111683103A (en) | Information interaction method and device | |
CN107920081A (en) | Login authentication method and device | |
US9195838B2 (en) | Method and apparatus for providing provably secure user input/output | |
CN110708167A (en) | Method, device, equipment and medium for generating public key and private key | |
CN111241492A (en) | Product multi-tenant secure credit granting method, system and electronic equipment | |
CN119276642B (en) | A quantum-resistant cryptographic migration method, electronic device, and medium based on FIDO2 protocol | |
CN108199827A (en) | Client code integrity checking method, storage medium, electronic equipment and system | |
CN114040401B (en) | Terminal authentication method and system | |
CN112636925B (en) | SM3 digital signature authentication method, device and equipment based on TCP | |
CN110995447A (en) | Data storage method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |