Summary of the invention
The embodiment of the invention provides a kind of generation and verification method, equipment and system of digital signature, in order to solve the problem that causes as digital signature with character string in the prior art, realizes that the digital signature effect is more outstanding.
On the one hand, the embodiment of the invention provides a kind of generation method of digital signature, comprising:
Text characteristic information and environmental data are encrypted and/or encoded, generate character string;
Adopt two-dimension code to encode to described character string, generate two-dimension code image;
Described two-dimension code image as digital signature, is sent with text to be sent.
On the other hand, the embodiment of the invention provides a kind of verification method of digital signature, comprising:
The two-dimension code image that receives scanned be reduced into character string;
Described character string is decrypted, obtains environmental data and text characteristic information;
Check the text that receives according to described text characteristic information.
On the one hand, the embodiment of the invention provides a kind of generation equipment of digital signature, comprising:
The information encryption module is used for text characteristic information and environmental data being encrypted and/or being encoded, and generates character string;
Two-dimensional code generation module is used for adopting two-dimension code to encode to described character string, generates two-dimension code image;
Sending module is used for described two-dimension code image sending with text to be sent as digital signature.
On the other hand, the embodiment of the invention provides a kind of Authentication devices of digital signature, comprising:
Two-dimension code scan module, the two-dimension code image that is used for receiving scan and are reduced into character string;
The decrypts information module is used for described character string is decrypted, and obtains environmental data and text characteristic information;
The text authentication module is used for checking the text that receives according to described text characteristic information.
The embodiment of the invention provides the system of digital signature, comprising: the generation equipment of above-mentioned digital signature and the Authentication devices of digital signature.
As shown from the above technical solution, the generation of the digital signature of the embodiment of the invention and verification method, equipment and system, by with two-dimension code as digital signature, because picture has the visual sense feeling more formal than character string, so the effect that adopts two-dimension code more can push oneself to the front and sign as digital signature.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Fig. 1 is the generation method flow synoptic diagram of first embodiment of the invention, comprising:
Step 11: text characteristic information and environmental data are encrypted and/or encoded, generate character string;
Wherein, the text characteristic information can obtain in the following way:
Text to be sent is encoded, generate described text characteristic information, the algorithm of described coding comprises hashing algorithm.
Environmental data comprises at least: the apparatus characteristic information of user name, transmitting time and the information of transmission;
Described apparatus characteristic information comprises at least one in following: the network interface card identification number of machine, IP address, machine name.
Particularly, text characteristic and environmental data are encrypted and/or the algorithm of encoding can adopt rivest, shamir, adelman, also can be adopted the high symmetric encipherment algorithm of Cipher Strength.
Step 12: adopt two-dimension code to encode to described character string, generate two-dimension code image;
Wherein, the algorithm of two-dimension code coding can be PDF417, QRCode, Code49, code16K or CodeOne.
Step 13: described two-dimension code image as digital signature, is sent with text to be sent;
For example, can be with the annex of described two-dimension code image as mail, the perhaps signature of delivering as forum's speech sends after being attached to described text together.
This forum includes but not limited to: internet forum, news analysis, Web Community etc.
Further, present embodiment can also send user name with above-mentioned two-dimension code, text to be sent.Since expressly carry user name, can be so that the effect of digital signature be more outstanding.
Present embodiment by with two-dimension code as digital signature, can realize than the more effective signature effect of character string, and can utilize existing two dimension code reading equipment, can simply and efficiently be applied in the occasion that can adopt two-dimension code.
Fig. 2 is the verification method schematic flow sheet of second embodiment of the invention, comprising:
Step 21: the two-dimension code image that receives scanned be reduced into character string;
For example, be reduced into character string after can adopting existing two-dimensional code reading equipment with the scanning of the two-dimension code image that receives.
Step 22: described character string is decrypted, obtains environmental data and text characteristic information;
Particularly, can decipher character string, obtain environmental data and text characteristic information by the key and the decipherment algorithm of making an appointment.
Described environmental data comprises at least: the apparatus characteristic information of user name, transmitting time, transmission information; Described apparatus characteristic information comprises at least one in following: the network interface card identification number of machine, IP address, machine name.
Step 23: check the text that receives according to described text characteristic information.
Particularly,,, environmental data expressly can be obtained, the evidence that send related data of this environmental data as transmit leg the denial of transmit leg can be avoided afterwards through deciphering to character string for environmental data.Perhaps, if comprise environmental data expressly in the data that send, the environmental data that the environmental data after then can relatively deciphering expressly carries, whether legal to check the source that sends data.For example,, then can compare the user name and this user name of expressly carrying that obtain after the deciphering, if both unanimities show that then the source of data of this reception is effectively legal if the data that transmit leg sends further comprise user name.For the text characteristic information, can be in the following way:
Adopt hashing algorithm to encode to the text that receives, generate the text characteristic information;
If the text characteristic information of described generation is identical with the text characteristic information that receives (i.e. the text characteristic information that obtains by the deciphering character string), then checked result is that text is effective.Present embodiment by with two-dimension code as digital signature, can realize than the more effective signature effect of character string, and can utilize existing two dimension code reading equipment, can simply and efficiently be applied in the occasion that can adopt two-dimension code.
Fig. 3 is the generation device structure synoptic diagram of third embodiment of the invention, comprises information encryption module 31, two-dimensional code generation module 32 and sending module 33; Information encryption module 31 is used for text characteristic information and environmental data being encrypted and/or being encoded, and generates character string; Two-dimensional code generation module 32 is used for adopting two-dimension code to encode to described character string, generates two-dimension code image; Sending module 33 is used for described two-dimension code image sending with text to be sent as digital signature.
Further, present embodiment can also comprise text eigenwert generation module 34, and text eigenwert generation module 34 is used for text to be sent is encoded, and generates described text characteristic information, and the algorithm of described coding comprises hashing algorithm.
Particularly, described information encryption module 31 specifically is used for text characteristic information and environmental data are adopted rivest, shamir, adelman, perhaps adopts the high symmetric encipherment algorithm of Cipher Strength, encrypts and/or encodes, and generates character string; And/or described two-dimensional code generation module 32 specifically is used for described character string is adopted PDF417, QRCode, Code49, code16K or CodeOne algorithm, encodes, and generates two-dimension code image; And/or described sending module 33 specifically is used for the annex of described two-dimension code image as mail, and the perhaps signature of delivering as forum's speech sends after being attached to described text together.
Perhaps, the sending module of present embodiment can also specifically be used for user name with described two-dimension code image and described environmental data as digital signature, sends with text to be sent.
Present embodiment by with two-dimension code as digital signature, can realize than the more effective signature effect of character string, and can utilize existing two dimension code reading equipment, can simply and efficiently be applied in the occasion that can adopt two-dimension code.
Fig. 4 is the Authentication devices structural representation of fourth embodiment of the invention, comprises two-dimension code scan module 41, decrypts information module 42 and text authentication module 43; The two-dimension code image that two-dimension code scan module 41 is used for receiving scans and is reduced into character string; Decrypts information module 42 is used for described character string is decrypted, and obtains environmental data and text characteristic information; Text authentication module 43 is used for checking the text that receives according to described text characteristic information.
Wherein, described decrypts information module 42 specifically is used to adopt key and corresponding decipherment algorithm that described character string is decrypted, and obtains environmental data and text characteristic information.
Obtain environmental data expressly after the described character string deciphering, the environmental data that described text authentication module 43 can be used for specifically that deciphering is obtained sends the evidence of related data as transmit leg, avoid the denial of transmit leg, perhaps, if transmit leg has carried user name simultaneously when sending data, the user name that obtains after the user name that also can expressly carry by comparison and the deciphering then, if both unanimities, then checked result for the source effectively.
Perhaps, present embodiment can also comprise text eigenwert generation module 44, and described text eigenwert generation module 44 is used for adopting hashing algorithm to encode to the text that receives, and generates the text characteristic information; If it is identical with the text characteristic information that receives that described text authentication module 43 specifically is used for the text characteristic information of described generation, then checked result is that text is effective.
Present embodiment by with two-dimension code as digital signature, can realize than the more effective signature effect of character string, and can utilize existing two dimension code reading equipment, can simply and efficiently be applied in the occasion that can adopt two-dimension code.
Fig. 5 is the system architecture synoptic diagram of fifth embodiment of the invention, comprise the generation equipment 51 of digital signature and the Authentication devices 52 of digital signature, wherein, the generation equipment 51 of digital signature can be specifically as shown in Figure 3, and the Authentication devices 52 of digital signature can be specifically as shown in Figure 4.
Correspondingly, corresponding to this system, the method for execution as shown in Figure 6, Fig. 6 is the method flow synoptic diagram of sixth embodiment of the invention, comprising:
Step 61: the generation equipment of digital signature is encrypted text characteristic information and environmental data and/or is encoded, and generates character string;
Step 62: the generation equipment of digital signature adopts two-dimension code to encode to described character string, generates two-dimension code image;
Step 63: the generation equipment of digital signature as digital signature, sends described two-dimension code image with text to be sent;
Step 64: the Authentication devices of digital signature scans the two-dimension code image that receives and is reduced into character string;
Step 65: the Authentication devices of digital signature is decrypted described character string, obtains environmental data and text characteristic information;
Step 66: the Authentication devices of digital signature is checked the text that receives according to described text characteristic information.
The particular content of above steps can be referring to the various embodiments described above.
Present embodiment by with two-dimension code as digital signature, can realize than the more effective signature effect of character string, and can utilize existing two dimension code reading equipment, can simply and efficiently be applied in the occasion that can adopt two-dimension code.
Be understandable that the reference mutually of the correlated characteristic in said method and the equipment.In addition, " first " in the foregoing description, " second " etc. are to be used to distinguish each embodiment, and do not represent the quality of each embodiment.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of programmed instruction, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.