CN109194618A - A kind of file encrypting method, document encrypting apparatus and file encryption equipment - Google Patents

A kind of file encrypting method, document encrypting apparatus and file encryption equipment Download PDF

Info

Publication number
CN109194618A
CN109194618A CN201810872095.4A CN201810872095A CN109194618A CN 109194618 A CN109194618 A CN 109194618A CN 201810872095 A CN201810872095 A CN 201810872095A CN 109194618 A CN109194618 A CN 109194618A
Authority
CN
China
Prior art keywords
file
random code
encrypted
rear end
sent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810872095.4A
Other languages
Chinese (zh)
Inventor
陈刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Inspur Smart Computing Technology Co Ltd
Original Assignee
Guangdong Inspur Big Data Research 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 Inspur Big Data Research Co Ltd filed Critical Guangdong Inspur Big Data Research Co Ltd
Priority to CN201810872095.4A priority Critical patent/CN109194618A/en
Publication of CN109194618A publication Critical patent/CN109194618A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • 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
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/121Timestamp

Abstract

The invention discloses a kind of file encrypting methods, including send encrypted instruction to the back-end, so that the rear end generates random code according to the identification information of the encrypted instruction;Obtain the random code that the rear end is sent;By in ciphertext of the random code according to default rule insertion encrypted file, file is newly encrypted to generate;The new encryption file is sent to the rear end.Encryption file can be obscured by being inserted into random code into the ciphertext of encrypted encryption file, to effectively increase the safety of new encryption file.The rule of the rule and insertion random code that generate random code simultaneously easily changes, the rule for generating random code can often be replaced, to further increase the safety of new encryption file, after malice sniff packet capturing program pin is avoided to high price Value Data packet capturing, the possibility of the automatic Brute Force of machine is utilized.The present invention also provides a kind of document encrypting apparatus and a kind of file encryption equipment, equally have above-mentioned beneficial effect.

Description

A kind of file encrypting method, document encrypting apparatus and file encryption equipment
Technical field
The present invention relates to field of computer technology, more particularly to a kind of file encrypting method, document encrypting apparatus and text Part encrypts equipment.
Background technique
As the continuous progress of science and technology, network are almost flooded with the every aspect that people live as usual in recent years.
Current network environment becomes increasingly complex, in the case that network transmission can not ensure safely, directly using traditional Http agreement carries out network communication and web system application has been verified to be very unsafe, some important interior in order to guarantee The transmission safety of appearance, in the prior art, it will usually during web front-end transmits data to rear end, in front end to part The part important content of the page is carrying out traditional http transmission after carrying out rsa encryption.
But in the prior art, the partial data only transmitted between web front-end and rear end carries out rsa encryption not The safety of the data can be effectively ensured, so how to reinforce transmitting the safety of data between web front-end and rear end being this field Technical staff's urgent problem.
Summary of the invention
The object of the present invention is to provide a kind of file encrypting method, can effectively reinforce passing between the front and rear end of web The safety of transmission of data;The present invention also provides a kind of document encrypting apparatus and file encryption equipment, equally can effectively add The safety of data is transmitted between the front and rear end of strong web.
In order to solve the above technical problems, the present invention provides a kind of file encrypting method, it is applied to front end, comprising:
Encrypted instruction is sent to the back-end, so that the rear end generates random code according to the identification information of the encrypted instruction;
Obtain the random code that the rear end is sent;
By the random code according in default rule insertion encrypted file, file is newly encrypted to generate;
The new encryption file is sent to the rear end so that the rear end the new encryption file is reduced into it is described Encrypted file.
Optionally, the identification information is the timestamp of the encrypted instruction.
Optionally, described be inserted into the random code in encrypted file according to default rule includes:
The random code is inserted into the predeterminated position of the encrypted file ciphertext.
The present invention also provides a kind of document encrypting apparatus, are installed on front end, comprising:
Instruction sending module: for sending encrypted instruction to the back-end, so that mark of the rear end according to the encrypted instruction Know information and generates random code;
Randomised code acquisition module: the random code sent for obtaining the rear end;
Random code is inserted into module: for the random code to be inserted into the ciphertext of encrypted file according to default rule, To generate new encryption file;
New encryption file sending module: for the new encryption file to be sent to the rear end, so that the rear end will The new encryption file is reduced into the encrypted file.
The present invention also provides a kind of equipment of file encryption, are applied to front end, comprising:
Memory: for storing computer program;
Processor: the step of the file encrypting method as described in any of the above-described is realized when for executing the computer program Suddenly.
The present invention also provides a kind of file encrypting methods, are applied to rear end, comprising:
Obtain the encrypted instruction that front end is sent;
The identification information of the encrypted instruction is converted into random code by default rule;
The random code is sent to the front end, so that the random code is inserted into encrypted file by the front end, Generate new encryption file;
Obtain the new encryption file that the front end is sent, and by the new encryption file be reduced into described in encrypted text Part.
Optionally, the identification information is the timestamp of the encrypted instruction.
Optionally, described the identification information of the encrypted instruction is converted by random code by default rule to include:
Change the tandem of the identification information according to the first rule to generate new logo information;
The new logo information is converted into the random code according to preset correlation rule.
The present invention also provides a kind of document encrypting apparatus, are installed on rear end, comprising:
Instruction acquisition module: for obtaining the encrypted instruction of front end transmission;
Random code conversion module: for being converted into the identification information of the encrypted instruction at random by default rule Code;
Random code sending module: for the random code to be sent to the front end, so that the front end will be described random In the ciphertext of code insertion encrypted file, new encryption file is generated;
New encryption file acquisition module: the new encryption file sent for obtaining the front end, and newly add described Ciphertext part is reduced into the encrypted file.
The present invention also provides a kind of equipment of file encryption, are applied to rear end, comprising:
Memory: for storing computer program;
Processor: the step of the file encrypting method as described in any of the above-described is realized when for executing the computer program Suddenly.
A kind of file encrypting method provided by the present invention, including encrypted instruction is sent to the back-end, so that the rear end root Random code is generated according to the identification information of the encrypted instruction;Obtain the random code that the rear end is sent;By the random code In ciphertext according to default rule insertion encrypted file, to generate new encryption file;The new encryption file is sent to The rear end, so that the new encryption file is reduced into the encrypted file by the rear end.By to encrypted Encryption file can be obscured by encrypting insertion random code in the ciphertext of file, to effectively increase the safety of new encryption file Property, after avoiding malice sniff packet capturing program pin to high price Value Data packet capturing, carried out using former public key to exploration data encryption, machine The possibility of the automatic Brute Force of device.The rule of the rule and insertion random code that generate random code simultaneously easily changes, Ke Yijing Often replacement generates the rule of random code, to further increase the safety of new encryption file.
The present invention also provides a kind of document encrypting apparatus and a kind of file encryption equipment, equally have above-mentioned beneficial to effect Fruit is no longer repeated herein.
Detailed description of the invention
It, below will be to embodiment or existing for the clearer technical solution for illustrating the embodiment of the present invention or the prior art Attached drawing needed in technical description is briefly described, it should be apparent that, the accompanying drawings in the following description is only this hair Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of flow chart of file encrypting method provided by the embodiment of the present invention;
Fig. 2 is a kind of flow chart of specific file encrypting method provided by the embodiment of the present invention;
Fig. 3 is a kind of structural block diagram of document encrypting apparatus provided by the embodiment of the present invention;
Fig. 4 is a kind of structural block diagram of file encryption equipment provided by the embodiment of the present invention;
Fig. 5 is the flow chart of another kind file encrypting method provided by the embodiment of the present invention;
Fig. 6 is the flow chart of the specific file encrypting method of another kind provided by the embodiment of the present invention;
Fig. 7 is a kind of structural block diagram of document encrypting apparatus provided by the embodiment of the present invention;
Fig. 8 is a kind of structural block diagram of file encryption equipment provided by the embodiment of the present invention.
Specific embodiment
Core of the invention is to provide a kind of file encrypting method.In the prior art, only in the front end of web with after Rsa encryption is carried out to partial data during transmitting data between end.But only file is carried out from the point of view of history The safety of transmission file can not be effectively ensured in encryption.1999, RSA-155 (512bits) was by successful decomposition, and 2002, RSA-158 also by success Factorization, on December 12nd, 2009, number be RSA-768 (768bits, 232digits) also by Function decomposes, while RSA public key encryption algorithm, there are certain loophole, not all public key is all according to theoretical random production It is raw.In this case private key can be obtained by calculating, and the confidentiality of private key is without collateral security.
And a kind of file encrypting method provided by the present invention, including encrypted instruction is sent to the back-end, so that the rear end Random code is generated according to the identification information of the encrypted instruction;Obtain the random code that the rear end is sent;It will be described random In ciphertext of the code according to default rule insertion encrypted file, to generate new encryption file;The new encryption file is sent To the rear end.Encryption file can be mixed by being inserted into random code into the ciphertext of encrypted encryption file Confuse, to effectively increase the safety of new encryption file.The rule of random code is generated simultaneously and is inserted into the regular pole of random code Malleable can often replace the rule for generating random code, to further increase the safety of new encryption file.
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawings and detailed description The present invention is described in further detail.Obviously, described embodiments are only a part of the embodiments of the present invention, rather than Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise Under every other embodiment obtained, shall fall within the protection scope of the present invention.
Referring to FIG. 1, Fig. 1 is a kind of flow chart of file encrypting method provided by the embodiment of the present invention.
Referring to Fig. 1, file encrypting method provided by the embodiment of the present invention is mainly used in the front end of web.In the present invention In embodiment, the file encrypting method includes:
S101: sending encrypted instruction to the back-end, so that rear end generates random code according to the identification information of encrypted instruction.
In embodiments of the present invention, what the front end of web was popular says the part watched to user, and the rear end of web is popular Say the part for being handled data and being stored.
In this step, when front end needs to encrypt partial data, an encrypted instruction can be sent to the back-end, it is above-mentioned Rear end can generate random code according to the identification information of the instruction.The particular content of above-mentioned encrypted instruction is in embodiments of the present invention simultaneously It is not specifically limited, it is depending on the circumstances.As long as above-mentioned encrypted instruction can make rear end generate random code according to the encrypted instruction ?.
Above-mentioned rear end can generate random code according to the identification information and default rule of above-mentioned encrypted instruction.After related The specific steps that end generates random code will be described in detail in following inventive embodiments, no longer be repeated herein.
S102: the random code that rear end is sent is obtained.
In S101 after rear end generates random code, random code can be sent to front end, front end can be obtained in this step Take random code transmitted by rear end.Specifically, random code can be put into the session channel between front and rear end by rear end, it is above-mentioned Front end can obtain the random code by session channel.
S103: by random code according in default rule insertion encrypted file, file is newly encrypted to generate.
Before this step, the file encrypted in advance to needs encrypt and produce encrypted file.It is logical In normal situation, the file that can be encrypted in embodiments of the present invention to needs carries out rsa encryption and generates encrypted file.Certainly, It can also select other cipher modes to encrypting for the file encrypted is needed in embodiments of the present invention, add in relation to specific Close mode is referred to the prior art, in embodiments of the present invention and is not specifically limited.
In this step, the random code received can be inserted into encrypted file according to default rule, to generate New encryption file.Specific rules in relation to above-mentioned insertion random code will be described in detail in following inventive embodiments, herein not It is repeated again.
S104: being sent to rear end for new encryption file, so that new encryption file is reduced into encrypted file by rear end.
In this step, the new encryption file generated in S103 can be sent to rear end, so that rear end is by Xin Jiamiwen Part is reduced into encrypted file, and the data by encryption are stored or calculated.Specifically, when rear end receive it is above-mentioned new It, can be first according to the regular random code by insertion of above-mentioned insertion random code from the ciphertext of new encryption file when encrypting file It removes, new encryption file is reduced into encrypted file, encrypted file is parsed again later, also by encrypted file Original becomes unencrypted file.It should be noted that the above-mentioned rule for being inserted into random code is usually not only merely stored in front end, Usually can also it be stored in rear end.
A kind of file encrypting method provided by the present invention, including encrypted instruction is sent to the back-end, so that the rear end root Random code is generated according to the identification information of the encrypted instruction;Obtain the random code that the rear end is sent;By the random code In ciphertext according to default rule insertion encrypted file, to generate new encryption file;The new encryption file is sent to The rear end, so that the new encryption file is reduced into the encrypted file by the rear end.By to encrypted Encryption file can be obscured by encrypting insertion random code in the ciphertext of file, to effectively increase the safety of new encryption file Property.The rule of the rule and insertion random code that generate random code simultaneously easily changes, and can often replace and generate random code Rule avoids malice sniff packet capturing program pin and grabs to high price Value Data to further increase the safety of new encryption file Bao Hou is carried out using former public key to exploration data encryption, the possibility of the automatic Brute Force of machine.
The estimation rule of specific rules and insertion random code in relation to above-mentioned generation random code will be implemented in following inventions It is described in detail in example.
Referring to fig. 2, Fig. 2 is a kind of flow chart of specific file encrypting method provided by the embodiment of the present invention.
Referring to fig. 2, file encrypting method provided by the embodiment of the present invention is mainly used in the front end of web.In the present invention In embodiment, the file encrypting method includes:
S201: sending encrypted instruction to the back-end, so that rear end generates random code according to the timestamp of encrypted instruction.
In this step, rear end specifically can generate random code according to the timestamp for the encrypted instruction that front end is sent, i.e., at this The timestamp of encrypted instruction is the identification information of encrypted instruction in inventive embodiments.Specifically, rear end can have under normal conditions Body generates random code according to timestamp when receiving the encrypted instruction.The randomness of above-mentioned random code in order to further increase, So that the step of random code is more not easy to be cracked, and rear end generates random code in embodiments of the present invention preferably two specific steps Rapid: the first step changes the tandem of the identification information according to the first rule to generate new logo information.It will illustrate below Bright, when identification information is timestamp, such as the encrypted instruction reaches the time of rear end as 2018/05/02 19:20: 34.045, then new logo information generated can be 19203404520180502 in this specific steps.Certainly, at this The first rule of others can also be selected in inventive embodiments, such as the precision of timestamp is only limited in this level-one of second, this Stylish identification information can be 20180502192034;The particular content of the first rule is not done in embodiments of the present invention It is specific to limit, it is depending on the circumstances.
The new logo information is converted into the random code according to preset correlation rule by second step.It below will citing Illustrate, when new logo information is 19203404520180502, while preset correlation rule: 0123456789 corresponds Letter be UNdYaVJmPR, at this time according to the correlation rule, random code corresponding to above-mentioned new logo information is are as follows: NRdUYaUaVdUNPUVUd.Certainly, the particular content of above-mentioned correlation rule is not done equally specifically in embodiments of the present invention It limits, it is depending on the circumstances.
Remaining content of this step and the content in S101 in foregoing invention embodiment are essentially identical, and detailed content please refers to Foregoing invention embodiment in embodiment and is no longer described in detail after the present invention.
S202: the random code that rear end is sent is obtained.
This step and S102 in foregoing invention embodiment are essentially identical, and detailed content please refers to foregoing invention embodiment, It in embodiment and is no longer repeated after the present invention.
S203: by the predeterminated position of random code insertion encrypted file ciphertext, to generate new encryption file.
In this step, above-mentioned random code specifically can be inserted into the predeterminated position of encrypted file ciphertext, to generate New encryption file.It will be exemplified below, it is generally the case that include encrypted fields and to have been encrypted with this in encrypted file The corresponding ciphertext of field.It is above-mentioned have encrypted fields be equivalent to project name, such as usr (user name), psd (password) etc.. Assuming that the content of existing encrypted file are as follows:
Usr=CKtVWIoGFYOQuc937oYdraQDvbOGpXSTvKC
Psd=zEZ+peDN3PVmgT+saLo9wMqmZu6N6lVvad3
The random code got at this time are as follows: NRdUYaUaVdUNPUVUd
Random code specifically can be inserted into the 7th of ciphertext in this step, new encryption file obtained at this time Content specifically:
Usr=CKtVWIoNRdUYaUaVdUNPUVUdGFYOQuc937oYdraQDvbOGpXSTvKC
Psd=zEZ+peDNRdUYaUaVdUNPUVUdN3PVmgT+saLo9wMqmZu6N6lVvad3
Certainly, specific limit is not done for being inserted into the specific location of random code in the ciphertext of encrypted file in this step Fixed, depending on the circumstances, above-mentioned random code also can be inserted to the 3rd of ciphertext, the 10th etc..
S204: being sent to rear end for new encryption file, so that new encryption file is reduced into encrypted file by rear end.
If such as the content of the new encryption file obtained in this step specifically:
Usr=CKtVWIoNRdUYaUaVdUNPUVUdGFYOQuc937oYdraQDvbOGpXSTvKC
Psd=zEZ+peDNRdUYaUaVdUNPUVUdN3PVmgT+saLo9wMqmZu6N6lVvad3
So in this step, new encryption file can be restored, the content of the encrypted file restored are as follows:
Usr=CKtVWIoGFYOQuc937oYdraQDvbOGpXSTvKC
Psd=zEZ+peDN3PVmgT+saLo9wMqmZu6N6lVvad3
Remaining content of this step and S104 in foregoing invention embodiment are essentially identical, and detailed content please refers to foregoing invention Embodiment in embodiment and no longer repeats after the present invention.
A kind of file encrypting method provided by the embodiment of the present invention, can be simple especially by the timestamp of encrypted instruction Effectively generate corresponding random code;Sequence by upsetting identification information can further increase the randomness of random code, with Increase the safety of new encryption file.
A kind of document encrypting apparatus provided in an embodiment of the present invention is introduced below, this document encryption device is installed on The front end of web, document encrypting apparatus described below can correspond to each other reference with above-described file encrypting method.
Fig. 3 is a kind of structural block diagram of document encrypting apparatus provided by the embodiment of the present invention, referring to Fig. 3, file encryption Device may include:
Instruction sending module 100: for sending encrypted instruction to the back-end, so that the rear end is according to the encrypted instruction Identification information generates random code.
Randomised code acquisition module 200: the random code sent for obtaining the rear end.
Random code is inserted into module 300: for the ciphertext by the random code according to default rule insertion encrypted file In, to generate new encryption file.
New encryption file sending module 400: for the new encryption file to be sent to the rear end, so that rear end will be new Encryption file is reduced into encrypted file.
Preferably, above-metioned instruction sending module 100 can be specifically used for:
Encrypted instruction is sent to the back-end, so that the rear end generates random code according to the timestamp of the encrypted instruction.
Above-mentioned random code insertion module 300 is specifically used for:
The random code is inserted into the predeterminated position of the encrypted file ciphertext, to generate new encryption file.
The document encrypting apparatus of the present embodiment is for realizing file encrypting method above-mentioned, therefore in document encrypting apparatus The embodiment part of the visible file encrypting method hereinbefore of specific embodiment, for example, instruction sending module 100, random code Module 200 is obtained, random code is inserted into module 300, and it is new to encrypt file sending module 400, it is respectively used to realize above-mentioned file encryption Step S101, S102, S103 and S104 in method, so, specific embodiment is referred to corresponding various pieces and implements The description of example, details are not described herein.
A kind of file encryption equipment provided in an embodiment of the present invention is introduced below, this document encrypt equipment application in The front end of web, file encryption equipment described below can phases with above-described file encrypting method and document encrypting apparatus Mutually to should refer to.
Referring to FIG. 4, Fig. 4 is a kind of structural block diagram of file encryption equipment provided by the embodiment of the present invention.
Referring to Fig. 4, it may include processor 500 and memory 600 that this document, which encrypts equipment,.
The memory 600 is for storing computer program;The processor 500 is for when executing the computer program Realize foregoing invention file encrypting method as described in the examples.
Processor 500 adds for installing file described in above-mentioned inventive embodiments in the file encryption equipment of the present embodiment Close device, simultaneous processor 500 is combined with memory 600 may be implemented file described in any of the above-described inventive embodiments and adds Decryption method.Therefore the embodiment part of the visible file encrypting method hereinbefore of specific embodiment in file encryption equipment, Its specific embodiment is referred to the description of corresponding various pieces embodiment, and details are not described herein.
Referring to FIG. 5, Fig. 5 is the flow chart of another kind file encrypting method provided by the embodiment of the present invention.
Referring to Fig. 5, file encrypting method provided by the embodiment of the present invention is mainly used in the rear end of web.In the present invention In embodiment, the file encrypting method includes:
S301: the encrypted instruction that front end is sent is obtained.
In embodiments of the present invention, what the front end of web was popular says the part watched to user, and the rear end of web is popular Say the part for being handled data and being stored.
In this step, when front end needs to encrypt partial data, an encrypted instruction can be sent to the back-end, at this Rear end can receive the encrypted instruction in step.The particular content of above-mentioned encrypted instruction is not done specifically in embodiments of the present invention It limits, it is depending on the circumstances.As long as above-mentioned encrypted instruction can make rear end generate random code according to the encrypted instruction.
S302: the identification information of encrypted instruction is converted by random code by default rule.
In this step, it after receiving the encrypted instruction sent by front end, can will be encrypted by default rule The identification information of instruction is converted into random code.The specific steps that related rear end generates random code will be done in following inventive embodiments It is discussed in detail, is no longer repeated herein.
S303: being sent to front end for random code, so that random code is inserted into encrypted file by front end, generates Xin Jiamiwen Part.
In this step, random code can be sent to front end.After current termination receives the random code, it can will receive Random code is inserted into encrypted file according to default rule, to generate new encryption file.Related above-mentioned insertion random code Specific rules will be described in detail in following inventive embodiments, no longer be repeated herein.
Specifically, random code can be put into the session channel between front and rear end by rear end, above-mentioned front end can pass through meeting Talking path obtains the random code.Before random code is inserted into front end, the file that front end has in advance encrypted needs is added It is close and produce encrypted file.Under normal conditions, rsa encryption can be carried out to the file that needs encrypt in embodiments of the present invention And generate encrypted file.Certainly, the text that other cipher modes can also be selected to encrypt needs in embodiments of the present invention Part encrypt, and related specific cipher mode is referred to the prior art, in embodiments of the present invention and is not specifically limited.
S304: the new encryption file that front end is sent is obtained, and new encryption file is reduced into encrypted file.
After front end generates new encryption file, new encryption file can be sent to rear end, can obtained in this step The new encryption file, and new encryption file is reduced into encrypted file, so as to after rear end receives the new encryption file, Data by encryption can be stored or be calculated.Specifically, when rear end receives above-mentioned new encryption file, it can first root The random code of insertion is removed from the ciphertext of new encryption file according to the rule of above-mentioned insertion random code, will newly encrypt file also Original is parsed to encrypt file again later at encrypted file, and encrypted file reduction is become unencrypted file.It needs It is noted that the above-mentioned rule for being inserted into random code is usually not only merely stored in front end, it usually can also be stored in rear end In.
A kind of file encrypting method provided by the embodiment of the present invention, the encrypted instruction sent including obtaining front end;Pass through The identification information of the encrypted instruction is converted into random code by default rule;The random code is sent to the front end, with Be inserted into the front end random code in encrypted file, generates new encryption file;Obtain the described of the front end transmission New encryption file, and new encryption file is reduced into encrypted file.By into the ciphertext of encrypted encryption file Insertion random code can obscure encryption file, to effectively increase the safety of new encryption file.It generates simultaneously random The rule of code and the rule of insertion random code easily change, and the rule for generating random code can be often replaced, thus further The safety for improving new encryption file utilizes former public key after avoiding malice sniff packet capturing program pin to high price Value Data packet capturing It carries out to exploration data encryption, the possibility of the automatic Brute Force of machine.
The estimation rule of specific rules and insertion random code in relation to above-mentioned generation random code will be implemented in following inventions It is described in detail in example.
It is the flow chart of the specific file encrypting method of another kind provided by the embodiment of the present invention referring to Fig. 6, Fig. 6.
Referring to Fig. 6, file encrypting method provided by the embodiment of the present invention is mainly used in the rear end of web.In the present invention In embodiment, the file encrypting method includes:
S401: the encrypted instruction that front end is sent is obtained.
This step and S301 in foregoing invention embodiment are essentially identical, and detailed content please refers to foregoing invention embodiment, It in embodiment and is no longer repeated after the present invention.
S402: the tandem of identification information is changed to generate new logo information according to the first rule.
In embodiments of the present invention, the identification information is preferably the timestamp of the encrypted instruction.
In this step, rear end specifically can generate random code according to the timestamp for getting above-mentioned encrypted instruction, i.e., at this The timestamp of encrypted instruction is the identification information of encrypted instruction in inventive embodiments.Above-mentioned random code in order to further increase Randomness first will can adjust identification information according to the first rule in this step so that random code is more not easy to be cracked Tandem, to generate new logo information.
It will be exemplified below, when identification information is timestamp, such as rear end gets time of the encrypted instruction and is 2018/05/02 19:20:34.045, then in this step, new logo information generated can be 19203404520180502.Certainly, can also select in embodiments of the present invention others first rule, such as only by when Between the precision stabbed be limited in this level-one of second, new logo information can be 20180502192034 at this time;In embodiments of the present invention For the first regular particular content and it is not specifically limited, it is depending on the circumstances.
S403: new logo information is converted by random code according to preset correlation rule.
It will be exemplified below, when new logo information is 19203404520180502, while preset correlation rule: 0123456789 one-to-one letter is UNdYaVJmPR, at this time according to the correlation rule, corresponding to above-mentioned new logo information Random code be are as follows: NRdUYaUaVdUNPUVUd.Certainly, in embodiments of the present invention for the specific interior of above-mentioned correlation rule Appearance is equally not specifically limited, depending on the circumstances.
In embodiments of the present invention, remaining of S402 and S403 content and the content in S302 in foregoing invention embodiment Essentially identical, detailed content please refers to foregoing invention embodiment, in embodiment and is no longer described in detail after the present invention.
S404: being sent to front end for random code, so that random code is inserted into the predeterminated position of encrypted file ciphertext by front end, Generate new encryption file.
In this step, random code is being sent to front end, and after waiting front ends to get the random code, can by it is above-mentioned with Machine code is specifically inserted into the predeterminated position of encrypted file ciphertext, to generate new encryption file.It will be exemplified below, usually In the case of, include in encrypted file encrypted fields and with the corresponding ciphertext of encrypted fields.It is above-mentioned to have encrypted word Section is equivalent to project name, such as usr (user name), psd (password) etc..Assuming that the content of existing encrypted file are as follows:
Usr=CKtVWIoGFYOQuc937oYdraQDvbOGpXSTvKC
Psd=zEZ+peDN3PVmgT+saLo9wMqmZu6N6lVvad3
The random code got at this time are as follows: NRdUYaUaVdUNPUVUd
Random code specifically can be inserted into the 7th of ciphertext in this step, new encryption file obtained at this time Content specifically:
Usr=CKtVWIoNRdUYaUaVdUNPUVUdGFYOQuc937oYdraQDvbOGpXSTvKC
Psd=zEZ+peDNRdUYaUaVdUNPUVUdN3PVmgT+saLo9wMqmZu6N6lVvad3
Certainly, specific limit is not done for being inserted into the specific location of random code in the ciphertext of encrypted file in this step Fixed, depending on the circumstances, above-mentioned random code also can be inserted to the 3rd of ciphertext, the 10th etc..
Remaining content of this step and the content in S303 in foregoing invention embodiment are essentially identical, and detailed content please refers to Foregoing invention embodiment in embodiment and is no longer described in detail after the present invention.
S405: the new encryption file that front end is sent is obtained, and new encryption file is reduced into encrypted file.
If such as the content of the new encryption file obtained in this step specifically:
Usr=CKtVWIoNRdUYaUaVdUNPUVUdGFYOQuc937oYdraQDvbOGpXSTvKC
Psd=zEZ+peDNRdUYaUaVdUNPUVUdN3PVmgT+saLo9wMqmZu6N6lVvad3
So in this step, new encryption file can be restored, the content of the encrypted file restored are as follows:
Usr=CKtVWIoGFYOQuc937oYdraQDvbOGpXSTvKC
Psd=zEZ+peDN3PVmgT+saLo9wMqmZu6N6lVvad3
Remaining content of this step and the content in S304 in foregoing invention embodiment are essentially identical, and detailed content please refers to Foregoing invention embodiment in embodiment and no longer repeats after the present invention.
A kind of file encrypting method provided by the embodiment of the present invention, can be simple especially by the timestamp of encrypted instruction Effectively generate corresponding random code;Sequence by upsetting identification information can further increase the randomness of random code, with Increase the safety of new encryption file.
A kind of document encrypting apparatus provided in an embodiment of the present invention is introduced below, this document encryption device is installed on The rear end of web, document encrypting apparatus described below can correspond to each other reference with above-described file encrypting method.
Fig. 7 is a kind of structural block diagram of document encrypting apparatus provided by the embodiment of the present invention, referring to Fig. 7, file encryption Device may include:
Instruction acquisition module 700: for obtaining the encrypted instruction of front end transmission.
Random code conversion module 800: for by default rule by the identification information of the encrypted instruction be converted into Machine code.
Random code sending module 900: for the random code to be sent to the front end so that the front end will it is described with Machine code is inserted into the ciphertext of encrypted file, generates new encryption file.
New encryption file acquisition module 1000: the new encryption file sent for obtaining the front end, and will newly add Ciphertext part is reduced into encrypted file.
Preferably, above-mentioned random code conversion module 800 can be specifically used for:
The timestamp of the encrypted instruction is converted into random code by default rule.
Above-mentioned random code conversion module 800 can specifically include:
Identification information sequencing unit: for changing the tandem of the identification information according to the first rule to generate new mark Know information.
Random code generation unit: described random for being converted into the new logo information according to preset correlation rule Code.
The document encrypting apparatus of the present embodiment for realizing aforementioned applications in the file encrypting method of the rear end web, therefore text The embodiment part of the visible file encrypting method for being hereinbefore applied to the rear end web of specific embodiment in part encryption device, For example, instruction acquisition module 700, random code conversion module 800, random code sending module 900 are new to encrypt file acquisition module 1000, it is respectively used to realize step S301, S302, S303 and S304 in above-mentioned file encrypting method, so, specific embodiment party Formula is referred to the description of corresponding various pieces embodiment, and details are not described herein.
A kind of file encryption equipment provided in an embodiment of the present invention is introduced below, this document encrypt equipment application in The rear end of web, file encryption equipment described below can phases with above-described file encrypting method and document encrypting apparatus Mutually to should refer to.
Referring to FIG. 8, Fig. 8 is a kind of structural block diagram of file encryption equipment provided by the embodiment of the present invention.
Referring to Fig. 8, it may include processor 1100 and memory 1200 that this document, which encrypts equipment,.
The memory 1200 is for storing computer program;The processor 1100 is for executing the computer program The Shi Shixian foregoing invention file encrypting method as described in the examples applied to the rear end web.
Processor 1100 is for installing application described in above-mentioned inventive embodiments in the file encryption equipment of the present embodiment Document encrypting apparatus in the rear end web, simultaneous processor 1100 is combined with memory 1200 may be implemented any of the above-described application The file encrypting method described in the inventive embodiments of the rear end web.Therefore the specific embodiment in file encryption equipment can The embodiment part of the file encrypting method applied to the rear end web in seing above, specific embodiment are referred to accordingly Various pieces embodiment description, details are not described herein.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with it is other The difference of embodiment, same or similar part may refer to each other between each embodiment.For being filled disclosed in embodiment For setting, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part Explanation.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond the scope of this invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged Except there is also other identical elements in the process, method, article or apparatus that includes the element.
A kind of file encrypting method provided by the present invention, document encrypting apparatus and file encryption equipment are carried out above It is discussed in detail.Used herein a specific example illustrates the principle and implementation of the invention, above embodiments Illustrate to be merely used to help understand method and its core concept of the invention.It should be pointed out that for the common skill of the art , without departing from the principle of the present invention, can be with several improvements and modifications are made to the present invention for art personnel, these change It is also fallen within the protection scope of the claims of the present invention into modification.

