CN109617681A - Encryption and decryption method and device, electronic equipment, computer readable storage medium - Google Patents
Encryption and decryption method and device, electronic equipment, computer readable storage medium Download PDFInfo
- Publication number
- CN109617681A CN109617681A CN201811489017.2A CN201811489017A CN109617681A CN 109617681 A CN109617681 A CN 109617681A CN 201811489017 A CN201811489017 A CN 201811489017A CN 109617681 A CN109617681 A CN 109617681A
- Authority
- CN
- China
- Prior art keywords
- information
- processed
- treatment factors
- factor
- key
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0618—Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
- H04L9/0631—Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
- H04L9/0825—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
Abstract
This disclosure relates to a kind of encipher-decipher method, device, electronic equipment and computer readable storage medium, this method comprises: obtaining information to be processed;The treatment factors that information to be processed is encrypted or decrypted are determined based on information to be processed;Information to be processed is handled based on treatment factors, obtains processing result.A kind of encipher-decipher method that the disclosure provides, determines treatment factors based on information to be processed, so that the treatment factors determined are related to information to be processed, increases the complexity for the treatment of factors;Information to be processed is handled based on determining treatment factors again, increases the complexity of processing result, it is made to be not easy to be cracked, safety with higher.A kind of ciphering and deciphering device, electronic equipment and the computer readable storage medium that the disclosure provides also solve the problems, such as relevant art.
Description
Technical field
This disclosure relates to field of information security technology, more specifically to encryption and decryption method and device, electronic equipment,
Computer readable storage medium.
Background technique
With the development of communication technology, the safety of information is continuously available attention.It is related in order to guarantee the safety of information
Technical solution is that information is encrypted, for example is encrypted etc. using grouping encryption and decryption mode to information.
Information is encrypted however, current block cipher generallys use fixed key, attacker easily obtains identical
The bright ciphertext pair of magnanimity under key encryption, and it is usually interrelated by the round key that fixed key is derived from, when acquisition unit minute wheel
All key informations can be recovered after key.These potential problems are especially extremely complex more in cryptographic algorithm application scenarios
In the case where sample, the safety of information can be impacted.
In conclusion design safety intensity is higher, and the cryptographic algorithm that all kinds of potential attacks can be resisted be extremely it is necessary to
's.
Summary of the invention
Purpose of this disclosure is to provide a kind of encipher-decipher method, the peace for how improving information can be solved to a certain extent
The technical issues of full property.The disclosure additionally provides a kind of ciphering and deciphering device and electronic equipment, computer readable storage medium.
On the one hand, the disclosure provides a kind of encipher-decipher method, comprising:
Obtain information to be processed;
The treatment factors that the information to be processed is encrypted or decrypted, the place are determined based on the information to be processed
Managing the factor includes encryption factor or decryption factor;
The information to be processed is handled based on the treatment factors, obtains processing result.
Preferably, described that the information to be processed is handled based on the treatment factors, after obtaining processing result,
Further include:
Iteration executes described based on the determining place that the information to be processed is encrypted or decrypted of the information to be processed
Reason the factor and it is described based on the treatment factors information to be processed is handled, obtains processing result the step of until
Preset times, to obtain target process outcome;
Wherein, each iterative step is the processing result of a preceding iterative step using information to be processed.
Preferably, described that the processing that the information to be processed is encrypted or decrypted is determined based on the information to be processed
The factor, comprising:
Pre-generated set of random numbers is converted to obtain the treatment factors based on the information to be processed.
Preferably, described that pre-generated set of random numbers is converted to obtain the place based on the information to be processed
During managing the factor, comprising:
Obtain master key;
The set of random numbers is generated based on the master key.
It is preferably, described that the set of random numbers is generated based on the master key, comprising:
The master key is based on using key randomization formula and generates set of random numbers;
The key is randomized formula
R=K_Random (Key)={ r1,r2…rm};
Wherein, R indicates the set of random numbers;K_Random indicates that the key is randomized formula;Key indicates the master
Key;rmIndicate the random number in the set of random numbers.
Preferably, described that the processing that the information to be processed is encrypted or decrypted is determined based on the information to be processed
The factor, comprising:
When the treatment factors are the encryption factor, determine that algorithm is based on the information to be processed using encryption factor
Determine the encryption factor;
When the treatment factors are the decryption factor, determine that algorithm is based on the information to be processed using decryption factor
Determine the decryption factor;
Wherein, the encryption factor determines that algorithm and the decryption factor determine that algorithm meets default transformational relation.
According to the second aspect of an embodiment of the present disclosure, a kind of ciphering and deciphering device is provided, comprising:
First obtains module, for obtaining information to be processed;
First determining module, for the information to be processed to be encrypted or decrypted based on the information determination to be processed
Treatment factors, the treatment factors include encryption factor or decryption factor;
First processing module obtains processing knot for handling based on the treatment factors the information to be processed
Fruit.
Preferably, further includes:
First circulation module is based on the treatment factors for the first processing module and carries out to the information to be processed
Processing, after obtaining processing result, iteration is executed described determined based on the information to be processed and carried out to the information to be processed
The treatment factors of encryption or decryption and it is described the information to be processed is handled based on the treatment factors, handled
As a result the step of until preset times, to obtain target process outcome;
Wherein, each iterative step is the processing result of a preceding iterative step using information to be processed.
According to the third aspect of an embodiment of the present disclosure, a kind of electronic equipment is provided, comprising:
Memory, for storing computer program;
Processor, for executing the computer program in the memory, to realize any the method as above
Step.
According to a fourth aspect of embodiments of the present disclosure, a kind of computer readable storage medium is provided, calculating is stored thereon with
Machine program, when the computer program is executed by processor realize as above any the method the step of.
A kind of encipher-decipher method that the disclosure provides, obtains information to be processed;It is determined based on information to be processed to be processed
The treatment factors that information is encrypted or decrypted;Information to be processed is handled based on treatment factors, obtains processing result.This
A kind of open encipher-decipher method provided, needs to determine treatment factors based on information to be processed so that the treatment factors that determine and
Information to be processed is related, increases the complexity for the treatment of factors;At again based on determining treatment factors to information to be processed
Reason, increases the complexity of processing result, it is made to be not easy to be cracked, safety with higher.One kind that the disclosure provides adds
Decryption device, electronic equipment and computer readable storage medium also solve the problems, such as relevant art.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
It is open.
Detailed description of the invention
In order to illustrate more clearly of the embodiment of the present disclosure or technical solution in the prior art, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Disclosed embodiment for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of first pass figure of encipher-decipher method shown according to an exemplary embodiment;
Fig. 2 is a kind of second flow chart of encipher-decipher method shown according to an exemplary embodiment;
Fig. 3 is a kind of encryption and decryption arithmetic logic figure of encipher-decipher method shown in the disclosure;
Fig. 4 is a kind of first structure diagram of ciphering and deciphering device shown according to an exemplary embodiment;
Fig. 5 is a kind of the second structural schematic diagram of ciphering and deciphering device shown according to an exemplary embodiment;
Fig. 6 is the block diagram according to a kind of electronic equipment shown in an exemplary embodiment.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present disclosure, the technical solution in the embodiment of the present disclosure is carried out clear, complete
Site preparation description, it is clear that described embodiment is only disclosure a part of the embodiment, instead of all the embodiments.It is based on
Embodiment in the disclosure, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment belongs to the range of disclosure protection.
Referring to Fig. 1, Fig. 1 is a kind of first pass figure of encipher-decipher method shown according to an exemplary embodiment.
A kind of encipher-decipher method that the disclosure provides, may comprise steps of:
Step S101: information to be processed is obtained.
It is understood that the information content of information to be processed can be determined according to practical application scene, such as in video
In transmission process, information to be processed can be with the video data etc. for transmission.
Step S102: the treatment factors that information to be processed is encrypted or decrypted are determined based on information to be processed.
It is understood that a kind of encipher-decipher method that the disclosure provides just is encryption when treatment factors are encryption factor
Method, information to be processed can be for cleartext informations to be encrypted;When treatment factors are decryption factor, one kind of disclosure offer
Encipher-decipher method is just decryption method, and information to be processed can be with for cipher-text information to be decrypted, at this point, information to be processed is general
The encryption information obtained for the encryption method provided using the disclosure.The type and quantity for the treatment of factors can be according to practical applications
Scene determines.It is understood that respective determining algorithm can be set for decryption factor and encryption factor, then work as treatment factors
When for encryption factor, it can determine that algorithm determines encryption factor based on information to be processed using encryption factor, when treatment factors are
When decryption factor, determine that algorithm determines decryption factor based on information to be processed using decryption factor;In addition, originally in order to application
The Encryption Algorithm that the open decipherment algorithm provided provides the disclosure is decrypted, and encryption factor determines that algorithm and decryption factor are true
Determining algorithm can satisfy default transformational relation.
It is understood that the safety in order to guarantee treatment factors, it can be by a preset key generation
The factor is managed, then determines that the process for the treatment of factors that information to be processed is encrypted or decrypted can be with based on information to be processed are as follows:
Pre-generated set of random numbers is converted to obtain treatment factors based on information to be processed;Wherein, the life of set of random numbers
At process are as follows: obtain master key;Set of random numbers is generated based on master key.Due to generating set of random numbers based on master key, and
Random number is not easy to be cracked by the external world, so the safety of the treatment factors generated is higher.It is of course also possible to master key is not depended on,
But set of random numbers is generated based on other modes, correspondingly, still based on information to be processed to pre-generated random manifold
Conjunction is converted to obtain treatment factors.
Formula is randomized using key it is understood that may is that based on the process that master key generates set of random numbers
Set of random numbers is generated based on master key;It includes: R=K_Random (Key)={ r that key, which is randomized formula,1,r2···rm};
Wherein, R indicates set of random numbers;K_Random indicates that key is randomized formula;Key indicates master key;rmIndicate random manifold
Random number in conjunction.Correspondingly, can be calculated based on treatment factors transformation for mula information to be processed and set of random numbers
Treatment factors are obtained, treatment factors transformation for mula includes: K=Com (Ch (X), R), wherein K indicates that treatment factors, Com indicate
Treatment factors transforming function transformation function, X indicate information to be processed, and R indicates set of random numbers.
Step S103: information to be processed is handled based on treatment factors, obtains processing result.
It is understood that the disclosure need to be handled information to be processed based on determining treatment factors, handled
As a result.Due to being handled based on treatment factors information to be processed, and the treatment factors determined are related to information to be processed, from
And a kind of encipher-decipher method of disclosure offer is provided, it is with a constant initial treatment factor pair information to be processed on surface
It is handled, really information to be processed is handled using different treatment factors, so that criminal is difficult to according to more
Group target process outcome is derived by the initial treatment factor of the disclosure, and safety is more preferable.
A kind of encipher-decipher method that the disclosure provides, obtains information to be processed;It is determined based on information to be processed to be processed
The treatment factors that information is encrypted or decrypted;Information to be processed is handled based on treatment factors, obtains processing result.This
A kind of open encipher-decipher method provided, needs to determine treatment factors based on information to be processed so that the treatment factors that determine and
Information to be processed is related, increases the complexity for the treatment of factors;At again based on determining treatment factors to information to be processed
Reason, increases the complexity of processing result, it is made to be not easy to be cracked, safety with higher.One kind that the disclosure provides adds
Decryption device, electronic equipment and computer readable storage medium also solve the problems, such as relevant art.
Referring to Fig. 2, Fig. 2 is a kind of second flow chart of encipher-decipher method shown according to an exemplary embodiment.
It is understood that in order to further enhance the complexity of entire method, and then enhance one kind that the disclosure provides
The safety of encipher-decipher method can repeatedly be handled an information to be processed according to the principle of the disclosure, until obtaining
Final target process outcome, namely information to be processed is handled based on treatment factors, after obtaining processing result, also
It can be executed with iteration and the treatment factors that information to be processed is encrypted or decrypted be determined based on information to be processed and based on processing
The step of factor pair information to be processed is handled, obtains processing result is until preset times, to obtain target process outcome;Its
In, each iterative step is the processing result of a preceding iterative step using information to be processed.It is understood that can be by
Come the method for realizing disclosure offer, then a kind of encipher-decipher method that the disclosure provides may comprise steps of circle logic:
Step S201: information to be processed is obtained.
Step S202: using information to be processed as currently processed information.
It is understood that currently processed information refers to current just in processed information, current not processed letter
Breath is not just currently processed information.
Step S203: the treatment factors that currently processed information is encrypted or decrypted are determined based on currently processed information.
Step S204: currently processed information is handled based on determining treatment factors, obtains currently processed information
It is currently processed as a result, using currently processed result as currently processed information.
Step S205: judge to determine whether the real-time determined number for the treatment of factors is equal to preset times, preset times are big
In the integer for being equal to 1, if it is not, then return step S203, if so, thening follow the steps S206.
It is understood that by the description of step S206 it is found that needing to work as when real-time determined number is equal to preset times
Pre-treatment information is as target process outcome, namely terminates this method, so in practical application scene, it can be by adjusting default
The value of number controls the cycle-index of entire method, so that the efficiency of entire algorithm and safety is reached a kind of balance.
Step S206: using currently processed information as target process outcome.
It is understood that the currently processed information that step S206 will also be obtained for the last time is tied as target processing
Fruit.It is understood that every wheel determines that algorithm used when treatment factors can be based on currently processed information in cyclic process
Same algorithm, or algorithm not of the same race etc..
In order to make it easy to understand, being A with information to be processed, the determination algorithm for the treatment of factors is f1 (x), wherein x is indicated wait locate
Information is managed, the algorithm handled information to be processed is f2 (x), for cycle-index namely preset times are 2, to this reality
Example is applied to be illustrated.Step S203 is executed, obtaining determining treatment factors is f1 (A), is denoted as B;Step S204 is executed, is worked as
Pre-treatment result is f2 (B), and currently processed information is also updated to f2 (B), at this point, determining that the real-time determined number for the treatment of factors is
1, less than the value 2 of preset times, return step S203;Determine that treatment factors are f1 (f2 (B)), are denoted as C at this time;Execute step
S204, obtaining currently processed result is f2 (C), and currently processed information is also updated to f2 (C);The real-time for the treatment of factors is determined at this time
Determined number is 2, and equal to the value 2 of preset times, currently processed information namely f2 (C) are exported to the target process outcome as A.
In order to which a kind of message encipher-decipher method further provided the disclosure is described, now in conjunction with concrete operation logic
The present embodiment is described in figure and algorithm.
It is understood that the process of encryption method and decryption method that the disclosure provides is essentially identical, only encryption side
Method and treatment factors applied by decryption method and the algorithm used in it are different, it is used this disclosure relates to encryption method reconciliation
Decryption method can share the identical logic device of set of parameter, only need to adjust number when realizing encryption method or decryption method
According to input direction, such as encryption when use positive sequence processing mode, plaintext is input to device from input gate;It is adopted when decryption
With backward processing mode, ciphertext is input to device etc. from out gate.Referring to Fig. 3, Fig. 3 adds solution for one kind shown in the disclosure
The encryption and decryption arithmetic logic figure of decryption method, K_Random (Key) indicate that key is randomized formula, and Com indicates that encryption method is answered
Encryption factor more new algorithm;Decryption factor more new algorithm applied by Com ' expression decipherment algorithm;F is indicated in encryption method
Round function used when being handled based on current updated treatment factors currently processed information, F are met: to arbitrary K,
If Y=F (X, K)=F (X ', X ", K), exists and disclose computable invertible function h and meet X '=h-1(Y), wherein X' is in the middle part of X
The bit information that quartile is set, and remember X '=Ch (X), i.e. after current state X is converted according to key K using round function, part ratio in X
The partial bit that spy is remained unchanged or is only transformed into Y using open function h;G indicates to update in decryption method based on current
The round function used when handling currently processed information for the treatment of factors afterwards, G and F meet identical relationship, i.e., to any
K, if X=G (Y, K)=G (Y', Y ", K), then Y '=h (X), wherein Y' is the bit information of portion in Y, and remember Y '=
Ch'(Y);P indicates that plaintext to be encrypted, C indicate ciphertext, XiIndicate intermediate operation data;R expression is generated random by master key
Manifold is closed;K indicates corresponding round key;R indicates preset times;X indicates the currently pending information in cyclic process.
Cryptographic calculation process can be with are as follows:
Formula K_Random is randomized according to key by master key Key and generates set of random numbers R;
Plaintext P is inputted, X is enabled0=P, operation:
For r=1to t
Kr=Comr(Ch(Xr-1),R)
Xr=F (Xr-1,Kr)
C=Xt。
Decrypting calculating process can be with are as follows:
Formula K_Random is randomized according to key by master key Key and generates set of random numbers R;
Ciphertext C is inputted, X is enabledt=C, operation:
For r=t to 1
Kr=Com'r(Ch′(Xr),R)
Xr-1=G (Xr,Kr)
P=X0。
By the operational process of above-mentioned Encryption Algorithm and decipherment algorithm it is found that round key is according to current input state XrWith by
The set of random numbers R that master key extension generates is generated jointly.K in ciphering processr=Comr(Ch(Xr-1), R), K in decrypting processr
=Com'r(Ch′(Xr), R), by function Ch, Ch (X known to the definition of Ch'r-1)=Ch'(Xr), or letter can be calculated in the presence of open
Number g meets Ch (Xr-1)=g (Ch'(Xr)), thus encryption round key KrWith decryption round key Kr' between exist disclose it is computable
Function g' meets Kr'=g'(Kr), i.e., the relationship between round key is corresponded in round key used in ciphering process and decrypting process
Be disclose it is confirmable;Therefore, it can decrypt round function G by selecting suitable encryption round function F and encryption round key generates
Function ComrWith decryption round key-function Com'rMake Xr=F (Xr-1,Kr) and Xr-1=G (Xr,Kr'), wherein Kr=Comr
(Xr-1,R),Kr'=Com'r(Xr, R), although the generating process of i.e. round key is related with state currently entered, but still can lead to
It crosses and suitable transforming function transformation function is selected to ensure that encryption and decryption is correct.
It is understood that even if selecting very simple key generation section part Com, Com', generated round key K1,
K2,…,KtAll have very big diversity, such as assume K_Random according to master key Key generate 16 random numbers, i.e. m=16,
Assuming that | Ch (X) |=8, i.e., the presence of 8 bit informations discloses computable functional relation, each wheel in the two-wheeled of front and back in ciphering process
Key KrBy according to this 8 bit information, by Com combination of function, this 16 random numbers are generated, it is assumed that and it is only simple linear combination,
Then each KrIn the presence ofKind is possible, and t wheel shares 12870tKind is possible, thus using extremely simple component Com,
The possibility quantity of round key caused by Com' is also extremely more, greatly improves algorithm security.
Referring to Fig. 4, Fig. 4 is a kind of first structure signal of ciphering and deciphering device shown according to an exemplary embodiment
Figure.
The disclosure provide a kind of ciphering and deciphering device 400, may include:
First obtains module 410, for obtaining information to be processed;
First determining module 420, for determining the place that information to be processed is encrypted or decrypted based on information to be processed
The factor is managed, treatment factors include encryption factor or decryption factor;
First processing module 430 obtains processing result for handling based on treatment factors information to be processed.
Referring to Fig. 5, Fig. 5 is a kind of the second structural representation of ciphering and deciphering device shown according to an exemplary embodiment
Figure.
The disclosure provide a kind of ciphering and deciphering device, can also include:
First circulation module 440 is based on treatment factors for first processing module 430 and handles information to be processed,
After obtaining processing result, iteration execute based on information to be processed determine processing that information to be processed is encrypted or decrypted because
Son and the step of handle to information to be processed based on treatment factors, obtain processing result until preset times, to obtain mesh
Mark processing result;
Wherein, each iterative step is the processing result of a preceding iterative step using information to be processed.
In a kind of ciphering and deciphering device that the disclosure provides, the first determining module may include:
First determination unit is handled for being converted based on information to be processed to pre-generated set of random numbers
The factor.
In a kind of ciphering and deciphering device that the disclosure provides, the first determination unit may include:
First obtains subelement, for obtaining master key;
First generation unit, for generating set of random numbers based on master key.
In a kind of ciphering and deciphering device that the disclosure provides, the first generation unit may include:
First generates subelement, generates set of random numbers for being based on master key using key randomization formula;
Key is randomized formula
R=K_Random (Key)={ r1,r2…rm};
Wherein, R indicates set of random numbers;K_Random indicates that key is randomized formula;Key indicates master key;rmIt indicates
Random number in set of random numbers.
In a kind of ciphering and deciphering device that the disclosure provides, the first determining module may include:
Second determination unit, for determining that algorithm is based on wait locate using encryption factor when treatment factors are encryption factor
Reason information determines encryption factor;
Third determination unit, for determining that algorithm is based on wait locate using decryption factor when treatment factors are decryption factor
Reason information determines decryption factor;
Wherein, encryption factor determines that algorithm and decryption factor determine that algorithm meets default transformational relation.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 6 is the block diagram according to a kind of electronic equipment 800 shown in an exemplary embodiment.As shown in fig. 6, the electronics is set
Standby 800 may include: processor 801, memory 802.The electronic equipment 800 can also include multimedia component 803, input/
Export one or more of (I/O) interface 804 and communication component 805.
Wherein, processor 801 is used to control the integrated operation of the electronic equipment 800, to complete above-mentioned encipher-decipher method
In all or part of the steps.Memory 802 is for storing various types of data to support the behaviour in the electronic equipment 800
To make, these data for example may include the instruction of any application or method for operating on the electronic equipment 800, with
And the relevant data of application program, such as contact data, the message of transmitting-receiving, picture, audio, video etc..The memory 802
It can be realized by any kind of volatibility or non-volatile memory device or their combination, such as static random-access is deposited
Reservoir (Static Random Access Memory, abbreviation SRAM), electrically erasable programmable read-only memory
(Electrically Erasable Programmable Read-Only Memory, abbreviation EEPROM), erasable programmable
Read-only memory (Erasable Programmable Read-Only Memory, abbreviation EPROM), programmable read only memory
(Programmable Read-Only Memory, abbreviation PROM), and read-only memory (Read-Only Memory, referred to as
ROM), magnetic memory, flash memory, disk or CD.Multimedia component 803 may include screen and audio component.Wherein
Screen for example can be touch screen, and audio component is used for output and/or input audio signal.For example, audio component may include
One microphone, microphone is for receiving external audio signal.The received audio signal can be further stored in storage
Device 802 is sent by communication component 805.Audio component further includes at least one loudspeaker, is used for output audio signal.I/O
Interface 804 provides interface between processor 801 and other interface modules, other above-mentioned interface modules can be keyboard, mouse,
Button etc..These buttons can be virtual push button or entity button.Communication component 805 is for the electronic equipment 800 and other
Wired or wireless communication is carried out between equipment.Wireless communication, such as Wi-Fi, bluetooth, near-field communication (Near Field
Communication, abbreviation NFC), 2G, 3G or 4G or they one or more of combination, therefore corresponding communication
Component 805 may include: Wi-Fi module, bluetooth module, NFC module.
In one exemplary embodiment, electronic equipment 800 can be by one or more application specific integrated circuit
(Application Specific Integrated Circuit, abbreviation ASIC), digital signal processor (Digital
Signal Processor, abbreviation DSP), digital signal processing appts (Digital Signal Processing Device,
Abbreviation DSPD), programmable logic device (Programmable Logic Device, abbreviation PLD), field programmable gate array
(Field Programmable Gate Array, abbreviation FPGA), controller, microcontroller, microprocessor or other electronics member
Part is realized, for executing above-mentioned encipher-decipher method.
In a further exemplary embodiment, a kind of computer readable storage medium including program instruction is additionally provided, it should
The step of above-mentioned encipher-decipher method is realized when program instruction is executed by processor.For example, the computer readable storage medium can
Think the above-mentioned memory 802 including program instruction, above procedure instruction can be executed by the processor 801 of electronic equipment 800 with
Complete above-mentioned encipher-decipher method.
Phase in a kind of message ciphering and deciphering device, electronic equipment and the computer readable storage medium that the embodiment of the present disclosure provides
The explanation for closing part refers to the detailed description of corresponding part in a kind of encipher-decipher method of embodiment of the present disclosure offer, herein not
It repeats again.In addition, the embodiment of the present disclosure provide above-mentioned technical proposal in correspond to technical solution realization principle in the prior art
Consistent part is simultaneously unspecified, in order to avoid excessively repeat.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one
Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation
There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain
Lid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
The foregoing description of the disclosed embodiments makes those skilled in the art can be realized or use the disclosure.To this
A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and the general principles defined herein can
Realized in other embodiments without departing from the spirit or the scope of the present disclosure.Therefore, the disclosure will not be limited
It is formed on the embodiments shown herein, and is to fit to consistent with the principles and novel features disclosed in this article widest
Range.
Claims (10)
1. a kind of encipher-decipher method characterized by comprising
Obtain information to be processed;
Determine the treatment factors that the information to be processed is encrypted or decrypted based on the information to be processed, the processing because
Attached bag includes encryption factor or decryption factor;
The information to be processed is handled based on the treatment factors, obtains processing result.
2. encipher-decipher method according to claim 1, which is characterized in that described to be based on the treatment factors to described wait locate
Reason information is handled, after obtaining processing result, further includes:
Iteration execute it is described determined based on the information to be processed processing that the information to be processed is encrypted or decrypted because
Son and described the step of being handled to the information to be processed based on the treatment factors, obtain processing result, are until default
Number, to obtain target process outcome;
Wherein, each iterative step is the processing result of a preceding iterative step using information to be processed.
3. encipher-decipher method according to claim 1, which is characterized in that described to be determined based on the information to be processed to institute
State the treatment factors that information to be processed is encrypted or decrypted, comprising:
Pre-generated set of random numbers is converted to obtain the treatment factors based on the information to be processed.
4. encipher-decipher method according to claim 3, which is characterized in that the method also includes:
Obtain master key;
The set of random numbers is generated based on the master key.
5. encipher-decipher method according to claim 4, which is characterized in that described described random based on master key generation
Manifold is closed, comprising:
The master key is based on using key randomization formula and generates set of random numbers;
The key is randomized formula
R=K_Random (Key)={ r1,r2…rm};
Wherein, R indicates the set of random numbers;K_Random indicates that the key is randomized formula;Key indicates that the master is close
Key;rmIndicate the random number in the set of random numbers.
6. encipher-decipher method according to any one of claims 1 to 5, which is characterized in that described to be based on the information to be processed
Determine the treatment factors that the information to be processed is encrypted or decrypted, comprising:
When the treatment factors are the encryption factor, determine that algorithm is determined based on the information to be processed using encryption factor
The encryption factor;
When the treatment factors are the decryption factor, determine that algorithm is determined based on the information to be processed using decryption factor
The decryption factor;
Wherein, the encryption factor determines that algorithm and the decryption factor determine that algorithm meets default transformational relation.
7. a kind of ciphering and deciphering device characterized by comprising
First obtains module, for obtaining information to be processed;
First determining module, for determining the place that the information to be processed is encrypted or decrypted based on the information to be processed
The factor is managed, the treatment factors include encryption factor or decryption factor;
First processing module obtains processing result for handling based on the treatment factors the information to be processed.
8. ciphering and deciphering device according to claim 7, which is characterized in that further include:
First circulation module, for the first processing module be based on the treatment factors to the information to be processed at
Reason, after obtaining processing result, iteration execution is described to add the information to be processed based on the information determination to be processed
Close or decryption treatment factors and it is described the information to be processed is handled based on the treatment factors, obtain processing knot
The step of fruit until preset times, to obtain target process outcome;
Wherein, each iterative step is the processing result of a preceding iterative step using information to be processed.
9. a kind of electronic equipment characterized by comprising
Memory, for storing computer program;
Processor, for executing the computer program in the memory, to realize described in any one of claim 1 to 6
The step of method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of any one of claim 1 to 6 the method is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811489017.2A CN109617681A (en) | 2018-12-06 | 2018-12-06 | Encryption and decryption method and device, electronic equipment, computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811489017.2A CN109617681A (en) | 2018-12-06 | 2018-12-06 | Encryption and decryption method and device, electronic equipment, computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109617681A true CN109617681A (en) | 2019-04-12 |
Family
ID=66006889
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811489017.2A Pending CN109617681A (en) | 2018-12-06 | 2018-12-06 | Encryption and decryption method and device, electronic equipment, computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109617681A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110768792A (en) * | 2019-09-30 | 2020-02-07 | 奇安信科技集团股份有限公司 | Master key generation method and device and encryption and decryption method of sensitive security parameters |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101340279A (en) * | 2008-07-09 | 2009-01-07 | 深圳市金蝶移动互联技术有限公司 | Method, system and apparatus for data ciphering and deciphering |
CN101478391A (en) * | 2009-01-13 | 2009-07-08 | 华中科技大学 | IP voice hidden communication method based on stream encryption |
CN102611550A (en) * | 2012-02-26 | 2012-07-25 | 光束(北京)国际工程技术研究院有限公司 | Method for encrypting data and method for transmitting encrypted data |
CN104618092A (en) * | 2015-01-05 | 2015-05-13 | 浪潮(北京)电子信息产业有限公司 | Information encryption method and system |
CN106506487A (en) * | 2016-11-03 | 2017-03-15 | 武汉斗鱼网络科技有限公司 | A kind of information Encrypt and Decrypt method and device |
CN106850221A (en) * | 2017-04-10 | 2017-06-13 | 四川阵风科技有限公司 | Information encryption and decryption method and device |
US20180123788A1 (en) * | 2016-10-28 | 2018-05-03 | Samsung Sds Co., Ltd. | Apparatus and method for encryption |
CN108123791A (en) * | 2017-12-26 | 2018-06-05 | 衡阳师范学院 | A kind of implementation method and device of lightweight block cipher SCS |
-
2018
- 2018-12-06 CN CN201811489017.2A patent/CN109617681A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101340279A (en) * | 2008-07-09 | 2009-01-07 | 深圳市金蝶移动互联技术有限公司 | Method, system and apparatus for data ciphering and deciphering |
CN101478391A (en) * | 2009-01-13 | 2009-07-08 | 华中科技大学 | IP voice hidden communication method based on stream encryption |
CN102611550A (en) * | 2012-02-26 | 2012-07-25 | 光束(北京)国际工程技术研究院有限公司 | Method for encrypting data and method for transmitting encrypted data |
CN104618092A (en) * | 2015-01-05 | 2015-05-13 | 浪潮(北京)电子信息产业有限公司 | Information encryption method and system |
US20180123788A1 (en) * | 2016-10-28 | 2018-05-03 | Samsung Sds Co., Ltd. | Apparatus and method for encryption |
CN106506487A (en) * | 2016-11-03 | 2017-03-15 | 武汉斗鱼网络科技有限公司 | A kind of information Encrypt and Decrypt method and device |
CN106850221A (en) * | 2017-04-10 | 2017-06-13 | 四川阵风科技有限公司 | Information encryption and decryption method and device |
CN108123791A (en) * | 2017-12-26 | 2018-06-05 | 衡阳师范学院 | A kind of implementation method and device of lightweight block cipher SCS |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110768792A (en) * | 2019-09-30 | 2020-02-07 | 奇安信科技集团股份有限公司 | Master key generation method and device and encryption and decryption method of sensitive security parameters |
CN110768792B (en) * | 2019-09-30 | 2023-09-05 | 奇安信科技集团股份有限公司 | Main key generation method, device and encryption and decryption method for sensitive security parameters |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Liu et al. | An efficient privacy-preserving outsourced calculation toolkit with multiple keys | |
CN106850221B (en) | Information encryption and decryption method and device | |
CN102016871B (en) | cryptographic system | |
EP2962185B1 (en) | Random number generator and stream cipher | |
CN105071937B (en) | Ciphertext policy ABE base encryption method with the revocation of efficient attribute | |
CN107690681B (en) | For integrated circuit data path confidentiality and its technology of extension | |
CN105207772B (en) | It safely exchanges the encryption method of message and realizes the equipment and system of this method | |
CN107017981A (en) | Hardware aids in quick pseudo random number generation | |
CN107070660A (en) | A kind of design Storage method of block chain encrypted radio-frequency chip | |
CN110222527A (en) | A kind of method for secret protection | |
CN109714368A (en) | Message encipher-decipher method, device, electronic equipment and computer readable storage medium | |
CN109361644A (en) | A kind of Fog property base encryption method for supporting fast search and decryption | |
CN105184115A (en) | Method For Including An Implicit Integrity Or Authenticity Check Into A White-box Implementation | |
EP3488553A1 (en) | Device and method for performing obfuscated arithmetic | |
CN109951456A (en) | Message encipher-decipher method, device, electronic equipment and computer readable storage medium | |
CN105723647A (en) | System for sharing a cryptographic key | |
CN109842488A (en) | For the key generation component in phy chip | |
CN105022937A (en) | Interface compatible approach for gluing white-box implementation to surrounding program | |
CN105978680A (en) | Implementing padding in a white-box implementation | |
CN110851112A (en) | Random bit generation method and device, electronic equipment and storage medium | |
CN109617681A (en) | Encryption and decryption method and device, electronic equipment, computer readable storage medium | |
CN109951273A (en) | A kind of SM4 algorithm whitepack implementation method and device | |
CN111901097B (en) | White box implementation method and device, electronic equipment and computer storage medium | |
CN107592963B (en) | Method and computing device for performing secure computations | |
CN105281893A (en) | Method for introducing dependence of white-box implementation on a set of strings |
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: 20190412 |