CN107196973A - A kind of data encryption, decryption method and device - Google Patents

A kind of data encryption, decryption method and device Download PDF

Info

Publication number
CN107196973A
CN107196973A CN201710613718.1A CN201710613718A CN107196973A CN 107196973 A CN107196973 A CN 107196973A CN 201710613718 A CN201710613718 A CN 201710613718A CN 107196973 A CN107196973 A CN 107196973A
Authority
CN
China
Prior art keywords
binary
data
ciphertext
coded
binary coding
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
Application number
CN201710613718.1A
Other languages
Chinese (zh)
Other versions
CN107196973B (en
Inventor
刘晓润
杨聪
许信雄
封磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Hongqin Communication Technology Co Ltd
Original Assignee
Guangdong Hongqin Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Hongqin Communication Technology Co Ltd filed Critical Guangdong Hongqin Communication Technology Co Ltd
Priority to CN201710613718.1A priority Critical patent/CN107196973B/en
Publication of CN107196973A publication Critical patent/CN107196973A/en
Application granted granted Critical
Publication of CN107196973B publication Critical patent/CN107196973B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0478Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload applying multiple layers of encryption, e.g. nested tunnels or encrypting the content with a first key and then with at least a second key

Abstract

The invention discloses a kind of data ciphering method and device, the data ciphering method includes:Initial data is obtained, the initial data is encrypted, encryption data is generated;Decryption program is obtained, the decryption program is converted into binary coding, the binary-coded relevant information is calculated;The binary-coded relevant information and the binary coding are spliced in the encryption data according to default form, ciphertext is obtained.By the way that binary coding is added in encryption data, even if hacker attacks has obtained encryption data and do not had any on the binary-coded solution confidential information, real initial data can not be also cracked out, and then protect the purpose of Information Security.Meanwhile, present invention also offers data decryption method and device.

Description

A kind of data encryption, decryption method and device
Technical field
It is more particularly to a kind of to be based on binary-coded data encryption, decryption side the present invention relates to encryption technology field Method and device.
Background technology
At present, file in network transmission process in order to ensure its security, it will usually be encrypted for file, such as, Character using agreement or the data with biological information are used as password such as fingerprint.But, these data messages Can only exist with fixed data, the data that its data is exactly the total data of information or simply common encryption is crossed, except peace It is region-wide to prevent outside extraneous access, without more preferable way to manage.
With the rapid development of Internet, the activity of computer hacker is becoming increasingly rampant, hacking technique is also increasingly updating, so Traditional encryption technology has been unable to the invasion of resistance hacker, it is impossible to ensure the security of data.
The content of the invention
Above mentioned problem is directed to, the present invention provides a kind of data encryption, decryption method and device, and realizing prevents hacker couple Data are cracked, and then protect the purpose of Information Security.
To achieve these goals, there is provided a kind of data ciphering method, this method bag according to the first aspect of the invention Include:
Initial data is obtained, the initial data is encrypted, generation encryption data and key;
Decryption program corresponding with the key is obtained, the decryption program is converted into binary coding, calculates described Binary-coded relevant information, wherein, the binary-coded relevant information includes binary coding length, identification characteristics Code and binary-coded offset;
The binary-coded relevant information and the binary coding are spliced to described add according to default form In ciphertext data, ciphertext is obtained.
It is preferred that, initial data is encrypted the acquisition initial data, generates encryption data, including:
Obtain initial data;
The initial data is encrypted using the first encipheror, the first encryption data is obtained;
First encryption data is encrypted using the second encipheror, encryption data is generated, wherein, described second Encipheror is the default encipheror stored.
It is preferred that, it is described to spell the binary-coded relevant information and the binary coding according to default form It is connected in the encryption data, obtains ciphertext, including:
By identification characteristics code, the binary coding length, the binary-coded offset, the binary system Coding and the key are sequentially connected, and obtain the first Data-Link;
According to the binary-coded offset, the binary-coded insertion position is determined;
According to the insertion position, the binary coding is inserted into the encryption data, the second Data-Link is obtained;
Splice second Data-Link after first Data-Link, obtain ciphertext.
According to the second aspect of the invention there is provided a kind of data decryption method, this method includes:
Ciphertext is obtained, wherein, the ciphertext includes identification characteristics code, binary-coded relevant information, binary coding And encryption data, the binary-coded relevant information comprising binary coding length, identification characteristics code and binary coding Offset;
Analysis is read out to the ciphertext, judges that whether including for the ciphertext is default according to identification characteristics code Binary coding, if it is, obtaining the binary system according to the binary coding length and binary-coded offset Coding;
The binary coding is converted into decryption program;
The ciphertext is decrypted by the decryption program, initial data is obtained.
It is preferred that, it is described that analysis is read out to the ciphertext, be according to what identification characteristics code judged the ciphertext It is no to include default binary coding, if it is, being obtained according to the binary coding length and binary-coded offset The binary coding is taken, including:
Analysis is read out to the ciphertext, judges that whether including for the ciphertext is default according to identification characteristics code Binary coding, if it is, determining the binary coding in encryption data according to the binary-coded offset Insertion position;
The binary coding is determined according to the binary-coded length, and in the binary coding in encryption number The binary coding is extracted at insertion position in.
It is preferred that, it is described that the ciphertext is decrypted by the decryption program, initial data is obtained, including:
The ciphertext is decrypted using the decryption program, first ciphertext data is obtained, wherein, the decryption Program is decryption program corresponding with default encipheror;
First ciphertext data is decrypted using decipherment algorithm, the initial data is obtained.
According to the third aspect of the invention we there is provided a kind of data encryption device, the device includes:
First encrypting module, for obtaining initial data, the initial data is encrypted, and generates encryption data and close Key;
Modular converter, for obtaining decryption program corresponding with the key, binary system is converted into by the decryption program Coding, calculates the binary-coded relevant information, wherein, the binary-coded relevant information includes binary coding Length, identification characteristics code and binary-coded offset;
Second encrypting module, for by the binary-coded relevant information and the binary coding according to default Form is spliced in the encryption data, obtains ciphertext..
It is preferred that, first encrypting module includes:
Acquiring unit, for obtaining initial data;
First ciphering unit, for the initial data to be encrypted using the first encipheror, is obtained first and encrypted Data;
Second ciphering unit, for first encryption data to be encrypted using the second encipheror, generation encryption Data, wherein, second encipheror is the default encipheror stored.
It is preferred that, second encrypting module includes:
Connection unit, for by identification characteristics code, the binary coding length, the binary-coded skew Amount, the binary coding and the key are sequentially connected, and obtain the first Data-Link;
Determining unit, for according to the binary-coded offset, determining the binary-coded insertion position;
Unit is inserted, for according to the insertion position, the binary coding being inserted into the encryption data, obtained To the second Data-Link;
Ciphertext acquiring unit, for splicing second Data-Link after first Data-Link, obtains ciphertext.
According to the fourth aspect of the invention there is provided a kind of data decryption apparatus, the device includes:
Acquisition module, for obtaining ciphertext, wherein, the ciphertext includes identification characteristics code, binary-coded related letter Breath, binary coding and encryption data, the binary-coded relevant information include binary coding length, identification characteristics code With binary-coded offset;
Analysis module, for being read out analysis to the ciphertext, the ciphertext is judged according to identification characteristics code Whether default binary coding is included, if it is, according to the binary coding length and binary-coded offset Obtain the binary coding;
Modular converter, for the binary coding to be converted into decryption program;
Deciphering module, for the ciphertext to be decrypted by the decryption program, obtains initial data.
It is preferred that, the analysis module includes:
Analytic unit, for being read out analysis to the ciphertext, the ciphertext is judged according to identification characteristics code Whether default binary coding is included, if it is, determining the binary coding according to the binary-coded offset Insertion position in encryption data;
Extraction unit, for determining the binary coding according to the binary-coded length, and enters described two System coding extracts the binary coding at the insertion position in encryption data.
It is preferred that, the deciphering module includes:
First decryption unit, for the ciphertext to be decrypted using the decryption program, obtains first decryption Data, wherein, the decryption program is decryption program corresponding with default encipheror;
Second decryption unit, for first ciphertext data to be decrypted using decipherment algorithm, is obtained described original Data.
Compared to prior art, data ciphering method of the invention is first carried out to initial data by common encryption method Encryption, generates encryption data;Then by the corresponding decryption program of common encryption method of use, binary coding is converted to, The binary coding is added in the encryption data, ciphertext is obtained.By the way that binary coding is added in encryption data, even if Hacker attacks, which has obtained encryption data, does not have any on the binary-coded solution confidential information, can not crack out real original yet Beginning data, and in data decrypting process, by carrying out decoded back data to the binary coding, protect the peace of data Quan Xing, finally realizing prevents hacker from being cracked to data, and then protects the purpose of Information Security.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is a kind of schematic flow sheet for data ciphering method that the embodiment of the present invention one is provided;
Fig. 2 is a kind of schematic flow sheet for data decryption method that the embodiment of the present invention two is provided;
Fig. 3 is a kind of structural representation for data encryption device that the embodiment of the present invention three is provided;
Fig. 4 is a kind of structural representation for data decryption apparatus that the embodiment of the present invention four is provided.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
Term " first " and " second " in description and claims of this specification and above-mentioned accompanying drawing etc. are to be used for area Not different objects, rather than for describing specific order.In addition term " comprising " and " having " and their any deformations, It is intended to cover non-exclusive include.For example contain the process of series of steps or unit, method, system, product or set It is standby not to be set in the step of having listed or unit, but the step of may include not list or unit.
Embodiment one
Referring to the schematic flow sheet that Fig. 1 is a kind of data ciphering method that the embodiment of the present invention one is provided, this method includes Following steps:
S11, acquisition initial data, the initial data are encrypted, generation encryption data and key;
Specifically, described initial data can include any data type to be encrypted, such as finger print data type or The data messages such as person's alternative document.
Meanwhile, can be with initialization section memory headroom when obtaining initial data, it is empty that the memory headroom includes two parts Between, a part is the memory space for storing encryption program, and the encipheror further stored can be multiple encryption journeys Sequence, another part is that stand-by space is not have any data in the space, is subsequently to store binary-coded relevant information to do Prepare, wherein, the binary-coded relevant information includes:It is identification characteristics code, binary coding length, binary-coded Offset, binary coding and decoding key.Can certainly Custom Encryption program deposit position, the present invention this is not limited System.
It will be further understood that the data being encrypted if desired are different kind of document or data lattice Formula, such as existing finger print data type has lteral data type again, so when memory headroom is initialized, can initialize The memory headroom of some, different according to data type carry out correspondence storage to different encipherors, reserve multiple treat With space for follow-up different binary-coded information.
The corresponding step S11 specifically includes following steps:
Obtain initial data;
The original data are encrypted using the first encipheror, the first encryption data is obtained;
First encryption data is encrypted using the second encipheror, encryption data is generated, wherein, described second Encipheror is the default encipheror stored.
It is understood that common encryption is first carried out to data using the first encipheror, the first encryption used herein Program is most common encryption method in the prior art;Then the second encipheror of default storage is called, due to initialization Memory space can be stored with multiple encipherors, so during initial data is encrypted, can be deposited with random call The data are encrypted an encipheror in storage space, generate random key according to the encipheror called, use The random key is encrypted again to the data after common encryption, and the random key is both encryption key, is also follow-up mistake Decruption key in journey, while corresponding decryption program can be generated according to encipheror.
S12, acquisition decryption program corresponding with the key, binary coding is converted into by the decryption program, is calculated The binary-coded relevant information, wherein, the binary-coded relevant information includes binary coding length, mark Condition code and binary-coded offset;
S13, the binary-coded relevant information and the binary coding according to default form be spliced to institute State in encryption data, obtain ciphertext.
Specifically, the step S13 is specifically included:
By identification characteristics code, the binary coding length, the binary-coded offset, the binary system Coding and the key are sequentially connected, and obtain the first Data-Link;
According to the binary-coded offset, the binary-coded insertion position is determined;
According to the insertion position, the binary coding is inserted into the encryption data, the second Data-Link is obtained;
Splice second Data-Link after first Data-Link, obtain ciphertext.
It is understood that according to identification characteristics code, the binary coding length, it is described it is binary-coded partially The order of shifting amount, the binary coding and decoding key is attached, and the packet after being connected is the first Data-Link, root According to the insertion position, the binary coding is inserted into the encryption data, the second Data-Link is obtained.
Specifically, when decryption program is assembled into the corresponding executable binary coded formats of SOC, two after conversion enter Coding processed is preferably controlled within 60 bytes, then calculates the binary coding length (1 byte), identification characteristics code (1 word Section), binary-coded offset (4 bytes), and by above- mentioned information according to identification characteristics code, the binary coding Length, the binary-coded offset, the binary coding and decode key order be attached, after being connected Packet, according to the binary-coded offset, determine the binary-coded insertion position of the encryption data;So Binary-coded offset obtains the insertion position afterwards, and the binary coding is inserted into the encryption data, obtained Data after to insertion;Splice the data after the insertion after packet after the connection, obtain binary coding encryption Data are ciphertext.
It is understood that the encryption data that i.e. common encryption method is obtained after encryption data is obtained, can also be inquired Whether user is encrypted again using binary coding mode, if it is performs step S13, will mark if otherwise corresponding The highest order for knowing condition code is set to encrypt again without using binary coding, after by the data output after common encryption.
By technical scheme disclosed in the embodiment of the present invention one, first initial data is added by common encryption method It is close, generate encryption data;Then by the corresponding decryption program of common encryption method of use, binary coding is converted to, in institute State and the binary coding is added in encryption data, obtain ciphertext.By the way that binary coding is added in encryption data, even if black Visitor's invasion, which has obtained encryption data, does not have any on the binary-coded solution confidential information, can not crack out really original yet Data, and in data decrypting process, by carrying out decoded back data to the binary coding, protect the safety of data Property, finally realizing prevents that hacker from cracking to data, and then protects the purpose of Information Security.
Embodiment two
Reference picture 2 is a kind of schematic flow sheet for data decryption method that the embodiment of the present invention two is provided, and this method includes:
S21, acquisition ciphertext, wherein, the ciphertext includes identification characteristics code, binary-coded relevant information, binary system Coding and encryption data, the binary-coded relevant information include binary coding length, identification characteristics code and binary system The offset of coding;
S22, analysis is read out to the ciphertext, according to identification characteristics code judge the ciphertext whether comprising in advance If binary coding, if it is, obtaining described two according to the binary coding length and binary-coded offset Scale coding;
Specifically, 6 bytes are defined as successively before ciphertext:Identification characteristics code (1 byte) to it is binary-coded related Information (5 bytes), binary-coded relevant information be followed successively by decoding program length (1 byte), it is binary-coded partially Shifting amount (4 bytes);After ciphertext is obtained, the identification characteristics code of the first character section of ciphertext is first read, judges to read identification Whether have using binary coding to read during condition code, preceding 6 bytes of ciphertext are if it is read, according to corresponding mark Condition code and binary-coded relevant information are analyzed;
Specifically, according to corresponding identification characteristics code binary coding length corresponding with binary coding, from offset The data that the byte offset specified starts to read binary-coded length are loaded into internal memory, read out decoding key.The step S22 specifically includes following steps:
Analysis is read out to the ciphertext, judges that whether including for the ciphertext is default according to identification characteristics code Binary coding, if it is, determining the binary coding in encryption data according to the binary-coded offset Insertion position;
The binary coding is determined according to the binary-coded length, and in the binary coding in encryption number The binary coding is extracted at insertion position in.
S23, the binary coding is converted into decryption program;
S24, by the decryption program to the ciphertext, obtain initial data.
The step S24 specifically includes:
The ciphertext is decrypted using the decryption program, first ciphertext data is obtained, wherein, the decryption Program is decryption program corresponding with default encipheror;
First ciphertext data is decrypted using decipherment algorithm, the initial data is obtained.
Technical scheme disclosed according to embodiments of the present invention two, obtains ciphertext;Analysis is read out to the ciphertext, is obtained Binary-coded relevant information, binary coding and encryption data;The encryption data is carried out by the decryption program Decryption, obtains initial data.In data decrypting process, by carrying out decoded back data, protection to the binary coding The securities of data.
Embodiment three
Corresponding with data ciphering method disclosed in the embodiment of the present invention one, embodiments of the invention three additionally provide one kind Data encryption device, referring to Fig. 3, the device includes:
First encrypting module 10, for obtaining initial data, the initial data is encrypted, generation encryption data and Key;
Modular converter 11, for obtaining decryption program corresponding with the key, is converted into two by the decryption program and enters System coding, calculates the binary-coded relevant information, wherein, the binary-coded relevant information is compiled comprising binary system Code length, identification characteristics code and binary-coded offset;
Second encrypting module 12, for by the binary-coded relevant information and the binary coding according to default Form be spliced in the encryption data, obtain ciphertext..
Accordingly, first encrypting module 10 includes:
Acquiring unit 101, for obtaining initial data;
First ciphering unit 102, for the initial data to be encrypted using the first encipheror, is obtained first and added Ciphertext data;
Second ciphering unit 103, for first encryption data to be encrypted using the second encipheror, generation adds Ciphertext data, wherein, second encipheror is the default encipheror stored.
Corresponding, second encrypting module 12 includes:
Connection unit 121, for by identification characteristics code, the binary coding length, described binary-coded Offset, the binary coding and the key are sequentially connected, and obtain the first Data-Link;
Determining unit 122, for according to the binary-coded offset, determining the binary-coded insertion position Put;
Unit 123 is inserted, for according to the insertion position, the binary coding to be inserted into the encryption data In, obtain the second Data-Link;
Ciphertext acquiring unit 124, for splicing second Data-Link after first Data-Link, obtains ciphertext.
In embodiments of the invention three, common encryption is carried out to initial data by the first encrypting module, obtained Encryption data and key;In modular converter, decryption program corresponding with the key is obtained, the decryption program is converted to Binary coding, calculates the binary-coded relevant information;Finally in the second encrypting module, by the binary coding Relevant information and the binary coding be spliced to according to default form in the encryption data, obtain ciphertext.By inciting somebody to action Binary coding is added in encryption data, even if hacker attacks has obtained encryption data and do not had any on the binary coding Solution confidential information, can not also crack out real initial data, finally realizing prevents hacker from being cracked to data, so protect The purpose of Information Security.
Example IV
Corresponding with a kind of data decryption method that the embodiment of the present invention two is provided, the embodiment of the present invention four additionally provides one Data decryption apparatus is planted, referring to Fig. 4, the device includes:
Acquisition module 20, for obtaining ciphertext, wherein, the ciphertext includes identification characteristics code, binary-coded correlation Information, binary coding and encryption data, the binary-coded relevant information include binary coding length, identification characteristics Code and binary-coded offset;
Analysis module 21, for being read out analysis to the ciphertext, the ciphertext is judged according to identification characteristics code Whether include default binary coding, if it is, according to the binary coding length and binary-coded skew Amount obtains the binary coding;
Modular converter 22, for the binary coding to be converted into decryption program;
Deciphering module 23, for the ciphertext to be decrypted by the decryption program, obtains initial data.
Specifically, the analysis module 21 includes:
Analytic unit 211, for being read out analysis to the ciphertext, the ciphertext is judged according to identification characteristics code Whether include default binary coding, if it is, determining that the binary system is compiled according to the binary-coded offset Insertion position of the code in encryption data;
Extraction unit 212, for determining the binary coding according to the binary-coded length, and described two Scale coding extracts the binary coding at the insertion position in encryption data.
Corresponding, the deciphering module 23 includes:
First decryption unit 231, for the ciphertext to be decrypted using the decryption program, obtains first solution Ciphertext data, wherein, the decryption program is decryption program corresponding with default encipheror;
Second decryption unit 232, for first ciphertext data to be decrypted using decipherment algorithm, obtains the original Beginning data.
Technical scheme disclosed according to embodiments of the present invention four, ciphertext has been obtained by acquisition module;In analysis module Analysis is read out to the ciphertext, whether judge the ciphertext is the data being encrypted by binary coding;If it is, Binary coding is then obtained, and the binary coding is converted into decryption program in modular converter;Finally by decryption mould Block obtains initial data.In data decrypting process, by carrying out decoded back data to the binary coding, number is protected According to security.
The embodiment of each in this specification is described by the way of progressive, and what each embodiment was stressed is and other Between the difference of embodiment, each embodiment identical similar portion mutually referring to.For device disclosed in embodiment For, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is said referring to method part It is bright.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention. A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The most wide scope caused.

Claims (12)

1. a kind of data ciphering method, it is characterised in that this method includes:
Initial data is obtained, the initial data is encrypted, generation encryption data and key;
Decryption program corresponding with the key is obtained, the decryption program is converted into binary coding, described two is calculated and enters Make coding relevant information, wherein, the binary-coded relevant information comprising binary coding length, identification characteristics code and Binary-coded offset;
The binary-coded relevant information and the binary coding are spliced to the encryption number according to default form In, ciphertext is obtained.
2. according to the method described in claim 1, it is characterised in that the acquisition initial data, initial data is encrypted, Encryption data is generated, including:
Obtain initial data;
The initial data is encrypted using the first encipheror, the first encryption data is obtained;
First encryption data is encrypted using the second encipheror, encryption data is generated, wherein, second encryption Program is the default encipheror stored.
3. according to the method described in claim 1, it is characterised in that described by the binary-coded relevant information and described Binary coding is spliced in the encryption data according to default form, obtains ciphertext, including:
By identification characteristics code, the binary coding length, the binary-coded offset, the binary coding It is sequentially connected with the key, obtains the first Data-Link;
According to the binary-coded offset, the binary-coded insertion position is determined;
According to the insertion position, the binary coding is inserted into the encryption data, the second Data-Link is obtained;
Splice second Data-Link after first Data-Link, obtain ciphertext.
4. a kind of data decryption method, it is characterised in that this method includes:
Ciphertext is obtained, wherein, the ciphertext is comprising identification characteristics code, binary-coded relevant information, binary coding and adds Ciphertext data, the binary-coded relevant information comprising binary coding length, identification characteristics code and it is binary-coded partially Shifting amount;
Analysis is read out to the ciphertext, whether entering comprising default two for the ciphertext is judged according to identification characteristics code System coding, if it is, obtaining the binary coding according to the binary coding length and binary-coded offset;
The binary coding is converted into decryption program;
The ciphertext is decrypted by the decryption program, initial data is obtained.
5. method according to claim 4, it is characterised in that described that analysis is read out to the ciphertext, according to described Identification characteristics code judge the ciphertext whether comprising default binary coding, if it is, according to the binary coding Length and binary-coded offset obtain the binary coding, including:
Analysis is read out to the ciphertext, whether entering comprising default two for the ciphertext is judged according to identification characteristics code System coding, if it is, determining insertion of the binary coding in encryption data according to the binary-coded offset Position;
The binary coding is determined according to the binary-coded length, and in the binary coding in encryption data Insertion position at extract the binary coding.
6. method according to claim 4, it is characterised in that described to be solved by the decryption program to the ciphertext It is close, initial data is obtained, including:
The ciphertext is decrypted using the decryption program, first ciphertext data is obtained, wherein, the decryption program For decryption program corresponding with default encipheror;
First ciphertext data is decrypted using decipherment algorithm, the initial data is obtained.
7. a kind of data encryption device, it is characterised in that the device includes:
First encrypting module, for obtaining initial data, the initial data is encrypted, generation encryption data and key;
Modular converter, for obtaining decryption program corresponding with the key, binary coding is converted into by the decryption program, Calculate the binary-coded relevant information, wherein, the binary-coded relevant information comprising binary coding length, Identification characteristics code and binary-coded offset;
Second encrypting module, for by the binary-coded relevant information and the binary coding according to default form It is spliced in the encryption data, obtains ciphertext.
8. device according to claim 7, it is characterised in that first encrypting module includes:
Acquiring unit, for obtaining initial data;
First ciphering unit, for the initial data to be encrypted using the first encipheror, obtains the first encryption data;
Second ciphering unit, for first encryption data to be encrypted using the second encipheror, generates encryption data, Wherein, second encipheror is the default encipheror stored.
9. device according to claim 7, it is characterised in that second encrypting module includes:
Connection unit, for by identification characteristics code, the binary coding length, the binary-coded offset, The binary coding and the key are sequentially connected, and obtain the first Data-Link;
Determining unit, for according to the binary-coded offset, determining the binary-coded insertion position;
Unit is inserted, for according to the insertion position, the binary coding to be inserted into the encryption data, the is obtained Two Data-Links;
Ciphertext acquiring unit, for splicing second Data-Link after first Data-Link, obtains ciphertext.
10. a kind of data decryption apparatus, it is characterised in that the device includes:
Acquisition module, for obtaining ciphertext, wherein, the ciphertext includes identification characteristics code, binary-coded relevant information, two Scale coding and encryption data, the binary-coded relevant information include binary coding length, identification characteristics code and two The offset of scale coding;
Whether analysis module, for being read out analysis to the ciphertext, the ciphertext is judged according to identification characteristics code Comprising default binary coding, if it is, being obtained according to the binary coding length and binary-coded offset The binary coding;
Modular converter, for the binary coding to be converted into decryption program;
Deciphering module, for the ciphertext to be decrypted by the decryption program, obtains initial data.
11. device according to claim 10, it is characterised in that the analysis module includes:
Whether analytic unit, for being read out analysis to the ciphertext, the ciphertext is judged according to identification characteristics code Comprising default binary coding, if it is, determining that the binary coding is adding according to the binary-coded offset Insertion position in ciphertext data;
Extraction unit, for determining the binary coding according to the binary-coded length, and is compiled in the binary system Code extracts the binary coding at the insertion position in encryption data.
12. device according to claim 10, it is characterised in that the deciphering module includes:
First decryption unit, for the ciphertext to be decrypted using the decryption program, obtains first ciphertext data, Wherein, the decryption program is decryption program corresponding with default encipheror;
Second decryption unit, for first ciphertext data to be decrypted using decipherment algorithm, obtains the initial data.
CN201710613718.1A 2017-07-25 2017-07-25 data encryption and decryption method and device Active CN107196973B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710613718.1A CN107196973B (en) 2017-07-25 2017-07-25 data encryption and decryption method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710613718.1A CN107196973B (en) 2017-07-25 2017-07-25 data encryption and decryption method and device

Publications (2)

Publication Number Publication Date
CN107196973A true CN107196973A (en) 2017-09-22
CN107196973B CN107196973B (en) 2019-12-17

Family

ID=59885079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710613718.1A Active CN107196973B (en) 2017-07-25 2017-07-25 data encryption and decryption method and device

Country Status (1)

Country Link
CN (1) CN107196973B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111835808A (en) * 2019-08-01 2020-10-27 北京骑胜科技有限公司 Data storage method and device, data reading method and device, and storage medium
CN112650470A (en) * 2019-10-11 2021-04-13 意法半导体(格勒诺布尔2)公司 Apparatus and method for extraction and insertion of binary words
CN113111380A (en) * 2021-04-18 2021-07-13 上海丽人丽妆网络科技有限公司 Data management method for trading platform
CN113721956A (en) * 2021-08-26 2021-11-30 广州擎天实业有限公司 Method for updating control program of excitation system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101682682A (en) * 2007-05-30 2010-03-24 富士通株式会社 Image encyption device, image decyption device, method, and program
CN102437910A (en) * 2011-10-18 2012-05-02 国家超级计算深圳中心(深圳云计算中心) Data encryption/decryption checking method and system
US20120134490A1 (en) * 2010-11-29 2012-05-31 Beijing Z & W Technology Consulting Co., Ltd. Selective Data Encryption and Decryption Method and Apparatus
US20120134492A1 (en) * 2010-11-29 2012-05-31 Hui Liu Data Encryption and Decryption Method and Apparatus
CN105790925A (en) * 2014-12-24 2016-07-20 北京奇虎科技有限公司 Data encryption method, data decryption method, data encryption device and data decryption device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101682682A (en) * 2007-05-30 2010-03-24 富士通株式会社 Image encyption device, image decyption device, method, and program
US20120134490A1 (en) * 2010-11-29 2012-05-31 Beijing Z & W Technology Consulting Co., Ltd. Selective Data Encryption and Decryption Method and Apparatus
US20120134492A1 (en) * 2010-11-29 2012-05-31 Hui Liu Data Encryption and Decryption Method and Apparatus
CN102437910A (en) * 2011-10-18 2012-05-02 国家超级计算深圳中心(深圳云计算中心) Data encryption/decryption checking method and system
CN105790925A (en) * 2014-12-24 2016-07-20 北京奇虎科技有限公司 Data encryption method, data decryption method, data encryption device and data decryption device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111835808A (en) * 2019-08-01 2020-10-27 北京骑胜科技有限公司 Data storage method and device, data reading method and device, and storage medium
CN111835808B (en) * 2019-08-01 2023-11-14 北京骑胜科技有限公司 Data storage method and device, data reading method and device, and storage medium
CN112650470A (en) * 2019-10-11 2021-04-13 意法半导体(格勒诺布尔2)公司 Apparatus and method for extraction and insertion of binary words
CN113111380A (en) * 2021-04-18 2021-07-13 上海丽人丽妆网络科技有限公司 Data management method for trading platform
CN113721956A (en) * 2021-08-26 2021-11-30 广州擎天实业有限公司 Method for updating control program of excitation system
CN113721956B (en) * 2021-08-26 2024-02-20 广州擎天实业有限公司 Method for updating excitation system control program

Also Published As

Publication number Publication date
CN107196973B (en) 2019-12-17

Similar Documents

Publication Publication Date Title
CN101897165B (en) Method of authentication of users in data processing systems
Al‐Haj et al. Crypto‐based algorithms for secured medical image transmission
CN101765996B (en) Device and method for remote authentication and transaction signatures
CN101272237B (en) Method and system for automatically generating and filling login information
RU2321179C2 (en) Method for protected transmission of data between two devices
CN105024803B (en) Behavior fingerprint in white box realization
US20120078798A1 (en) Systems and methods for transmitting financial account information
CN107196973A (en) A kind of data encryption, decryption method and device
CN106506159A (en) Encryption method and equipment for key safety
CN109766979A (en) Two-dimensional code generation method, verification method and device
CN103067390A (en) User registration authentication method and system based on facial features
CN106063182A (en) Electronic signing methods, systems and apparatus
EP1650668A1 (en) Electronic information management system
CN104125064B (en) A kind of dynamic cipher authentication method, client and Verification System
CN109087417A (en) A kind of safe two dimensional code entrance guard authentication system and method
CN106572076A (en) Web service access method, client side and server side
CN110232021A (en) The method and device of page test
CN110210270A (en) Two-dimensional barcode information safety encryption and system and image in 2 D code analytic method and system
CN106656955A (en) Communication method and system and user terminal
CN108667801A (en) A kind of Internet of Things access identity safety certifying method and system
CN105071941B (en) Distributed system node identities authentication method and device
CN108989038A (en) It is a kind of for the identification equipment of geographic position authentication, system and method
CN105678185B (en) A kind of data security protection method and intelligent terminal management system
KR101255258B1 (en) Finantial transaction information certification system and method using 2 dimensional barcode
CN116781265A (en) Data encryption method and device

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