Claims (10)

1. a kind of file encrypting method, which is characterized in that be applied to front end, comprising:
Encrypted instruction is sent to the back-end, so that the rear end generates random code according to the identification information of the encrypted instruction;
Obtain the random code that the rear end is sent;
By the random code according in default rule insertion encrypted file, file is newly encrypted to generate;
The new encryption file is sent to the rear end, so that the new encryption file is reduced into described added by the rear end Ciphertext part.
2. the method according to claim 1, wherein the identification information is the timestamp of the encrypted instruction.
3. the method according to claim 1, wherein described be inserted into the random code according to default rule Include: in encryption file
The random code is inserted into the predeterminated position of the encrypted file ciphertext.
4. a kind of document encrypting apparatus, which is characterized in that be installed on front end, comprising:
Instruction sending module: for sending encrypted instruction to the back-end, so that the rear end is believed according to the mark of the encrypted instruction Breath generates random code;
Randomised code acquisition module: the random code sent for obtaining the rear end;
Random code is inserted into module: for the random code to be inserted into the ciphertext of encrypted file according to default rule, with life At new encryption file;
New encryption file sending module: for the new encryption file to be sent to the rear end, so that the rear end will be described New encryption file is reduced into the encrypted file.
5. a kind of equipment of file encryption, which is characterized in that be applied to front end, comprising:
Memory: for storing computer program;
Processor: realizing the file encrypting method as described in any one of claims 1 to 3 when for executing the computer program Step.
6. a kind of file encrypting method, which is characterized in that be applied to rear end, comprising:
Obtain the encrypted instruction that front end is sent;
The identification information of the encrypted instruction is converted into random code by default rule;
The random code is sent to the front end, so that the random code is inserted into encrypted file by the front end, is generated New encryption file;
The new encryption file that the front end is sent is obtained, and the new encryption file is reduced into the encrypted file.
7. according to the method described in claim 6, it is characterized in that, the identification information is the timestamp of the encrypted instruction.
8. according to the method described in claim 6, it is characterized in that, it is described by default rule by the mark of the encrypted instruction Knowledge information is converted into random code and includes:
Change the tandem of the identification information according to the first rule to generate new logo information;
The new logo information is converted into the random code according to preset correlation rule.
9. a kind of document encrypting apparatus, which is characterized in that be installed on rear end, comprising:
Instruction acquisition module: for obtaining the encrypted instruction of front end transmission;
Random code conversion module: for the identification information of the encrypted instruction to be converted into random code by default rule;
Random code sending module: for the random code to be sent to the front end, so that the random code is inserted in the front end Enter in the ciphertext of encrypted file, generates new encryption file;
New encryption file acquisition module: the new encryption file sent for obtaining the front end, and by the Xin Jiamiwen Part is reduced into the encrypted file.
10. a kind of equipment of file encryption, which is characterized in that be applied to rear end, comprising:
Memory: for storing computer program;
Processor: realizing the file encrypting method as described in any one of claim 6 to 8 when for executing the computer program Step.
CN201810872095.4A 2018-08-02 2018-08-02 A kind of file encrypting method, document encrypting apparatus and file encryption equipment Pending CN109194618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810872095.4A CN109194618A (en) 2018-08-02 2018-08-02 A kind of file encrypting method, document encrypting apparatus and file encryption equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810872095.4A CN109194618A (en) 2018-08-02 2018-08-02 A kind of file encrypting method, document encrypting apparatus and file encryption equipment

