CN110378083A - A kind of Boolean obscures method and apparatus and computer readable storage medium - Google Patents

A kind of Boolean obscures method and apparatus and computer readable storage medium Download PDF

Info

Publication number
CN110378083A
CN110378083A CN201910508003.9A CN201910508003A CN110378083A CN 110378083 A CN110378083 A CN 110378083A CN 201910508003 A CN201910508003 A CN 201910508003A CN 110378083 A CN110378083 A CN 110378083A
Authority
CN
China
Prior art keywords
array
target
value
boolean
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910508003.9A
Other languages
Chinese (zh)
Other versions
CN110378083B (en
Inventor
陈钢
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910508003.9A priority Critical patent/CN110378083B/en
Publication of CN110378083A publication Critical patent/CN110378083A/en
Application granted granted Critical
Publication of CN110378083B publication Critical patent/CN110378083B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Processing (AREA)
  • Storage Device Security (AREA)

Abstract

What the embodiment of the present application provided a kind of Boolean obscures method and apparatus and computer readable storage medium, and applied to the system including transmitting terminal and receiving end, the transmitting terminal and the receiving end are preset with candidate array;This method comprises: the transmitting terminal obtains Boolean;The transmitting terminal determines the corresponding target array of Boolean from the candidate array;It include multiple candidate values in the target array;Multiple candidate values that the transmitting terminal includes according to the target array obtain target and obscure value;The target is obscured value and is sent to the receiving end by the transmitting terminal;The receiving end value determining target array from the candidate array is obscured according to the target;The receiving end determines the Boolean that the transmitting terminal is got according to the target array.To sum up, the application obscures Boolean in such a way that array is searched, so that Boolean of the more difficult decoding of interpolater to before obscuring, so that the more difficult Boolean to after obscuring is distorted.

Description

A kind of Boolean obscures method and apparatus and computer readable storage medium
Technical field
This application involves computer safety fields, obscure method and apparatus and computer more particularly to a kind of Boolean Readable storage medium storing program for executing.
Background technique
After distribution due to application program, interpolater can carry out decompiling to the application program to get the application The source code of program, in this way, interpolater can distort source code, so that there are network securitys is hidden for the application program Suffer from, and the equity of the developer of application program is damaged.Wherein, after transmitting terminal issues Boolean, interpolater is usual Boolean is intercepted, and Boolean is distorted, the Boolean after distorting is sent to receiving end, causes receiving end according to distorting Boolean afterwards executes corresponding operation.
Currently, being all to carry out Code obfuscation to Boolean, to increase the difficulty of decompiling.For example, if the Boolean is " 1 " can then set Boolean to " 5+3+2-6-3 ", in this way, Boolean is mixed by way of a kind of simple operation Confuse, interpolater is interfered.But inventor has found in the course of the research, due to only passing through simple operation in the prior art Boolean is obscured, and interpolater still can get Boolean by way of compiling optimization analysis, and to Boolean It is distorted, so that information security is still lower.
Summary of the invention
In view of the above problems, the embodiment of the present application provides a kind of obscuring method and apparatus and computer-readable depositing for Boolean Storage media, with solve the problems, such as Boolean be easy to be tampered and caused by information security it is lower.
According to the embodiment of the present application in a first aspect, provide a kind of Boolean obscures method, it is applied to include sending The system at end and receiving end, the transmitting terminal and the receiving end are preset with candidate array;The described method includes:
The transmitting terminal obtains Boolean;
The transmitting terminal determines the corresponding target array of the Boolean from the candidate array;In the target array Including multiple candidate values;
Multiple candidate values that the transmitting terminal includes according to the target array obtain target and obscure value;
The target is obscured value and is sent to the receiving end by the transmitting terminal;
The receiving end value determining target array from the candidate array is obscured according to the target;
The receiving end determines the Boolean that the transmitting terminal is got according to the target array.
According to the second aspect of the embodiment of the present application, a kind of acquisition methods of Boolean type are provided, are applied to transmitting terminal, The transmitting terminal is preset with candidate array;The described method includes:
Obtain Boolean;
The corresponding target array of the Boolean is determined from the candidate array;It include multiple times in the target array Select numerical value;
The multiple candidate values for including according to the target array obtain target and obscure value;
The target is obscured into value and is sent to receiving end.
It is optionally, described to determine the corresponding target array of the Boolean from the candidate array, comprising:
Obtain the corresponding Boolean type of the Boolean;
The target array is determined from the candidate array according to the Boolean type.
Optionally, the candidate array includes the corresponding true value array of true value type and the corresponding falsity number of falsity type Group;It is described that the target array is determined from the candidate array according to the Boolean type, comprising:
If the Boolean type is true value type, determine that the true value array is the target array;Alternatively, if the cloth Your type is falsity type, determines that the falsity array is the target array;
Wherein, multiple first candidate values for including in the true value array and include in the falsity array multiple the Two candidate values are all different.
Optionally, the multiple candidate values acquisition target for including according to the target array obscures value, comprising:
At least one candidate values is selected from multiple candidate values that the target array includes;To it is described at least one Candidate values carry out cryptographic calculation, obtain the target and obscure value;Alternatively,
At least one candidate values is obtained at random from multiple candidate values that the target array includes, using as described Target obscures value.
According to the third aspect of the embodiment of the present application, a kind of acquisition methods of Boolean type are provided, are applied to receiving end, The receiving end is preset with candidate array;The described method includes:
It receives the target that transmitting terminal is sent and obscures value;
Value determining target array from the candidate array is obscured according to the target;
According to the target array, the Boolean that the transmitting terminal is got is determined.
Optionally, the candidate array includes the corresponding true value array of true value type and the corresponding falsity number of falsity type Group, it is described that value determining target array from the candidate array is obscured according to the target, comprising:
Judge in the true value array whether to include that the target obscures value;
In the case where including that the target obscures value in the true value array, judge that the true value array is the mesh Mark array;
In the case where not including that the target obscures value in the true value array, and judge to wrap in the falsity array It includes in the case that the target obscures value, judges that the falsity array is the target array.
Optionally, value is obscured according to the target described before determining target array in the candidate array, is also wrapped It includes: value being obscured to the target, operation is decrypted, obtain candidate values;
It is described that value determining target array from the candidate array is obscured according to the target, comprising:
Target array is determined from the candidate array according to the candidate values.
According to the fourth aspect of the embodiment of the present application, provide a kind of Boolean obscures system, and the system comprises hairs Sending end and receiving end, the transmitting terminal and the receiving end are preset with candidate array;
Wherein, the transmitting terminal is used for: obtaining Boolean;The corresponding mesh of the Boolean is determined from the candidate array Mark array;It include multiple candidate values in the target array;It is obtained according to multiple candidate values that the target array includes Target obscures value;The target is obscured into value and is sent to the receiving end;
The receiving end is used for: obscuring value determining target array from the candidate array according to the target;According to institute Target array is stated, determines the Boolean that the transmitting terminal is got.
According to the 5th of the embodiment of the present application the aspect, a kind of obfuscator of Boolean is provided, transmitting terminal is set to, institute It states transmitting terminal and is preset with candidate array;Described device includes:
Boolean obtains module, for obtaining Boolean;
Target array determining module, for determining the corresponding target array of the Boolean from the candidate array;Institute Stating includes multiple candidate values in target array;
Obscure value and obtain module, multiple candidate values for including according to the target array obtain target and obscure value;
Sending module is sent to receiving end for the target to be obscured value.
Optionally, the target array determining module further comprises:
Boolean type acquisition submodule, for obtaining the corresponding Boolean type of the Boolean;
Target array determines submodule, for determining the number of targets from the candidate array according to the Boolean type Group.
Optionally, the candidate array includes the corresponding true value array of true value type and the corresponding falsity number of falsity type Group;If it is true value type that the target array, which determines that submodule is specifically used for the Boolean type, determine that the true value array is The target array;If determining that the falsity array is the number of targets alternatively, being falsity type for the Boolean type Group;
Wherein, multiple first candidate values for including in the true value array and include in the falsity array multiple the Two candidate values are all different.
Optionally, described to obscure value acquisition module specifically for selecting from multiple candidate values that the target array includes Select at least one candidate values;Cryptographic calculation is carried out at least one described candidate values, the target is obtained and obscures value;Or Person obtains at least one candidate values from multiple candidate values that the target array includes at random, using as the target Obscure value.
According to the 6th of the embodiment of the present application the aspect, a kind of obfuscator of Boolean is provided, receiving end is set to, institute It states receiving end and is preset with candidate array;Described device includes:
Obscure value receiving module, the target for receiving transmitting terminal transmission obscures value;
Value target array determining module is obscured, for obscuring value determining target from the candidate array according to the target Array;
Boolean determining module, for determining the Boolean that the transmitting terminal is got according to the target array.
Optionally, the candidate array includes the corresponding true value array of true value type and the corresponding falsity number of falsity type Group, described to obscure value target array determining module and further comprise:
Whether true value array obscures value judging submodule, for judging in the true value array to include that the target is obscured Value;
True value array judging submodule is sentenced in the case where for including that the target obscures value in the true value array The disconnected true value array out is the target array;
Falsity array judging submodule, in the case where for not including that the target obscures value in the true value array, And judge to include judging that the falsity array is the target in the case that the target obscures value in the falsity array Array.
Optionally, described device further include:
Deciphering module is decrypted operation for obscuring value to the target, obtains candidate values;
It is described to obscure value target array determining module specifically for true from the candidate array according to the candidate values Set the goal array.
According to the 7th of the embodiment of the present application aspect, provide a kind of obfuscator of Boolean, including processor and Memory, wherein
The processor executes the computer program code that the memory is stored, to realize boolean described herein The step of obscuring method of value.
According to the eighth aspect of the embodiment of the present application, a kind of computer readable storage medium is provided, the computer can It reads to store computer program on storage medium, the computer program realizes Boolean described herein when being executed by processor The step of obscuring method.
The embodiment of the present application includes the following advantages:
Transmitting terminal and receiving end are preset with candidate array in the embodiment of the present application;Transmitting terminal obtains Boolean;Transmitting terminal The corresponding target array of Boolean is determined from candidate array;It include multiple candidate values in target array;Transmitting terminal is according to mesh Multiple candidate values that mark array includes obtain target and obscure value;Target is obscured value and is sent to receiving end by transmitting terminal;Receiving end Value is obscured according to target, and target array is determined from candidate array;Receiving end determines what transmitting terminal was got according to target array Boolean.To sum up, the application obscures Boolean in such a way that array is searched, and obtains target and obscures value, relative to existing Have in technology, the result of simple operation is still practical Boolean 0 or 1 only for two kinds of results, and above-mentioned target obscures taking for value Value range is big, value possibility is more, makes the more difficult decoding of interpolater obscure value to above-mentioned target first and represents boolean's classification, even if Interpolater's decoding obscures value to above-mentioned target and represents boolean's classification, since the value that target obscures value is not limited to 0 or 1 two kind, In the case where no target obscures value and practical Boolean corresponding relationship, so that interpolater obscures value according to above-mentioned target, compared with Hardly possible decodes the practical Boolean to before obscuring, so that the more difficult Boolean to after obscuring is distorted, and then improves receiving end The accuracy of the Boolean got.
Detailed description of the invention
Fig. 1 is a kind of step flow chart for obscuring embodiment of the method for Boolean of the application;
Fig. 2 shows a kind of schematic diagrames for presetting true value array and falsity array of the application;
Fig. 3 is the step flow chart for obscuring method alternative embodiment of the first Boolean of the application;
Fig. 4 is the step flow chart for obscuring method alternative embodiment of second of Boolean of the application;
Fig. 5 is the step flow chart for obscuring method alternative embodiment of the third Boolean of the application;
Fig. 6 is a kind of structural block diagram for obscuring system embodiment of Boolean of the application;
Fig. 7 is a kind of structural block diagram of the obfuscator embodiment of Boolean of the application;
Fig. 8 is a kind of structural block diagram of the obfuscator alternative embodiment of Boolean of the application;
Fig. 9 is the structural block diagram of the obfuscator embodiment of another Boolean of the application;
Figure 10 is a kind of structural block diagram of the obfuscator alternative embodiment of Boolean of the application;
Figure 11 is a kind of structural block diagram of the obfuscator alternative embodiment of Boolean of the application;
Figure 12 is the hardware structural diagram of the obfuscator for the Boolean that the embodiment of the application provides.
Specific embodiment
In order to make the above objects, features, and advantages of the present application more apparent, with reference to the accompanying drawing and it is specific real Applying mode, the present application will be further described in detail.
The application is described in detail below in conjunction with specific embodiment.
Referring to Fig.1, a kind of step for obscuring embodiment of the method for obscuring method Boolean of Boolean of the application is shown Rapid flow chart, this method can be applied to include transmitting terminal and receiving end system, wherein the transmitting terminal can be terminal or clothes Business device, which may be terminal or server.
In addition, the application can also be applied to the electronic equipment including transmitting terminal and receiving end, at this point, the transmitting terminal and connecing Receiving end can be two functions in electronic equipment, i.e., the transmitting terminal is to send function, which is receiver function, the electronics Equipment can be server or terminal.
In the application, above-mentioned transmitting terminal and receiving end are preset with candidate array, and candidate's array is for characterizing Boolean It is falsity for true value or Boolean, the quantity of above-mentioned candidate's array can be set according to actual needs.Such as, above-mentioned candidate number Group can be two, respectively true value array and falsity array, wherein it is true value that true value array, which can be used for characterizing Boolean, It is falsity that falsity array, which can be used for characterizing Boolean,.
It can specifically include following steps:
Step 101, the transmitting terminal obtains Boolean.
In the embodiment of the present application, receiving end usually sends message to be verified to transmitting terminal, transmitting terminal receive it is above-mentioned After message to be verified, the actual conditions about the message to be verified are obtained, according to the actual conditions of the message to be verified, judgement should Message to be verified it is true and false, to obtain Boolean.
For example, if transmitting terminal is terminal, if receiving end is video server, if the message to be verified is that " transmitting terminal is corresponding The current environment of electronic equipment whether be safe condition ", then terminal is receiving the above-mentioned to be verified of video server transmission After information, the security parameter etc. of itself current environment is obtained, and the case where the security parameter got is designated as safe condition Under, the Boolean which gets is true value, in the case where the security parameter got is designated as precarious position, the terminal The Boolean got is falsity.Above-mentioned example is merely illustrative, and the application is not construed as limiting this.
In embodiments of the present invention, optionally, which can be "true" or "false", alternatively, can be indicated with " 1 " "true" indicates "false" with " 0 ", then, Boolean can also be " 1 " or " 0 ".In embodiments of the present invention, this is not limited specifically It is fixed.
For example, it is directed to above-mentioned example, if in the case that the security parameter that terminal is got is designated as safe condition, the terminal The Boolean got can be true value or be 1.In the case that if the security parameter that terminal is got is designated as precarious position, the end Hold the Boolean got that can be falsity or be 0.
Step 102, the transmitting terminal determines the corresponding target array of the Boolean from the candidate array.
It wherein, include multiple candidate values in the target array.Specifically, above-mentioned candidate values can be arbitrary number Value.In embodiments of the present invention, this is not especially limited.
In the present embodiment, which may include that the corresponding true value array of true value type and falsity type are corresponding Falsity array, and the multiple second candidate numbers for including in multiple first candidate values and falsity array for including in true value array Value is all different, that is to say, that any identical numerical value is not present between two arrays.It can be true value in above-mentioned Boolean In the case of, the true value array for characterizing true value type is determined as the corresponding target array of the Boolean;It is false in above-mentioned Boolean In the case where value, the falsity array for characterizing falsity type is determined as the corresponding target array of the Boolean.
Wherein, the true value array and the falsity array can construct in advance and be separately positioned on transmitting terminal and receiving end.Packet The system for including transmitting terminal and receiving end can also be including preprocessor etc., which can be used for pre-generated true value array With falsity array, and above-mentioned true value array and falsity array are arranged at transmitting terminal and receiving end.
For example, referring to shown in Fig. 2, a kind of Fig. 2 shows the application presets showing for true value array and falsity array It is intended to.Preprocessor can be random to generate true value array and falsity array of the element without intersection by random function etc. in Fig. 2, The true value array can be used for characterizing the Boolean of true value type, which can be used for characterizing the boolean of falsity type Value.Above-mentioned true value array and falsity array can be sent to transmitting terminal and receiving end by preprocessor, by transmitting terminal and reception End stores etc..
Illustratively, if the true value array truelist be [a1, a2 ..., an], the falsity array falselist be [b1, B2 ..., bm], m, n are positive integer, then multiple first candidate values include a1, a2 ..., an, multiple second candidate values packets B1, b2 ..., bm are included, at this point, the true value array for characterizing true value type can be to be somebody's turn to do in the case where above-mentioned Boolean is true value The corresponding target array of Boolean, in the case where above-mentioned Boolean is falsity, the falsity array of characterization falsity type can be The corresponding target array of the Boolean.
Step 103, multiple candidate values that the transmitting terminal includes according to the target array obtain target and obscure value.
In embodiments of the present invention, in the case where above-mentioned Boolean is true value, the true value array of characterization true value type can Think the corresponding target array of the Boolean;In the case where above-mentioned Boolean is falsity, the falsity array of falsity type is characterized It can be the corresponding target array of the Boolean.The multiple candidate values for including according to target array obtain target and obscure value, e.g., One or more candidate values can be randomly selected from above-mentioned target array, obscure value as target, alternatively, can be from above-mentioned One or more candidate values are randomly selected in target array, are carried out simple calculations etc., are obscured value etc. as target, increase The decoding difficulty of interpolater.In embodiments of the present invention, this is not especially limited.
In embodiments of the present invention, the multiple candidate values for including according to the target array obtain target and obscure Value, may include: to select at least one candidate values from multiple candidate values that the target array includes;To it is described at least One candidate values carries out cryptographic calculation, obtains the target and obscures value;Alternatively, the multiple candidates for including from the target array At least one candidate values is obtained in numerical value at random, to obscure value as the target.
Specifically, at least one candidate values first can be randomly selected from above-mentioned target array, to it is above-mentioned at least one Candidate values carry out cryptographic calculation, obtain target and obscure value, increase the decoding difficulty of interpolater.The cryptographic calculation may include one First cryptographic calculation or binary cryptographic calculation etc..Unitary cryptographic calculation may include: to take absolutely at least one above-mentioned candidate values It is worth, takes opposite number, take trigonometric function, negate the operations such as trigonometric function, logic NOT.Binary cryptographic calculation may include: with default Numerical value and at least one above-mentioned candidate values add, subtract, multiplication and division, power, evolution, logarithm, logic and logic or wait operations, It obtains target and obscures value.
For example, continuing to be illustrated by taking the example in step 102 as an example, the case where the target array is the true value array Under, at least one candidate values, such as a2 can be selected from true value array truelist, a2 can be taken to opposite number-a2, obtained Target obscures value;The target array be falsity array in the case where, can be randomly choosed from falsity array falselist to Bn can be taken opposite number-bn, obtain target and obscure value by few candidate values, such as bn.
The application can include multiple wait select to obtain at least one candidate values in numerical value at random from target array, with Value is obscured as target, in this way, increasing the decoding difficulty of interpolater.Illustratively, continue by taking the example in step 102 as an example into Row explanation can obtain candidate at random in the case where the target array is the true value array from true value array truelist Numerical value such as obscures value for a2 as target to obscure value as target;It, can in the case where the target array is falsity array To obtain candidate values at random from falsity array falselist, to obscure value as target, such as obscure bn as target Value.
In this way, can be obscured by the candidate values Boolean, so that interpolater is not easy to decode to before obscuring Boolean in the case where Boolean is true value, " 1 " is set by Boolean, in boolean in addition, due in the prior art In the case that value is falsity, " 0 " is set by Boolean, and after being obscured according to the acquisition of multiple candidate values in the application Boolean increases interpolater couple so that the target that transmitting terminal is sent in the next steps, which obscures value, has uncertainty Target obscures the decoding difficulty of value.
Step 104, the target is obscured value and is sent to the receiving end by the transmitting terminal.
In embodiments of the present invention, transmitting terminal and receiving end can communicate, and above-mentioned target is obscured value and sent out by transmitting terminal It send to receiving end.
Step 105, value determining target array from the candidate array is obscured according to the target in the receiving end.
Wherein, the candidate array of the receiving end and Sender side Storage is identical array, and therefore, this step can pass through true value Multiple second candidate values for including in multiple first candidate values and falsity array for including in array, determine the target Array.
Specifically, such as, if target obscures value and directly randomly selects to obtain from above-mentioned target array, if target is obscured Value is the first candidate values, and target array is true value array, if it is the second candidate values that target, which obscures value, target array is falsity Array.
Such as, for the example in step 103, if target is obscured value a2 and is directly obtained at random from true value array truelist It takes, then, receiving end judges to show that target obscures value a2 as the first candidate values, then, true value array is target array.
If it is also to have carried out cryptographic calculation after randomly selecting from above-mentioned target array that target, which obscures value,, above-mentioned Before step 105, it can also include: to obscure value to the target operation is decrypted, obtain candidate values;It is described according to Target obscures value and determines target array from the candidate array, may include: according to the candidate values from the candidate number Target array is determined in group.
That is, if it is also to have carried out cryptographic calculation after randomly selecting from above-mentioned target array that target, which obscures value, It needs first to obscure value to above-mentioned target and carries out decryption operation corresponding with above-mentioned cryptographic calculation, if the candidate number that decryption operation obtains Value is the first candidate values, then, target array is true value array, if the candidate values that decryption operation obtains are the second candidate number Value, target array are falsity array.Above-mentioned decryption operation can be the inverse operation with above-mentioned cryptographic calculation.
For example, continuing to be illustrated by taking the example in step 103 as an example, if it is from true value array that target, which obscures value-a2, In truelist at random obtain after carried out the cryptographic calculation for taking opposite number, then receiving end first to the target obscure value-a2 into Row takes the decryption operation of opposite number, obtains candidate values a2, receiving end judge to obtain candidate values a2 as the first candidate values, Then, true value array is target array.
Step 106, the receiving end determines the Boolean that the transmitting terminal is got according to the target array.
Wherein, since true value array corresponds to true value type, falsity array corresponds to falsity type, therefore, in the target array In the case where for true value array, it can determine that Boolean type is true value type, in the case where the target array is falsity array, It can determine that Boolean type is falsity type.
Using the above method, transmitting terminal and receiving end are preset with candidate array;Transmitting terminal obtains Boolean;Transmitting terminal from The corresponding target array of Boolean is determined in candidate array;It include multiple candidate values in target array;Transmitting terminal is according to target Multiple candidate values that array includes obtain target and obscure value;Target is obscured value and is sent to receiving end by transmitting terminal;Receiving end root Value is obscured according to target, and target array is determined from candidate array;Receiving end determines the cloth that transmitting terminal is got according to target array Value of.To sum up, the application obscures Boolean in such a way that array is searched, and obtains target and obscures value, relative to existing In technology, the result of simple operation is still practical Boolean 0 or 1 only for two kinds of results, and above-mentioned target obscures the value of value Range is big, value possibility is more, makes the more difficult decoding of interpolater obscure value to above-mentioned target first and represents boolean's classification, even if usurping The person's of changing decoding obscures value to above-mentioned target and represents boolean's classification, since the value that target obscures value is not limited to 0 or 1 two kind, In the case where there is no target to obscure value and practical Boolean corresponding relationship, so that interpolater obscures value according to above-mentioned target, it is more difficult to The practical Boolean before obscuring is decoded, so that the more difficult Boolean to after obscuring is distorted, and then receiving end is improved and obtains The accuracy for the Boolean got.
Referring to Fig. 3, show the first Boolean of the application obscure method Boolean obscure the optional implementation of method The step flow chart of example is applied to transmitting terminal, and in the application, above-mentioned transmitting terminal is preset with candidate array, which is used for Characterization Boolean is true value or Boolean is falsity, and the quantity of above-mentioned candidate's array can be set according to actual needs.Such as, Above-mentioned candidate's array can be two, can be respectively true value array and falsity array, wherein true value array can be used for characterizing Boolean is true value, and it is falsity that falsity array, which can be used for characterizing Boolean,.
It can specifically include following steps:
Step 201, Boolean is obtained.
Step 202, the corresponding target array of the Boolean is determined from the candidate array.
It wherein, include multiple candidate values in target array.
Step 203, the multiple candidate values for including according to the target array obtain target and obscure value.
Step 204, the target is obscured into value and is sent to receiving end.
In embodiments of the present invention, above-mentioned steps 201 to step 204 can be respectively corresponded referring to above-mentioned steps 101 to step Related record in rapid 104, and identical effect can be reached, in order to avoid repeating, details are not described herein again.
Referring to Fig. 4, show second of Boolean of the application obscure method Boolean obscure the optional implementation of method The step flow chart of example is applied to receiving end, and in the application, above-mentioned receiving end is preset with candidate array, which is used for Characterization Boolean is true value or Boolean is falsity, and the quantity of above-mentioned candidate's array can be set according to actual needs.Such as, Above-mentioned candidate's array can be two, can be respectively true value array and falsity array, wherein true value array can be used for characterizing Boolean is true value, and it is falsity that falsity array, which can be used for characterizing Boolean,.
It can specifically include following steps:
Step 301, it receives the target that transmitting terminal is sent and obscures value.
Wherein, it is that transmitting terminal is obscured according to what the multiple candidate values for including were got in target array which, which obscures value, Boolean afterwards.
Step 302, value determining target array from the candidate array is obscured according to the target.
Wherein, the candidate array of the receiving end and Sender side Storage is identical array, which includes true value type Corresponding true value array and the corresponding falsity array of falsity type, and multiple first candidate values for including in true value array and Multiple second candidate values for including in falsity array are all different, in this way, this step can be by including in true value array Multiple second candidate values for including in multiple first candidate values and falsity array, determine the target array.
Specifically, such as, if target obscures value and directly randomly selects to obtain from above-mentioned target array, if target is obscured Value is the first candidate values, and target array is true value array, if it is the second candidate values that target, which obscures value, target array is falsity Array.
Illustratively, if the true value array truelist be [a1, a2 ..., an], the falsity array falselist be [b1, B2 ..., bm], m, n are positive integer, then multiple first candidate values are a1, a2 ..., an, and multiple second candidate values are b1, B2 ..., bm, at this point, if target is obscured value and directly obtained at random from true value array truelist or falsity array falselist It takes, then, in the case where the target obscures value and belongs to the true value array, determines that the target array is the true value array, in the mesh Mark is obscured in the case that value belongs to falsity array, determines that the target array is the falsity array.
If it is also to have carried out cryptographic calculation after randomly selecting from above-mentioned target array that target, which obscures value,, above-mentioned Before step 302, it can also include: to obscure value to the target operation is decrypted, obtain candidate values;It is described according to Target obscures value and determines target array from the candidate array, may include: according to the candidate values from the candidate number Target array is determined in group.
That is, if it is also to have carried out cryptographic calculation after randomly selecting from above-mentioned target array that target, which obscures value, It needs first to obscure value to above-mentioned target and carries out decryption operation corresponding with above-mentioned cryptographic calculation, if the candidate number that decryption operation obtains Value is the first candidate values, then, target array is true value array, if the candidate values that decryption operation obtains are the second candidate number Value, target array are falsity array.Above-mentioned decryption operation can be the inverse operation with above-mentioned cryptographic calculation.
Step 303, according to the target array, the Boolean that the transmitting terminal is got is determined.
In embodiments of the present invention, above-mentioned steps 302 to step 303 can be respectively corresponded referring to above-mentioned steps 105 to step Related record in rapid 106, in order to avoid repeating, details are not described herein again.
Using the method for above-mentioned steps 301 to step 303, above-mentioned steps 105 can be reached to the identical effect in step 106 Fruit, in order to avoid repeating, details are not described herein again.
Referring to Fig. 5, show the third Boolean of the application obscure method Boolean obscure the optional implementation of method The step flow chart of example, this method are applied to the system including transmitting terminal and receiving end, and the transmitting terminal and receiving end are preset with Candidate array.Associated description about above system is referred to foregoing description, and in order to avoid repeating, details are not described herein again.Tool Body may include steps of:
Step 401, the transmitting terminal obtains Boolean.
In the embodiment of the present application, which is referred to above-mentioned steps 101 or the related of step 201 is recorded, in order to keep away Exempting from repetition, details are not described herein again.
Step 402, the transmitting terminal obtains the corresponding Boolean type of the Boolean.
In embodiments of the present invention, the corresponding Boolean type of Boolean specifically includes: true value type, falsity type.Continue It is illustrated so that above-mentioned information to be verified is " whether the current environment of the corresponding electronic equipment of transmitting terminal is safe condition " as an example, In the case where " current environment of the corresponding electronic equipment of transmitting terminal is safe condition ", the Boolean type of Boolean is true value Type, in the case where " current environment of the corresponding electronic equipment of transmitting terminal is precarious position ", the Boolean type of Boolean is Falsity type, above-mentioned example are merely illustrative, and the application is not construed as limiting this.
Step 403, the transmitting terminal determines the target array from the candidate array according to the Boolean type.
It wherein, include multiple candidate values in the target array.Specifically, above-mentioned candidate values can be arbitrary number Value.In embodiments of the present invention, this is not especially limited.
In the present embodiment, which may include that the corresponding true value array of true value type and falsity type are corresponding Falsity array, and the multiple second candidate numbers for including in multiple first candidate values and falsity array for including in true value array Value is all different, that is to say, that any identical numerical value is not present between two arrays.In this way, can include in Boolean type In the case where true value type, determine that the corresponding true value array of true value type is target array;It include falsity type in Boolean type In the case where, determine that the corresponding falsity array of falsity type is target array.
In addition, in order to enable receiving end and transmitting terminal can carry out the acquisition of Boolean type in such a way that array is searched, Receiving end in the application needs to receive the true value array and falsity array of preprocessor transmission, and stores true value array and falsity Array, similarly, transmitting terminal need to receive the true value array and falsity array of preprocessor transmission, and store true value array and vacation It is worth array.Specifically it is referred to above-mentioned Fig. 2 and the related record for Fig. 2.
Step 404, the transmitting terminal selects at least one candidate from multiple candidate values that the target array includes Numerical value;Cryptographic calculation is carried out at least one described candidate values, the target is obtained and obscures value;Alternatively, from the number of targets At least one candidate values is obtained at random in multiple candidate values that group includes, to obscure value as the target.
In embodiments of the present invention, it by carrying out cryptographic calculation at least one candidate values of selection, increases and distorts The decoding difficulty of person.Alternatively, obscuring value by obtaining target at random, the decoding difficulty of interpolater is increased, due to obtaining every time To target obscure value and may be all different followed so that interpolater is irregular.
In embodiments of the present invention, which is referred to above-mentioned steps 103 or the related of step 203 is recorded, in order to keep away Exempt to repeat, details are not described herein again.
Step 405, the target is obscured value and is sent to receiving end by the transmitting terminal.
In embodiments of the present invention, which is referred to above-mentioned steps 104 or the related of step 204 is recorded, in order to keep away Exempt to repeat, details are not described herein again.
In the present invention, in above-mentioned steps 404, if, from multiple candidate values that the target array includes with Machine obtains at least one candidate values, to obscure value as the target, then, and execution following step 406 to step 408, and Step 411.
In the present invention, in above-mentioned steps 404, if selected from multiple candidate values that the target array includes Select at least one candidate values;Cryptographic calculation is carried out at least one described candidate values, the target is obtained and obscures value, then, Following step 409 is executed to step 410 and step 411.
Step 406, the candidate array includes the corresponding true value array of true value type and the corresponding falsity number of falsity type Whether group, the receiving end judge in the true value array to include that the target obscures value.
Step 407, in the case where obscuring value including the target in the true value array, institute is judged in the receiving end Stating true value array is target array.
It step 408, does not include the target in the true value array in the case where obscure value, and the receiving end judges It out include judging that the falsity array is the target array in the case that the target obscures value in the falsity array.
In embodiments of the present invention, since above-mentioned target obscures value directly from multiple candidate values that target array is included It acquires at random, if including that above-mentioned target obscures value in true value array, true value array can be target array.If falsity It include that above-mentioned target obscures value in array, then, falsity array can be target array.
In embodiments of the present invention, optionally, do not obscure the feelings of value including target in true value array and falsity array Under condition, it is to distort value that receiving end, which determines that target obscures value,.
In embodiments of the present invention, since above-mentioned target obscures value directly from multiple candidate values that target array is included It acquires at random, and target array is any one in true value array or falsity array, if falsity array and true value number Do not include that above-mentioned target obscures value in group, then, illustrates that above-mentioned target is obscured value and distorted in transmission process by attacker, the mesh It is to distort value that mark, which obscures value,.
Step 409, the receiving end obscures value to the target operation is decrypted, and obtains candidate values.
Step 410, the receiving end determines target array from the candidate array according to the candidate value.
In embodiments of the present invention, if it is also to be added after randomly selecting from above-mentioned target array that target, which obscures value, Close operation needs first to obscure value to above-mentioned target carrying out decryption operation corresponding with above-mentioned cryptographic calculation, if decryption operation obtains Candidate values be the first candidate values, then, target array is true value array, if the obtained candidate values of decryption operation are second Candidate values, target array are falsity array.Above-mentioned decryption operation can be the inverse operation with above-mentioned cryptographic calculation.
In embodiments of the present invention, above-mentioned steps 409 to step 410 is referred in above-mentioned steps 105 or step 302 Related description, in order to avoid repeating, details are not described herein again.
In embodiments of the present invention, optionally, if not including that decryption operation obtains in falsity array and true value array Candidate values then equally illustrate that above-mentioned target is obscured value and distorted in transmission process by attacker, and it is to distort which, which obscures value, Value.
Step 411, the receiving end determines the Boolean that the transmitting terminal is got according to the target array.
In embodiments of the present invention, above-mentioned steps 411 are referred to the related record in above-mentioned steps 106, in order to avoid It repeats, details are not described herein again.
It obtains target by least one candidate values progress cryptographic calculation to selection using the above method and obscures value, Increase the decoding difficulty of interpolater.Alternatively, obscuring value by obtaining target at random, the decoding difficulty of interpolater is increased, by Obscuring value in the target got every time may be all different, and follow so that interpolater is irregular so that interpolater according to Above-mentioned target obscures value, it is more difficult to the practical Boolean to before obscuring is decoded, so that the more difficult Boolean to after obscuring is distorted, And then improve the accuracy for the Boolean that receiving end is got.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method It closes, but those skilled in the art should understand that, the embodiment of the present application is not limited by the described action sequence, because according to According to the embodiment of the present application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, and related movement not necessarily the application is implemented Necessary to example.
Referring to Fig. 6, a kind of structural block diagram for obscuring 60 embodiment of system of Boolean of the application, the system are shown 60 include transmitting terminal 61 and receiving end 62, and the transmitting terminal and the receiving end are preset with candidate array;
Wherein, the transmitting terminal 61 is used for: obtaining Boolean;Determine that the Boolean is corresponding from the candidate array Target array;It include multiple candidate values in the target array;It is obtained according to multiple candidate values that the target array includes Target is taken to obscure value;The target is obscured into value and is sent to the receiving end 62;
The receiving end 62 is used for: obscuring value determining target array from the candidate array according to the target;According to The target array determines the Boolean that the transmitting terminal 61 is got.
Using above system, above-mentioned steps 101 can be reached to the identical beneficial effect of step 106, in order to avoid repeating, Details are not described herein again.
Referring to Fig. 7, a kind of structural block diagram of 70 embodiment of obfuscator of Boolean of the application is shown, hair is set to Sending end, the transmitting terminal are preset with candidate array;The transmitting terminal can specifically include following module:
Boolean obtains module 71, for obtaining Boolean;
Target array determining module 72, for determining the corresponding target array of the Boolean from the candidate array; It include multiple candidate values in the target array;
Obscure value and obtain module 73, multiple candidate values for including according to the target array obtain target and obscure Value;
Sending module 74 is sent to receiving end for the target to be obscured value.
Referring to Fig. 8, in the alternative embodiment of the application, the target array determining module 72 further comprises:
Boolean type acquisition submodule 721, for obtaining the corresponding Boolean type of the Boolean;
Target array determines submodule 722, for determining the mesh from the candidate array according to the Boolean type Mark array.
In the alternative embodiment of the application, candidate's array includes the corresponding true value array of true value type and vacation The corresponding falsity array of Value Types;If it is true value class that the target array, which determines that submodule 722 is specifically used for the Boolean type, Type determines that the true value array is the target array;If alternatively, being used for the Boolean type for falsity type, described in determination Falsity array is the target array;
Wherein, multiple first candidate values for including in the true value array and include in the falsity array multiple the Two candidate values are all different.
In the alternative embodiment of the application, it is described obscure value and obtain module 73 be specifically used for from the target array Including multiple candidate values in select at least one candidate values;Cryptographic calculation is carried out at least one described candidate values, It obtains the target and obscures value;Alternatively, obtaining at least one time at random from multiple candidate values that the target array includes Numerical value is selected, to obscure value as the target.
Using above-mentioned apparatus, transmitting terminal is preset with candidate array;Transmitting terminal obtains Boolean;Transmitting terminal is from candidate array Determine the corresponding target array of Boolean;It include multiple candidate values in target array;Transmitting terminal includes according to target array Multiple candidate values obtain target and obscure value;Target is obscured value and is sent to receiving end by transmitting terminal.To sum up, the application passes through array The mode of lookup obscures Boolean, obtains target and obscures value, compared with the existing technology in, the result of simple operation is still For practical Boolean 0 or 1 only two kinds of results, the value range that above-mentioned target obscures value is big, value possibility is more, makes first The more difficult decoding of interpolater obscures value to above-mentioned target and represents boolean's classification, even if interpolater's decoding obscures value generation to above-mentioned target Table boolean's classification obscures value and practical Boolean in no target since the value that target obscures value is not limited to 0 or 1 two kind In the case where corresponding relationship, so that interpolater obscures value according to above-mentioned target, it is more difficult to the practical Boolean to before obscuring is decoded, from And the more difficult Boolean to after obscuring is distorted, and then improves the accuracy for the Boolean that receiving end is got.
Referring to Fig. 9, a kind of structural block diagram of 90 embodiment of obfuscator of Boolean of the application is shown, is set to and connects Receiving end, the receiving end are preset with candidate array;It can specifically include following module:
Obscure value receiving module 91, the target for receiving transmitting terminal transmission obscures value;
Value target array determining module 92 is obscured, for obscuring value determining mesh from the candidate array according to the target Mark array;
Boolean determining module 93, for determining the Boolean that the transmitting terminal is got according to the target array.
Referring to Fig.1 0, in the alternative embodiment of the application, candidate's array includes that true value type is corresponding true It is worth array and the corresponding falsity array of falsity type, described to obscure value target array determining module 92 and further comprise:
Whether true value array obscures value judging submodule 921, for judging in the true value array to include that the target is mixed Confuse value;
True value array judging submodule 922, in the case where for including that the target obscures value in the true value array, Judge that the true value array is the target array;
Falsity array judging submodule 923, for not including the case where that the target obscures value in the true value array Under, and judge to include in the case that the target obscures value, judging that the falsity array is described in the falsity array Target array.
Referring to Fig.1 1, in the alternative embodiment of the application, described device further include:
Deciphering module 94 is decrypted operation for obscuring value to the target, obtains candidate values;
It is described to obscure value target array determining module 92 and be specifically used for according to the candidate values from the candidate array Determine target array.
Using above-mentioned apparatus, receiving end is preset with candidate array;Receiving end according to target obscure value from candidate array really Set the goal array;Receiving end determines the Boolean that transmitting terminal is got according to target array.To sum up, the application is looked by array The mode looked for obscures Boolean, obtains target and obscures value, compared with the existing technology in, the result of simple operation is still Practical Boolean 0 or 1 is only for two kinds of results, and the value range that above-mentioned target obscures value is big, value possibility is more, makes first The more difficult decoding of interpolater obscures value to above-mentioned target and represents boolean's classification, even if interpolater, which decodes to above-mentioned target, obscures value representative Boolean's classification obscures value and practical Boolean pair in no target since the value that target obscures value is not limited to 0 or 1 two kind In the case where should being related to, so that interpolater obscures value according to above-mentioned target, it is more difficult to the practical Boolean to before obscuring is decoded, thus The more difficult Boolean to after obscuring is distorted, and then improves the accuracy for the Boolean that receiving end is got.
The embodiment of the present application also provides a kind of non-volatile readable storage medium, be stored in the storage medium one or Multiple modules (programs) when the one or more module is used in terminal device, can make the terminal device execute The instruction (instructions) of various method steps in the embodiment of the present application.
Figure 12 is the hardware structural diagram of the obfuscator for the Boolean that one embodiment of the application provides.Such as Figure 12 institute Show, the obfuscator of the Boolean of the present embodiment includes processor 121 and memory 122.
Processor 121 executes the computer program code that memory 122 is stored, and realizes Fig. 1 to Fig. 5 in above-described embodiment Boolean obscure method.
Memory 122 is configured as storing various types of words to support the operation for obscuring method in Boolean.This The example of a little words includes the instruction of any application or method for operating on the obfuscator of Boolean, such as disappears Breath, picture, video etc..Memory 122 may include random access memory (random access memory, abbreviation RAM), It may also further include nonvolatile memory (non-volatile memory), such as multiple magnetic disk storages.
Optionally, processor 121 is arranged in processing component 120.The obfuscator of the Boolean can also include: communication Component 123, power supply module 124, multimedia component 125, audio component 126, input/output interface 127 and/or sensor module 128.Component that the obfuscator of Boolean is specifically included etc. is set according to actual demand, and the present embodiment does not limit this.
The integrated operation of the usually obfuscator of control Boolean of processing component 120.Processing component 120 may include one Or multiple processors 121 execute instruction, to complete all or part of the steps of above-mentioned Fig. 1 to Fig. 5 method.In addition, processing group Part 120 may include one or more modules, convenient for the interaction between processing component 120 and other assemblies.For example, processing component 120 may include multi-media module, to facilitate the interaction between multimedia component 125 and processing component 120.
Power supply module 124 provides electric power for the various assemblies of the obfuscator of Boolean.Power supply module 124 may include electricity Management system, one or more power supplys and other with the obfuscator for Boolean to generate, manage, and distribute electric power associated Component.
Multimedia component 125 includes the display of one output interface of offer between the obfuscator and user of Boolean Screen.In some embodiments, display screen may include liquid crystal display (LCD) and touch panel (TP).If display screen includes Touch panel, display screen may be implemented as touch screen, to receive input signal from the user.Touch panel include one or Multiple touch sensors are to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touching It touches or the boundary of sliding action, but also detects duration and pressure associated with the touch or slide operation.
Audio component 126 is configured as output and/or input audio signal.For example, audio component 126 includes a Mike Wind (MIC).The received audio signal can be further stored in memory 122 or send via communication component 123.One In a little embodiments, audio component 126 further includes a loudspeaker, is used for output audio signal.
Input/output interface 127 provides interface, above-mentioned peripheral interface between processing component 120 and peripheral interface module Module can be click wheel, button etc..These buttons may include, but are not limited to: volume button, start button and locking press button.
Sensor module 128 includes one or more sensors, for providing various aspects for the obfuscator of Boolean Status assessment.For example, sensor module 128 can detecte the state that opens/closes of the obfuscator of Boolean, component Relative positioning, the existence or non-existence that user contacts with the obfuscator of Boolean.Sensor module 128 may include approaching biography Sensor is configured to detect the presence of nearby objects without any physical contact.In some embodiments, the sensing Device assembly 128 can also be including camera etc..
Communication component 123 is configured to facilitate wired or wireless way between the obfuscator of Boolean and other equipment Communication.The obfuscator of Boolean can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their group It closes.
From the foregoing, it will be observed that communication component 123, audio component 126 involved in Figure 12 embodiment and input/output connect Mouth 127, sensor module 128 can be used as the implementation of input equipment.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiments of the present application may be provided as method, apparatus or calculating Machine program product.Therefore, the embodiment of the present application can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present application can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present application is referring to according to the method for the embodiment of the present application, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable word processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable word processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable word processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded on computer or other programmable word processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although preferred embodiments of the embodiments of the present application have been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and all change and modification within the scope of the embodiments of the present application.
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 process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Method cloth and device and computer readable storage medium are obscured to a kind of Boolean provided herein above, It is described in detail, specific examples are used herein to illustrate the principle and implementation manner of the present application, the above reality The explanation for applying example is merely used to help understand the present processes and its core concept;Meanwhile for the general technology of this field Personnel, according to the thought of the application, there will be changes in the specific implementation manner and application range, in conclusion this theory Bright book content should not be construed as the limitation to the application.

Claims (17)

1. a kind of Boolean obscures method, which is characterized in that applied to the system including transmitting terminal and receiving end, the transmission End and the receiving end are preset with candidate array;The described method includes:
The transmitting terminal obtains Boolean;
The transmitting terminal determines the corresponding target array of the Boolean from the candidate array;Include in the target array Multiple candidate values;
Multiple candidate values that the transmitting terminal includes according to the target array obtain target and obscure value;
The target is obscured value and is sent to the receiving end by the transmitting terminal;
The receiving end value determining target array from the candidate array is obscured according to the target;
The receiving end determines the Boolean that the transmitting terminal is got according to the target array.
2. a kind of acquisition methods of Boolean type, which is characterized in that be applied to transmitting terminal, the transmitting terminal is preset with candidate number Group;The described method includes:
Obtain Boolean;
The corresponding target array of the Boolean is determined from the candidate array;It include multiple candidate numbers in the target array Value;
The multiple candidate values for including according to the target array obtain target and obscure value;
The target is obscured into value and is sent to receiving end.
3. according to the method described in claim 2, it is characterized in that, described determine the Boolean pair from the candidate array The target array answered, comprising:
Obtain the corresponding Boolean type of the Boolean;
The target array is determined from the candidate array according to the Boolean type.
4. according to the method described in claim 3, it is characterized in that, candidate's array includes the corresponding true value number of true value type Group falsity array corresponding with falsity type;It is described that the number of targets is determined from the candidate array according to the Boolean type Group, comprising:
If the Boolean type is true value type, determine that the true value array is the target array;Alternatively, if the Boolean Class Type is falsity type, determines that the falsity array is the target array;
Wherein, include in multiple first candidate values and the falsity array for including in the true value array multiple second wait Numerical value is selected to be all different.
5. according to the method described in claim 2, it is characterized in that, the multiple candidate numbers for including according to the target array Value obtains target and obscures value, comprising:
At least one candidate values is selected from multiple candidate values that the target array includes;To at least one described candidate Numerical value carries out cryptographic calculation, obtains the target and obscures value;Alternatively,
At least one candidate values is obtained at random from multiple candidate values that the target array includes, using as the target Obscure value.
6. a kind of acquisition methods of Boolean type, which is characterized in that be applied to receiving end, the receiving end is preset with candidate number Group;The described method includes:
It receives the target that transmitting terminal is sent and obscures value;
Value determining target array from the candidate array is obscured according to the target;
According to the target array, the Boolean that the transmitting terminal is got is determined.
7. according to the method described in claim 6, it is characterized in that, candidate's array includes the corresponding true value number of true value type Group falsity array corresponding with falsity type, it is described that value determining number of targets from the candidate array is obscured according to the target Group, comprising:
Judge in the true value array whether to include that the target obscures value;
In the case where including that the target obscures value in the true value array, judge that the true value array is the number of targets Group;
In the case where not including that the target obscures value in the true value array, and judge to include institute in the falsity array It states in the case that target obscures value, judges that the falsity array is the target array.
8. according to the method described in claim 6, it is characterized in that, obscuring value from the candidate number according to the target described In group before determining target array, further includes: obscure value to the target and operation is decrypted, obtain candidate values;
It is described that value determining target array from the candidate array is obscured according to the target, comprising:
Target array is determined from the candidate array according to the candidate values.
9. a kind of Boolean obscures system, which is characterized in that the system comprises transmitting terminal and receiving end, the transmitting terminal and The receiving end is preset with candidate array;
Wherein, the transmitting terminal is used for: obtaining Boolean;The corresponding number of targets of the Boolean is determined from the candidate array Group;It include multiple candidate values in the target array;Target is obtained according to multiple candidate values that the target array includes Obscure value;The target is obscured into value and is sent to the receiving end;
The receiving end is used for: obscuring value determining target array from the candidate array according to the target;According to the mesh Array is marked, determines the Boolean that the transmitting terminal is got.
10. a kind of obfuscator of Boolean, which is characterized in that be set to transmitting terminal, the transmitting terminal is preset with candidate array; Described device includes:
Boolean obtains module, for obtaining Boolean;
Target array determining module, for determining the corresponding target array of the Boolean from the candidate array;The mesh Marking includes multiple candidate values in array;
Obscure value and obtain module, multiple candidate values for including according to the target array obtain target and obscure value;
Sending module is sent to receiving end for the target to be obscured value.
11. device according to claim 10, which is characterized in that the target array determining module further comprises:
Boolean type acquisition submodule, for obtaining the corresponding Boolean type of the Boolean;
Target array determines submodule, for determining the target array from the candidate array according to the Boolean type.
12. device according to claim 11, which is characterized in that candidate's array includes the corresponding true value of true value type Array and the corresponding falsity array of falsity type;If it is true that the target array, which determines that submodule is specifically used for the Boolean type, Value Types determine that the true value array is the target array;If being determined alternatively, being falsity type for the Boolean type The falsity array is the target array;
Wherein, include in multiple first candidate values and the falsity array for including in the true value array multiple second wait Numerical value is selected to be all different.
13. device according to claim 10, which is characterized in that it is described obscure value and obtain module be specifically used for from the mesh At least one candidate values is selected in multiple candidate values that mark array includes;At least one described candidate values are encrypted Operation obtains the target and obscures value;Alternatively, obtaining at least one at random from multiple candidate values that the target array includes A candidate values, to obscure value as the target.
14. a kind of obfuscator of Boolean, which is characterized in that be set to receiving end, the receiving end is preset with candidate array; Described device includes:
Obscure value receiving module, the target for receiving transmitting terminal transmission obscures value;
Value target array determining module is obscured, for obscuring value determining number of targets from the candidate array according to the target Group;
Boolean determining module, for determining the Boolean that the transmitting terminal is got according to the target array.
15. device according to claim 14, which is characterized in that candidate's array includes the corresponding true value of true value type Array and the corresponding falsity array of falsity type, described to obscure value target array determining module and further comprise:
Whether true value array obscures value judging submodule, for judging in the true value array to include that the target obscures value;
True value array judging submodule is judged in the case where for including that the target obscures value in the true value array The true value array is the target array;
Falsity array judging submodule in the case where for not including that the target obscures value in the true value array, and is sentenced It include in the case that the target obscures value, judging that the falsity array is the number of targets in the disconnected falsity array out Group.
16. device according to claim 14, which is characterized in that described device further include:
Deciphering module is decrypted operation for obscuring value to the target, obtains candidate values;
It is described to obscure value target array determining module specifically for determining mesh from the candidate array according to the candidate values Mark array.
17. a kind of computer readable storage medium, which is characterized in that store computer journey on the computer readable storage medium Sequence, the computer program realize the step of obscuring method of Boolean as described in claim 1 when being executed by processor;Or Person realizes such as the step of obscuring method of the described in any item Booleans of claim 2 to 5;Or realize such as claim 6 to 8 The step of obscuring method of described in any item Booleans.
CN201910508003.9A 2019-06-12 2019-06-12 Boolean value confusion method and device and computer readable storage medium Active CN110378083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910508003.9A CN110378083B (en) 2019-06-12 2019-06-12 Boolean value confusion method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910508003.9A CN110378083B (en) 2019-06-12 2019-06-12 Boolean value confusion method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110378083A true CN110378083A (en) 2019-10-25
CN110378083B CN110378083B (en) 2021-03-12

Family

ID=68250196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910508003.9A Active CN110378083B (en) 2019-06-12 2019-06-12 Boolean value confusion method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110378083B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102132289A (en) * 2008-08-21 2011-07-20 汤姆森特许公司 Method and device for code obfuscation
CN102460404A (en) * 2009-06-01 2012-05-16 起元技术有限责任公司 Generating obfuscated data
US20120210303A1 (en) * 2008-06-06 2012-08-16 Apple Inc. System and method for revising boolean and arithmetic operations
US20180006804A1 (en) * 2016-06-30 2018-01-04 Michael Stephen Fiske Clock Computing Machines
CN108023724A (en) * 2016-11-04 2018-05-11 北京展讯高科通信技术有限公司 Data transmission method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120210303A1 (en) * 2008-06-06 2012-08-16 Apple Inc. System and method for revising boolean and arithmetic operations
CN102132289A (en) * 2008-08-21 2011-07-20 汤姆森特许公司 Method and device for code obfuscation
CN102460404A (en) * 2009-06-01 2012-05-16 起元技术有限责任公司 Generating obfuscated data
US20180006804A1 (en) * 2016-06-30 2018-01-04 Michael Stephen Fiske Clock Computing Machines
CN108023724A (en) * 2016-11-04 2018-05-11 北京展讯高科通信技术有限公司 Data transmission method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
罗宏 等: "用于软件保护的代码混淆技术", 《计算机工程》 *

Also Published As

Publication number Publication date
CN110378083B (en) 2021-03-12

Similar Documents

Publication Publication Date Title
Sikder et al. A survey on sensor-based threats to internet-of-things (iot) devices and applications
JP6814147B2 (en) Terminals, methods, non-volatile storage media
CN112287372B (en) Method and apparatus for protecting clipboard privacy
Matyunin et al. Magneticspy: Exploiting magnetometer in mobile devices for website and application fingerprinting
US8683563B1 (en) Soft token posture assessment
CN104317648B (en) A kind of method and apparatus of monitoring advertisement
CN104636142B (en) A kind of information processing method and electronic equipment
CN105141899A (en) Interactive method and interactive system of old-age service robot
Bukasa et al. How TrustZone could be bypassed: Side-channel attacks on a modern system-on-chip
JP2015510295A (en) Prevention of pattern recognition in electronic codebook encryption
CN112073444B (en) Data set processing method and device and server
Luo et al. A data hiding approach for sensitive smartphone data
CN108900553A (en) A kind of communication means, device and computer readable storage medium
CN104113588A (en) Updating method and apparatus of internet yellow page
CN108282451A (en) Hijacking data judgment method, device and user terminal
CN109255249A (en) Image generating method, device, image display method, device and storage medium
CN106856497A (en) The binding method and device of a kind of mobile device and accessory
CN105373715A (en) Wearable device based data access method and apparatus
CN104917752B (en) A kind of method for detecting abnormality and system based on communication
CN108984417A (en) Method for testing software, device, terminal and storage medium
CN110378083A (en) A kind of Boolean obscures method and apparatus and computer readable storage medium
CN106095781A (en) Malicious websites recognition methods and device
CN106951242A (en) A kind of generation method, equipment and the computing device of validating vulnerability program
CN108200058B (en) Chat encryption method and device, electronic terminal and readable storage medium
CN110245523A (en) A kind of data verification method, system and device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant