CN109800588A - Bar code dynamic encrypting method and device, bar code dynamic decryption method and device - Google Patents
Bar code dynamic encrypting method and device, bar code dynamic decryption method and device Download PDFInfo
- Publication number
- CN109800588A CN109800588A CN201910067682.0A CN201910067682A CN109800588A CN 109800588 A CN109800588 A CN 109800588A CN 201910067682 A CN201910067682 A CN 201910067682A CN 109800588 A CN109800588 A CN 109800588A
- Authority
- CN
- China
- Prior art keywords
- encryption
- decryption
- algorithm
- key
- bar code
- 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
Landscapes
- Storage Device Security (AREA)
Abstract
The invention relates to a kind of bar code dynamic encrypting method and devices, bar code dynamic decryption method and device.The encryption method includes: the digital information for obtaining and needing to encrypt;Key required for the encryption of encryption and decryption dictionary dynamic generation is obtained, and dynamic generation encryption needs Encryption Algorithm generator to be used;And the digital information is encrypted using the Encryption Algorithm generator, obtain the corresponding ciphertext of the digital information.Bar code dynamic encrypting method and device of the present invention, bar code dynamic decryption method and device are shared using centralization dedicated network or VPN by the way of enciphering and deciphering algorithm and key, the dynamic management for carrying out encrypting and decrypting mode, further enhances data transmission security, integrality and reliability.
Description
Technical field
The present invention relates to field of information security technology, more particularly to a kind of bar code dynamic encrypting method and device, bar code
Dynamic decryption method and device.
Background technique
With the fast development of national economy, automobile is increasingly becoming the necessity of people's life, and automobile industry rapidly develops,
As national economy mainstay.Data are shown, by the end of the year 2017, China's vehicle guaranteeding organic quantity is up to 3.10 hundred million, wherein vapour
2.17 hundred million, vehicle, vehicle driver is up to 3.85 hundred million people, wherein 3.42 hundred million people of motorist.In recent years, internet+, it is big
Under the background of data, automobile industry management the digitlization of links, networking and it is intelligent constantly promote, data safety at
For one of the vital task of auto industry internet security guarantee.
By taking handling vehicle is paid taxes and is registered as an example, automobile production is offline and through after the assay was approved, and Che Qixu is to supervisor
Department transmits vehicle data, and allots motor vehicle product certificate, vehicle production cettificate of conformity, environmental protection with paper such as vehicle inventory books
Matter voucher (contains bar code information), and wherein motor vehicle product certificate bar code information is encryption information, need to be carried out using specific software
Identification is read, we are inquired into also based on the data encryption and interactive mode of the quality certification.Authorities and administrative service division
Or other sides used in connection with complete electronic data interchange, user reads vehicle electric data by scanning voucher two-dimensional bar code,
Vehicle data legitimacy is verified, and handles relevant subsequent formality for car owner.Information encryption in data transmission is data peace
Full important guarantee.Currently with the development of information technology and progress, the risk that data ciphering method is cracked is sharply increased, and is
Further strengthen data transmission security, integrality and reliability.
Summary of the invention
The technical problem to be solved in the present invention is to provide a kind of bar code dynamic encrypting method and devices, bar code dynamic decryption side
Method and device carry out encrypting and decrypting mode in such a way that centralization dedicated network or VPN share enciphering and deciphering algorithm and key
Dynamic manages, to further enhance data transmission security, integrality and reliability.
In order to solve the above technical problems, the present invention provides a kind of bar code dynamic encrypting methods, which comprises obtain
The digital information for needing to encrypt;Key required for the encryption of encryption and decryption dictionary dynamic generation is obtained, and dynamic generation encryption needs
Encryption Algorithm generator to be used;And the digital information is encrypted using the Encryption Algorithm generator, it obtains
The corresponding ciphertext of the digital information.
As a kind of improvement of technical solution of the present invention, unique algorithm sequence is assigned to the encryption and decryption processes of algorithms of different
Row number simultaneously establishes corresponding relationship, forms the encryption and decryption dictionary, and the encryption and decryption dictionary includes encryption and decryption rule, and described plus solution
Close dictionary by dedicated network shared, the non-network mode of offline copies, called using common three kinds of modes of server.
As a kind of improvement of technical solution of the present invention, dynamic generation encryption need Encryption Algorithm generator to be used it
Afterwards, the digital information is encrypted using the Encryption Algorithm generator, obtain the corresponding ciphertext of the digital information it
Before, further includes: Hash operation is carried out to the digital information, to obtain informative abstract;And believe using described in the key pair
Breath abstract is encrypted, and to obtain digital signature, and the digital signature is attached in the digital information.
As a kind of improvement of technical solution of the present invention, after obtaining the digital information for needing to encrypt, encrypted obtaining
Before key required for the encryption of dictionary creation, further includes: judge the type of Encryption Algorithm, wherein the Encryption Algorithm
Type includes: symmetric encipherment algorithm and rivest, shamir, adelman;If the type of the Encryption Algorithm is rivest, shamir, adelman,
Key required for the encryption of encryption and decryption dictionary creation is obtained, and generate encryption to need Encryption Algorithm generator to be used, comprising:
The private key and public key of encryption and decryption dictionary creation are obtained, and encryption is generated according to the type of rivest, shamir, adelman and public key and needs to make
Encryption Algorithm generator;If the type of the Encryption Algorithm is symmetric encipherment algorithm, encryption and decryption dictionary creation is obtained
Required key is encrypted, and generate encryption to need Encryption Algorithm generator to be used, comprising: obtain encryption and decryption dictionary creation
Symmetric key, and Encryption Algorithm generator to be used is needed according to the type of symmetric encipherment algorithm and Symmetric key generation encryption;
If the type of the Encryption Algorithm is rivest, shamir, adelman, encrypted using informative abstract described in the key pair, with
Digital signature is obtained, and the digital signature is attached in the digital information, comprising: using the public key to the information
Abstract is encrypted, and to obtain digital signature, and the digital signature is attached in the digital information;If Encryption Algorithm
Type be symmetric encipherment algorithm, encrypted using informative abstract described in the key pair, to obtain digital signature, and by institute
It states digital signature to be attached in the digital information, comprising: encrypt the informative abstract using symmetric key, to obtain
Digital signature, and the digital signature is attached in the digital information.
In addition, the present invention also provides a kind of bar code dynamic decryption methods, which comprises obtain to be decrypted close
Text;Obtain the key that the decryption ciphertext of the encryption and decryption dictionary creation needs;Decryption is obtained according to the key to need to make
Decipherment algorithm generator, and the ciphertext is decrypted by the decipherment algorithm generator.
As a kind of improvement of technical solution of the present invention, unique algorithm sequence is assigned to the encryption and decryption processes of algorithms of different
Row number simultaneously establishes corresponding relationship, forms the encryption and decryption dictionary, and the encryption and decryption dictionary includes encryption and decryption rule, the encryption and decryption
Dictionary by dedicated network shared, the non-network mode of offline copies, called using common three kinds of modes of server.
As a kind of improvement of technical solution of the present invention, decipherment algorithm to be used is needed obtaining decryption according to the key
Generator, and after the ciphertext is decrypted by the decipherment algorithm generator, further includes: to the digital signature into
Row decryption, to obtain informative abstract;Hash operation is carried out to the digital information, to obtain reference information abstract;And by institute
It states informative abstract to be compared with reference information abstract, to judge whether the ciphertext is tampered.
The encryption dictionary is obtained after obtaining ciphertext to be decrypted as a kind of improvement of technical solution of the present invention
Before the key that the decryption ciphertext of generation needs, further includes: judge the type of decipherment algorithm, the decipherment algorithm includes:
Symmetrical decipherment algorithm and asymmetric decipherment algorithm;If the decipherment algorithm is asymmetric decipherment algorithm, the encrypted word is obtained
The key that the decryption ciphertext that allusion quotation generates needs, comprising: obtain what the decryption ciphertext that the encryption dictionary generates needed
Private key;If the decipherment algorithm is symmetrical decipherment algorithm, obtain what the decryption ciphertext that the encryption dictionary generates needed
Key, comprising: obtain the symmetric key that the decryption ciphertext that the encryption dictionary generates needs;If the decipherment algorithm is
Asymmetric decipherment algorithm, obtaining decryption according to the key needs decipherment algorithm generator to be used, and is calculated by the decryption
The ciphertext is decrypted in method generator, to obtain attached the digital information of digital signature, comprising: obtained according to the private key
It takes decryption to need decipherment algorithm generator to be used, and the ciphertext is decrypted by the decipherment algorithm generator, with
Obtain attached the digital information of digital signature;If the decipherment algorithm is symmetrical decipherment algorithm, obtained according to the key
Decryption needs decipherment algorithm generator to be used, and the ciphertext is decrypted by the decipherment algorithm generator, with
To the digital information that attached digital signature, comprising: obtaining decryption according to symmetric key needs decipherment algorithm generator to be used,
And the ciphertext is decrypted by the decipherment algorithm generator, to obtain attached the digital information of digital signature.
In addition, described device includes: one or more processing the present invention also provides a kind of bar code dynamic encrypting device
Device;Storage device, for storing one or more programs, when one or more of programs are by one or more of processors
It executes, so that one or more of processors realize bar code dynamic encrypting method as previously described.
In addition, described device includes: one or more processing the present invention also provides a kind of bar code dynamic decryption device
Device: storage device, for storing one or more programs, when one or more of programs are by one or more of processors
It executes, so that one or more of processors realize bar code dynamic decryption method as previously described.
By adopting such a design, the present invention has at least the following advantages:
In such a way that centralization dedicated network or VPN share enciphering and deciphering algorithm and key, encrypting and decrypting mode is carried out
Dynamic manages, to further enhance data transmission security, integrality and reliability.
Detailed description of the invention
The above is merely an overview of the technical solutions of the present invention, in order to better understand the technical means of the present invention, below
In conjunction with attached drawing, the present invention is described in further detail with specific embodiment.
Fig. 1 is the network structure for the network that the present invention shares encryption and decryption dictionary by dedicated network;
Fig. 2 is the flow chart of digital signature procedure of the present invention;
Fig. 3 is the flow chart of the dynamic encryption scheme the present invention is based on dedicated network;
Fig. 4 is the system construction drawing of the application system of the dynamic encryption scheme the present invention is based on dedicated network;
Fig. 5 is the structure chart that bar code dynamic encrypting device of the present invention and bar code dynamic decrypt device.
Specific embodiment
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings, it should be understood that preferred reality described herein
Apply example only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention.
Information encryption is to be carried out in transmission process and in memory bank using mathematics or physical means to electronic information
Protection, to prevent the technology of leakage.In information encryption key management be using most thorny issue when Encryption Algorithm, it
It is directed not only to how key value is securely distributed to all communication parties, further relates to the life cycle management of key, key is broken
Xie Shiying takes the problems such as what measure.According to convention current in the world, the whether identical mark of key received and dispatched according to both sides
Standard is divided into two major classes: one is symmetric encipherment algorithms to encrypt it is characterized in that destination and originator use identical key
Key and decruption key are identical or of equal value.There is DES (Data Encryption than more typical symmetric encipherment algorithm
Standard data encryption standards) algorithm and its deformation Triple DES (triple des), GDES (broad sense DES);Europe
IDEA;FEAL N, the RC5 etc. of Japan, wherein influencing maximum to be DES password.Symmetric encipherment algorithm advantage is that have very strong guarantor
Close intensity, and the inspection and attack of time are withstood, but its key must be transmitted by the approach of safety.Therefore, key pipe
Reason becomes the key factor of system safety.Another kind is public key encryption algorithm (being also rivest, shamir, adelman).It is characterized in that receiving
The key that letter side and originator use is different, and almost impossible from encryption key derivation decruption key.It is more famous
Public key algorithm RSA, knapsack cipher, McEliece password, Diffie-Hellman, Rabin, Ong Fiat Shamir,
Algorithm, elliptic curve, EIGamal algorithm of zero-knowledge proof etc..Most influential public key algorithm is RSA, it can be resisted
Up to the present known all cryptographic attacks.The advantages of public key cryptography is to be adapted to the open of network to require, and key
Problem of management is also relatively simple, especially can easily realize digital signature and verifying.But its algorithm is complicated, the rate of encryption data
It is lower.
In the two-dimensional bar code encryption technology that current each field uses, it is typically based on above-mentioned wherein a certain Encryption Algorithm and realizes
Encrypting and decrypting process.And one of the core of the encryption method high security designed herein, it is to establish to move under ad hoc network environment
State cryptographic system is included in multiple encryption algorithms in systems, the symmetric encipherment algorithms such as including DES, IDEA also may include
The rivest, shamir, adelmans such as RSA, ECC, Diffie-Hellman, ElGamal.Encryption and decryption processes of the system to algorithms of different
It assigns unique algorithm sequence number and establishes corresponding relationship, form encryption and decryption dictionary, originator information ciphering process is random by system
Call unique encryption algorithm to be encrypted, destination by dedicated network shared, the non-network mode of offline copies, using common
Three kinds of modes of server call encryption and decryption dictionary, to realize the encryption and decryption processes of dynamic password.Wherein by dedicated
The structure of network share encryption and decryption dictionary is as shown in Figure 1.
Encryption and decryption dictionary is the premise for realizing dynamic password management, it possesses all encryption server and decryption server
Information.If newly one encryption server of addition (or decryption server), it is necessary to update encryption and decryption dictionary.If abandoned
One encryption server (or decryption server), the server info that also update encryption and decryption dictionary, but abandon cannot delete,
This is for the compatible encryption data generated.
Meanwhile encryption and decryption dictionary must include encryption and decryption rule.Encryption server can require encryption and decryption dictionary creation one
There are the public key for encrypting required key and encryption server in new scrambled record, record the inside.Decryption server can inquire plus solution
Close dictionary obtains the public key of key and encryption server required for decrypting.
While establishing dynamic ciphering system to significant data progress security fence scheme, to further increase data
Security performance uses the digital signature technology of the unilateral authentication based on rivest, shamir, adelman in this paper dynamic encryption scheme,
For verifying whether the message information sent between originator and destination is tampered.
Digital signature technology is the private key encryption by summary info with sender, sends recipient to together with original text.It connects
Receipts person only uses the public key of sender that could decrypt encrypted summary info, is then generated with HASH function to the original text received
One summary info is compared with the summary info of decryption.If identical, illustrate that the information received is completely, to be transmitted across
It is not modified in journey, otherwise illustrates that information is modified, therefore digital signature is able to verify that the integrality of information.Digital signature
It is a process for encryption, digital signature authentication is a process for decryption.The process of digital signature is as shown in Figure 2:
The system process for using of dynamic encryption scheme based on dedicated network is as shown in Figure 3:
When communicating between relevant industrial department and other users, data information ciphering process is as follows:
Crypto engine (decryption engine) possesses oneself private key and public key, while can access the public key of encryption and decryption dictionary, and
The encryption and decryption rule of encryption and decryption dictionary.
Crypto engine (decryption engine) possesses multiple Encryption Algorithm generators (decipherment algorithm generator).
Encryption and decryption carries out according to the following steps:
01. crypto engine obtains the digital information to be encrypted (plaintext).
02. crypto engine accesses encryption and decryption dictionary, determines which kind of cipher mode used, if it is determined that uses asymmetric encryption
Mode.Step 03 is then jumped to, step 12 is otherwise jumped to.
The public key (PK) and private key (SK) that 03. this encryption and decryption of encryption and decryption dictionary creation needs, crypto engine is according to encryption
The type and PK of algorithm generate the Encryption Algorithm generator of encryption.
04. crypto engine carries out Hash operation to digital information, obtains an informative abstract.
05. crypto engine encrypts informative abstract to obtain the digital signature of crypto engine with the private key of oneself, and will
It is attached in digital information.
06. crypto engine encrypts digital information with Encryption Algorithm generator, obtains encrypted ciphertext.Ciphertext is attached
In addition this encryption and decryption rule numbers (meaning that encryption and decryption dictionary understands this number), is exactly final encryption data.
After 07. decryption engine obtains encryption data, encryption and decryption dictionary is accessed, according to encryption and decryption additional in encryption data
Rule numbers, which determine, uses which kind of manner of decryption (now determining that as asymmetric encryption and decryption mode), the SK of decryption, and encryption
Engine public key.
08. decryption engine generates the decipherment algorithm generator of decryption according to the type and SK of decipherment algorithm.And to close
Text decryption obtains in plain text.
The digital signature of crypto engine is decrypted in the public key of 09. decryption engine crypto engine, obtains informative abstract.
10. decryption engine carries out a Hash operation to obtained plaintext with identical hash algorithm again, one is obtained newly
Informative abstract.
11. obtained informative abstract and newly generated informative abstract are compared by decryption engine, if unanimously, illustrating to receive
To information be not modified.
12. the ciphering key K that this encryption and decryption of encryption and decryption dictionary creation needs, crypto engine according to the type of Encryption Algorithm and
CK generates the Encryption Algorithm generator of encryption.
13. crypto engine carries out Hash operation to digital information, an informative abstract is obtained.
14. crypto engine encrypts informative abstract to obtain the digital signature of crypto engine with the private key of oneself, and will
It is attached in digital information.
15. crypto engine encrypts digital information with Encryption Algorithm generator, encrypted ciphertext is obtained.Ciphertext is attached
In addition this encryption and decryption rule numbers (meaning that encryption and decryption dictionary understands this number), is exactly final encryption data.
16. after decryption engine obtains encryption data, encryption and decryption dictionary is accessed, according to encryption and decryption additional in encryption data
Rule numbers, which determine, uses which kind of manner of decryption (now determining that as symmetrical encryption and decryption mode), and the CK of decryption, and encryption are drawn
Hold up public key.
17. the decipherment algorithm generator that decryption engine generates decryption according to the type and CK of decipherment algorithm.And to close
Text decryption obtains in plain text.
18. the digital signature of crypto engine is decrypted in the public key of decryption engine crypto engine, informative abstract is obtained.
19. decryption engine carries out a Hash operation to obtained plaintext with identical hash algorithm again, one is obtained newly
Informative abstract.
20. obtained informative abstract and newly generated informative abstract are compared by decryption engine, if unanimously, illustrating to receive
To information be not modified.
21. the electronic information after data and data exchange after decryption carries out comparing according to rule, determined according to rule
Whether determine by using square system check.
Dynamic encryption scheme based on dedicated network is not limited only to automobile industry management application, is equally applicable to papery voucher
In there are data encryption bar code information, and in using link the two-dimensional bar code of encryption must be carried out veritifying and be compared with paper information
Scene.Basic application scenarios are as shown in figure 4, application process is as follows:
1. the upload that enterprise customer carries out data by allotting voucher computer.
2. encryption server chooses encryption method and the related required necessary factor according to rule from encryption dictionary, such as to
Amount, Key refer to.
3. the data of encryption are back to allocation computer in a manner of arranging.
4. allotting computer according to agreement printing relevant information to papery voucher.
5. comparing link veritifying, request is initiated to decryption server by terminal from user to management organization.
6. the data after decryption are sent to stipulated form using server, then are sent to application with stipulated form
Client is presented to terminal clerical worker and consumer or uses user.
The dynamic encryption scheme established herein based on dedicated network, is different from various distributed systems currently popular and gone
Centralization thinking.For data application feature and security level required in trade management, it is necessary to be formed by force by dedicated network
Big central node, because the core of whole system is in control, system is substantially closed, and external interface access is not
To internal data, it also can't see internal structure, confidentiality greatly improved with this.Due to extremely having to the interface of external world's exposure
Limit, the external world is difficult inside invasive system, even if there is data to be cracked, influences also very limited.Meanwhile this implementation has
The advantages that scalability is strong, easily adjusts, and can be compatible with old data.
In addition, all using digital signature to symmetric encipherment algorithm or rivest, shamir, adelman in scheme, it is ensured that data letter
The integrality of transmission is ceased, the authentication to data information sender is realized, guarantees the non repudiation of data information, facilitate
Relevant industrial department and side used in connection with carry out supervision work.
Encryption server it is general only one, there are two types of encryption and decryption dictionary is general: one is for encrypting and decrypting data
Encryption and decryption dictionary, one is the encryption and decryption dictionaries of managing encrypted decryption server, wherein the encryption and decryption of management encryption and decryption server
Dictionary is necessarily asymmetric encryption mode, and the encryption and decryption dictionary for encrypting and decrypting data can be symmetrically or non-symmetrically to encrypt;
But for verify data, data are readable so two kinds of cipher modes are necessarily all reversible encryption;Encryption server generally there are
The private key of encryption and decryption dictionary for encryption and decryption data, public key are mounted on decryption server.Once switching encryption server, need
Again the public key of new encryption and decryption dictionary is provided, and stops original private key encryption of encryption and decryption dictionary, retains exposition server
The decryption function of encryption and decryption dictionary.
Fig. 5 is the structure chart of bar code dynamic encrypting device of the present invention.Referring to Fig. 5, bar code dynamic encrypting device includes: center
Processing unit (CPU) 501 can be loaded according to the program being stored in read-only memory (ROM) or from storage section 508
Various movements appropriate and processing are executed to the program in random access storage device (RAM) 503.In RAM 503, also store
There are various programs and data needed for system operatio.CPU 501, ROM 502 and RAM 503 are connected with each other by bus 504.
Input/output (I/O) interface 505 is also connected to bus 504.
I/O interface 505 is connected to lower component: the importation 506 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 507 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 508 including hard disk etc.;
And the communications portion 509 of the network interface card including LAN card, modem etc..Communications portion 509 via such as because
The network of spy's net executes communication process.Driver 510 is also connected to I/O interface 505 as needed.Detachable media 511, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 510, in order to read from thereon
Computer program be mounted into storage section 508 as needed.
Particularly, according to embodiments of the present invention, it is soft to may be implemented as computer for the process above with reference to flow chart description
Part program.For example, the embodiment of the present invention includes a kind of computer program product comprising carrying is on a computer-readable medium
Computer program, which includes the program code for method shown in execution flow chart.In such implementation
In example, which can be downloaded and installed from network by communications portion 509, and/or from detachable media 511
It is mounted.The computer program by central processing unit (CPU) 501 execute when, execute limited in method of the invention it is upper
State function.It should be noted that computer-readable medium of the invention can be computer-readable signal media or computer
Readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but it is unlimited
In system, device or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.It calculates
The more specific example of machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, portable of one or more conducting wires
Formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory
(EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or
The above-mentioned any appropriate combination of person.In the present invention, computer readable storage medium can be it is any include or storage program
Tangible medium, which can be commanded execution system, device or device use or be used in combination.And in the present invention
In, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, wherein
It carries and calculates readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetism
Signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable storage
Any computer-readable medium other than medium, the computer-readable medium can send, propagate or transmit for by instructing
Execution system, device or device use or program in connection.The program generation for including on computer-readable medium
Code can use any appropriate medium transmission, including but not limited to: wirelessly, electric wire, optical cable, RF etc. or above-mentioned any
Suitable combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, the box of two a sequence of expressions is actually
Execution that can be substantially parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse
Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and/or flow chart can be with holding
The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present invention can be realized by way of software, can also be by hard
The mode of part is realized.
It should be noted that the bar code dynamic decryption device provided in the embodiment of the present invention also can have Fig. 5 such as and show
Structure.Wherein the function of various components and effect are similar with the bar code dynamic encrypting device being given above, herein no longer
It repeats.
The above described is only a preferred embodiment of the present invention, be not intended to limit the present invention in any form, this
Field technical staff makes a little simple modification, equivalent variations or modification using the technology contents of the disclosure above, all falls within this hair
In bright protection scope.
Claims (10)
1. a kind of bar code dynamic encrypting method characterized by comprising
Obtain the digital information for needing to encrypt;
Key required for the encryption of encryption and decryption dictionary dynamic generation is obtained, and dynamic generation encryption needs Encryption Algorithm to be used
Generator;And
The digital information is encrypted using the Encryption Algorithm generator, obtains the corresponding ciphertext of the digital information.
2. bar code dynamic encrypting method according to claim 1, which is characterized in that encryption to algorithms of different and decrypted
Journey assigns unique algorithm sequence number and establishes corresponding relationship, forms the encryption and decryption dictionary, and the encryption and decryption dictionary includes plus solves
Close rule, and the encryption and decryption dictionary is shared by dedicated network, the non-network mode of offline copies, uses common server
Three kinds of modes are called.
3. bar code dynamic encrypting method according to claim 1, which is characterized in that needed in dynamic generation encryption to be used
After Encryption Algorithm generator, the digital information is encrypted using the Encryption Algorithm generator, obtains the number
Before the corresponding ciphertext of information, further includes:
Hash operation is carried out to the digital information, to obtain informative abstract;And
It is encrypted using informative abstract described in the key pair, to obtain digital signature, and the digital signature is attached to
In the digital information.
4. bar code dynamic encrypting method according to claim 1, which is characterized in that obtaining the digital information for needing to encrypt
Later, before obtaining key required for the encryption that encryption dictionary generates, further includes:
Judge the type of Encryption Algorithm, wherein the type of the Encryption Algorithm includes: that symmetric encipherment algorithm and asymmetric encryption are calculated
Method;
If the type of the Encryption Algorithm is rivest, shamir, adelman, obtain close required for the encryption of encryption and decryption dictionary creation
Key, and generate encryption need Encryption Algorithm generator to be used, comprising:
The private key and public key of encryption and decryption dictionary creation are obtained, and encryption need are generated according to the type of rivest, shamir, adelman and public key
Encryption Algorithm generator to be used;
If the type of the Encryption Algorithm is symmetric encipherment algorithm, obtain close required for the encryption of encryption and decryption dictionary creation
Key, and generate encryption need Encryption Algorithm generator to be used, comprising:
The symmetric key of encryption and decryption dictionary creation is obtained, and need are encrypted according to the type of symmetric encipherment algorithm and Symmetric key generation
Encryption Algorithm generator to be used;
If the type of the Encryption Algorithm is rivest, shamir, adelman, added using informative abstract described in the key pair
It is close, to obtain digital signature, and the digital signature is attached in the digital information, comprising:
The informative abstract is encrypted using the public key, to obtain digital signature, and the digital signature is attached to
In the digital information;
If the type of Encryption Algorithm is symmetric encipherment algorithm, encrypted using informative abstract described in the key pair, with
It is attached in the digital information to digital signature, and by the digital signature, comprising:
The informative abstract is encrypted using symmetric key, to obtain digital signature, and the digital signature is attached to
In the digital information.
5. a kind of bar code dynamic decryption method characterized by comprising
Obtain ciphertext to be decrypted;
Obtain the key that the decryption ciphertext of the encryption and decryption dictionary creation needs;
Obtaining decryption according to the key needs decipherment algorithm generator to be used, and by the decipherment algorithm generator to institute
Ciphertext is stated to be decrypted.
6. bar code dynamic decryption method according to claim 5, which is characterized in that encryption to algorithms of different and decrypted
Journey assigns unique algorithm sequence number and establishes corresponding relationship, forms the encryption and decryption dictionary, and the encryption and decryption dictionary includes plus solves
Close rule, the encryption and decryption dictionary are shared by dedicated network, the non-network mode of offline copies, use common server three
Kind mode is called.
7. bar code dynamic decryption method according to claim 5, which is characterized in that obtaining decryption need according to the key
Decipherment algorithm generator to be used, and after the ciphertext is decrypted by the decipherment algorithm generator, further includes:
The digital signature is decrypted, to obtain informative abstract;
Hash operation is carried out to the digital information, to obtain reference information abstract;And
The informative abstract and reference information abstract are compared, to judge whether the ciphertext is tampered.
8. bar code dynamic decryption method according to claim 5, which is characterized in that after obtaining ciphertext to be decrypted,
Before the key for obtaining the decryption ciphertext needs that the encryption dictionary generates, further includes:
Judge the type of decipherment algorithm, the decipherment algorithm includes: symmetrical decipherment algorithm and asymmetric decipherment algorithm;
If the decipherment algorithm is asymmetric decipherment algorithm, obtain what the decryption ciphertext that the encryption dictionary generates needed
Key, comprising:
Obtain the private key that the decryption ciphertext that the encryption dictionary generates needs;
If the decipherment algorithm is symmetrical decipherment algorithm, the close of the decryption ciphertext needs that the encryption dictionary generates is obtained
Key, comprising:
Obtain the symmetric key that the decryption ciphertext that the encryption dictionary generates needs;
If the decipherment algorithm is asymmetric decipherment algorithm, obtaining decryption according to the key needs decipherment algorithm to be used raw
It grows up to be a useful person, and the ciphertext is decrypted by the decipherment algorithm generator, to obtain attached the number letter of digital signature
Breath, comprising:
Obtaining decryption according to the private key needs decipherment algorithm generator to be used, and by the decipherment algorithm generator to institute
It states ciphertext to be decrypted, to obtain attached the digital information of digital signature;
If the decipherment algorithm is symmetrical decipherment algorithm, obtaining decryption according to the key needs decipherment algorithm to be used to generate
Device, and the ciphertext is decrypted by the decipherment algorithm generator, to obtain attached the digital information of digital signature,
Include:
Obtaining decryption according to symmetric key needs decipherment algorithm generator to be used, and by the decipherment algorithm generator to institute
It states ciphertext to be decrypted, to obtain attached the digital information of digital signature.
9. a kind of bar code dynamic encrypting device characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
Existing bar code dynamic encrypting method according to any one of claims 1 to 4.
10. a kind of bar code dynamic decryption device characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
The now bar code dynamic decryption method according to claim 5 to 8 any one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910067682.0A CN109800588B (en) | 2019-01-24 | 2019-01-24 | Dynamic bar code encryption method and device and dynamic bar code decryption method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910067682.0A CN109800588B (en) | 2019-01-24 | 2019-01-24 | Dynamic bar code encryption method and device and dynamic bar code decryption method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109800588A true CN109800588A (en) | 2019-05-24 |
CN109800588B CN109800588B (en) | 2021-07-16 |
Family
ID=66560280
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910067682.0A Active CN109800588B (en) | 2019-01-24 | 2019-01-24 | Dynamic bar code encryption method and device and dynamic bar code decryption method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109800588B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110176986A (en) * | 2019-05-30 | 2019-08-27 | 杭州奇治信息技术股份有限公司 | A kind of data ciphering method of multi-enciphering, device and mobile terminal |
CN110740128A (en) * | 2019-09-27 | 2020-01-31 | 武汉虹识技术有限公司 | off-line data encryption method and device |
CN112769764A (en) * | 2020-12-23 | 2021-05-07 | 南方电网电力科技股份有限公司 | Metering data transmission key storage method of instrument and transmission method and device thereof |
CN113221134A (en) * | 2021-04-09 | 2021-08-06 | 北京复兴华创技术有限公司 | Offline security data exchange method and device |
CN115277267A (en) * | 2022-09-30 | 2022-11-01 | 北京道达天际科技股份有限公司 | Document security encryption and decryption method |
CN115550006A (en) * | 2022-09-20 | 2022-12-30 | 同济大学 | Cloud control platform self-adaptive security protection method based on cloud control platform trust authority confirmation |
CN117614607A (en) * | 2024-01-18 | 2024-02-27 | 深圳市海域达赫科技有限公司 | Information security transmission system and method based on block chain |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103036853A (en) * | 2011-09-30 | 2013-04-10 | 中国移动通信集团公司 | Business data transmission method and device and business processing method and device |
CN105447407A (en) * | 2015-11-11 | 2016-03-30 | 中国建设银行股份有限公司 | Off-line data encryption method and decryption method and corresponding apparatus and system |
CN105554031A (en) * | 2016-01-29 | 2016-05-04 | 宇龙计算机通信科技(深圳)有限公司 | Encryption method, encryption apparatus, decryption method, decryption apparatus and terminal |
CN105760765A (en) * | 2016-02-04 | 2016-07-13 | 北京致远协创软件有限公司 | Data encrypting method and device and data decrypting method and device |
CN106850220A (en) * | 2017-02-22 | 2017-06-13 | 腾讯科技(深圳)有限公司 | Data ciphering method, data decryption method and device |
CN107104969A (en) * | 2017-04-27 | 2017-08-29 | 山西大学 | The method that the individual privacy information in express delivery is protected with dynamic encryption mechanism |
US20180359228A1 (en) * | 2017-06-12 | 2018-12-13 | Daniel Maurice Lerner | Devices that Utilize Random Tokens Which Direct Dynamic Random Access |
-
2019
- 2019-01-24 CN CN201910067682.0A patent/CN109800588B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103036853A (en) * | 2011-09-30 | 2013-04-10 | 中国移动通信集团公司 | Business data transmission method and device and business processing method and device |
CN105447407A (en) * | 2015-11-11 | 2016-03-30 | 中国建设银行股份有限公司 | Off-line data encryption method and decryption method and corresponding apparatus and system |
CN105554031A (en) * | 2016-01-29 | 2016-05-04 | 宇龙计算机通信科技(深圳)有限公司 | Encryption method, encryption apparatus, decryption method, decryption apparatus and terminal |
CN105760765A (en) * | 2016-02-04 | 2016-07-13 | 北京致远协创软件有限公司 | Data encrypting method and device and data decrypting method and device |
CN106850220A (en) * | 2017-02-22 | 2017-06-13 | 腾讯科技(深圳)有限公司 | Data ciphering method, data decryption method and device |
CN107104969A (en) * | 2017-04-27 | 2017-08-29 | 山西大学 | The method that the individual privacy information in express delivery is protected with dynamic encryption mechanism |
US20180359228A1 (en) * | 2017-06-12 | 2018-12-13 | Daniel Maurice Lerner | Devices that Utilize Random Tokens Which Direct Dynamic Random Access |
Non-Patent Citations (2)
Title |
---|
LEI ZHANG等: "《Round-Efficient and Sender-Unrestricted Dynamic Group Key Agreement Protocol for Secure Group Communications》", 《IEEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY》 * |
吴玥等: "《基于动态密钥分发机制的xml电子病历共享方案研究与设计》", 《中国数字医学》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110176986A (en) * | 2019-05-30 | 2019-08-27 | 杭州奇治信息技术股份有限公司 | A kind of data ciphering method of multi-enciphering, device and mobile terminal |
CN110740128A (en) * | 2019-09-27 | 2020-01-31 | 武汉虹识技术有限公司 | off-line data encryption method and device |
CN110740128B (en) * | 2019-09-27 | 2022-08-23 | 武汉虹识技术有限公司 | Offline data encryption method and device |
CN112769764A (en) * | 2020-12-23 | 2021-05-07 | 南方电网电力科技股份有限公司 | Metering data transmission key storage method of instrument and transmission method and device thereof |
CN113221134A (en) * | 2021-04-09 | 2021-08-06 | 北京复兴华创技术有限公司 | Offline security data exchange method and device |
CN113221134B (en) * | 2021-04-09 | 2024-03-22 | 北京复兴华创技术有限公司 | Offline secure data exchange method and device |
CN115550006A (en) * | 2022-09-20 | 2022-12-30 | 同济大学 | Cloud control platform self-adaptive security protection method based on cloud control platform trust authority confirmation |
CN115550006B (en) * | 2022-09-20 | 2024-02-09 | 同济大学 | Cloud control platform self-adaptive safety protection method based on trust confirmation of cloud control platform |
CN115277267A (en) * | 2022-09-30 | 2022-11-01 | 北京道达天际科技股份有限公司 | Document security encryption and decryption method |
CN115277267B (en) * | 2022-09-30 | 2022-12-02 | 北京道达天际科技股份有限公司 | Document security encryption and decryption method |
CN117614607A (en) * | 2024-01-18 | 2024-02-27 | 深圳市海域达赫科技有限公司 | Information security transmission system and method based on block chain |
CN117614607B (en) * | 2024-01-18 | 2024-04-12 | 深圳市海域达赫科技有限公司 | Information security transmission system and method based on block chain |
Also Published As
Publication number | Publication date |
---|---|
CN109800588B (en) | 2021-07-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106961336B (en) | A kind of key components trustship method and system based on SM2 algorithm | |
CN109800588A (en) | Bar code dynamic encrypting method and device, bar code dynamic decryption method and device | |
Barker | Guideline for using cryptographic standards in the federal government: Cryptographic mechanisms | |
CN108566381A (en) | A kind of security upgrading method, device, server, equipment and medium | |
CN106161402B (en) | Encryption equipment key injected system, method and device based on cloud environment | |
CN105007279B (en) | Authentication method and Verification System | |
CN101640590B (en) | Method for obtaining a secret key for identifying cryptographic algorithm and cryptographic center thereof | |
CN108377189A (en) | User's communication encrypting method, device, terminal device and storage medium on block chain | |
CN104935553B (en) | Unified identity authentication platform and authentication method | |
CN107172056A (en) | A kind of channel safety determines method, device, system, client and server | |
CN112400299B (en) | Data interaction method and related equipment | |
CN109257347A (en) | Communication means and relevant apparatus, storage medium suitable for data interaction between bank | |
CN104424446A (en) | Safety verification and transmission method and system | |
US11632246B2 (en) | Hybrid key derivation to secure data | |
CN109005184A (en) | File encrypting method and device, storage medium, terminal | |
CN110390212A (en) | Based on the supply of material monitoring method of block chain, node apparatus | |
CN112532656A (en) | Block chain-based data encryption and decryption method and device and related equipment | |
CN109547413A (en) | The access control method of convertible data cloud storage with data source authentication | |
CN114301677A (en) | Key negotiation method, device, electronic equipment and storage medium | |
CN109040111A (en) | Data ciphering method, device, computer equipment and storage medium | |
CN106656463A (en) | Fixed-secret-key symmetric white box password encryption method, device and equipment | |
CN112861156B (en) | Secure communication method and device for display data, electronic equipment and storage medium | |
CN109492359A (en) | A kind of secure network middleware and its implementation and device for authentication | |
KR101929355B1 (en) | Encryption and decryption system using unique serial number and symmetric cryptography | |
CN109617916A (en) | Code key processing method and instant communicating system |
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 |