Publications (1)

Publication Number Publication Date
CN109194618A true CN109194618A (en) 2019-01-11

Family

ID=64920567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810872095.4A Pending CN109194618A (en) 2018-08-02 2018-08-02 A kind of file encrypting method, document encrypting apparatus and file encryption equipment

Country Status (1)

Country Link
CN (1) CN109194618A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109861810A (en) * 2019-03-19 2019-06-07 天津中德应用技术大学 A kind of data ciphering method and decryption method based on chaos Tuber yield
CN110928564A (en) * 2019-11-11 2020-03-27 中科有讯(北京)科技有限公司 Method for safely updating application, service server, cluster and storage medium
CN111506913A (en) * 2020-04-21 2020-08-07 上海明略人工智能(集团)有限公司 Audio encryption method and device, storage medium and electronic device
CN113721956A (en) * 2021-08-26 2021-11-30 广州擎天实业有限公司 Method for updating control program of excitation system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447394A (en) * 2015-11-23 2016-03-30 浪潮集团有限公司 Intelligent password key with local data encryption function
CN105760722A (en) * 2016-03-23 2016-07-13 北京签玺科技有限公司 Watermark embedding electronic signature generation method and platform
CN107295024A (en) * 2017-08-24 2017-10-24 四川长虹电器股份有限公司 It is a kind of to realize the method that web front end is landed safely and accessed
CN107920088A (en) * 2017-12-21 2018-04-17 深圳市四面信息科技有限公司 A kind of encipher-decipher method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105447394A (en) * 2015-11-23 2016-03-30 浪潮集团有限公司 Intelligent password key with local data encryption function
CN105760722A (en) * 2016-03-23 2016-07-13 北京签玺科技有限公司 Watermark embedding electronic signature generation method and platform
CN107295024A (en) * 2017-08-24 2017-10-24 四川长虹电器股份有限公司 It is a kind of to realize the method that web front end is landed safely and accessed
CN107920088A (en) * 2017-12-21 2018-04-17 深圳市四面信息科技有限公司 A kind of encipher-decipher method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109861810A (en) * 2019-03-19 2019-06-07 天津中德应用技术大学 A kind of data ciphering method and decryption method based on chaos Tuber yield
CN110928564A (en) * 2019-11-11 2020-03-27 中科有讯(北京)科技有限公司 Method for safely updating application, service server, cluster and storage medium
CN111506913A (en) * 2020-04-21 2020-08-07 上海明略人工智能(集团)有限公司 Audio encryption method and device, storage medium and electronic device
CN111506913B (en) * 2020-04-21 2024-03-15 上海明略人工智能(集团)有限公司 Audio encryption method and device, storage medium and electronic device
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

Similar Documents

Publication Publication Date Title
US10187361B2 (en) Method for secure communication using asymmetric and symmetric encryption over insecure communications
CN109194618A (en) A kind of file encrypting method, document encrypting apparatus and file encryption equipment
EP2611061A1 (en) Communication terminal, communication system, communication method and communication program
CN107483192B (en) Data transmission method and device based on quantum communication
EP3410632B1 (en) Protection against relay attacks in a white-box implementation
CN106899607A (en) The method and device that a kind of information encryption is sent and decryption is received
CN107155113B (en) Method and server for protecting bullet screen information
CN106603504A (en) VoIP (Voice over Internet Protocol) encrypting and monitoring methods and VoIP encrypting and monitoring devices
CN110138795B (en) Multi-step mixed encryption and decryption method in communication process
CN110505066A (en) A kind of data transmission method, device, equipment and storage medium
EP1865652A1 (en) Data processing apparatus
JP2009531728A (en) Encryption methods for highest security applications
US9059838B2 (en) Encryption algorithm with randomized buffer
CN111404953A (en) Message encryption method, message decryption method, related devices and related systems
CN110417544A (en) A kind of generation method of root key, device and medium
CN103595529B (en) The changing method of a kind of one-pass key and realize device
EP2892206B1 (en) System and method for push framework security
CN111585998B (en) Audit data secure transmission method and system
JP2006191509A (en) Communication system, and communication method
CN113761550A (en) Encryption method and device
US20140223194A1 (en) Cryptographic System of Symmetric-Key Encryption using Large Permutation Vector Keys
KR20170061759A (en) Terminal and method for providing secure messenger service
CN106027553B (en) A kind of encryption and decryption method based on dynamic password
CN113596054B (en) Method for encrypting transmission soft frequency hopping between information systems
CN104363584B (en) A kind of method, apparatus and terminal of short message Encrypt and Decrypt

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190111