CN110378083B - Boolean value confusion method and device and computer readable storage medium - Google Patents

Boolean value confusion method and device and computer readable storage medium Download PDF

Info

Publication number
CN110378083B
CN110378083B CN201910508003.9A CN201910508003A CN110378083B CN 110378083 B CN110378083 B CN 110378083B CN 201910508003 A CN201910508003 A CN 201910508003A CN 110378083 B CN110378083 B CN 110378083B
Authority
CN
China
Prior art keywords
value
array
target
candidate
boolean
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.)
Active
Application number
CN201910508003.9A
Other languages
Chinese (zh)
Other versions
CN110378083A (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

Images

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)
  • Storage Device Security (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the application provides a Boolean value confusion method and device and a computer readable storage medium, which are applied to a system comprising a sending end and a receiving end, wherein candidate arrays are preset at the sending end and the receiving end; the method comprises the following steps: the sending end obtains a Boolean value; the transmitting end determines a target array corresponding to the Boolean value from the candidate arrays; the target array comprises a plurality of candidate values; the sending end obtains a target confusion value according to a plurality of candidate values included by the target array; the sending end sends the target confusion value to the receiving end; the receiving end determines a target array from the candidate arrays according to the target confusion value; and the receiving end determines the Boolean value acquired by the transmitting end according to the target array. In summary, the boolean value is obfuscated by an array search method, so that a falsifier is difficult to decipher the boolean value before obfuscation, and the falsified boolean value is difficult to be tampered.

Description

Boolean value confusion method and device and computer readable storage medium
Technical Field
The present application relates to the field of computer security, and in particular, to a boolean obfuscation method and apparatus, and a computer-readable storage medium.
Background
After the application program is released, a falsifier can perform decompiling on the application program so as to obtain the source code of the application program, and thus the falsifier can perform falsification on the source code, so that the application program has network security hidden danger and the rights and interests of a developer of the application program are damaged. After the sending end sends out the boolean value, a falsifier usually intercepts the boolean value, falsifies the boolean value, and sends the falsified boolean value to the receiving end, so that the receiving end executes corresponding operations according to the falsified boolean value.
At present, Boolean values are all subjected to code obfuscation to increase the difficulty of decompilation. For example, if the boolean value is "1", the boolean value may be set to "5 +3+ 2-6-3", which confuses the boolean value by a simple operation, thus disturbing a falsifier. However, in the research process, the inventor finds that in the prior art, only simple operation is used for obfuscating the boolean value, and a falsifier can still obtain the boolean value by compiling, optimizing and analyzing and falsifie the boolean value, so that the information security is still low.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present application provide a method and an apparatus for obfuscating a boolean value, and a computer-readable storage medium, so as to solve the problem that the boolean value is easily tampered with, resulting in low information security.
According to a first aspect of the embodiments of the present application, a boolean confusion method is provided, which is applied to a system including a transmitting end and a receiving end, where both the transmitting end and the receiving end have a preset candidate array; the method comprises the following steps:
the sending end obtains a Boolean value;
the transmitting end determines a target array corresponding to the Boolean value from the candidate arrays; the target array comprises a plurality of candidate values;
the sending end obtains a target confusion value according to a plurality of candidate values included by the target array;
the sending end sends the target confusion value to the receiving end;
the receiving end determines a target array from the candidate arrays according to the target confusion value;
and the receiving end determines the Boolean value acquired by the transmitting end according to the target array.
According to a second aspect of the embodiments of the present application, a boolean acquisition method is provided, which is applied to a sending end, where the sending end has a candidate array in advance; the method comprises the following steps:
obtaining a Boolean value;
determining a target array corresponding to the Boolean value from the candidate arrays; the target array comprises a plurality of candidate values;
obtaining a target confusion value according to a plurality of candidate values included in the target array;
and sending the target confusion value to a receiving end.
Optionally, the determining a target array corresponding to the boolean value from the candidate arrays includes:
acquiring a Boolean type corresponding to the Boolean value;
and determining the target array from the candidate arrays according to the Boolean type.
Optionally, the candidate arrays include a true value array corresponding to the true value type and a false value array corresponding to the false value type; the determining the target array from the candidate arrays according to the Boolean type includes:
if the Boolean type is a truth value type, determining that the truth value array is the target array; or if the Boolean type is a false value type, determining that the false value array is the target array;
wherein a plurality of first candidate values included in the true value array are different from a plurality of second candidate values included in the false value array.
Optionally, the obtaining a target confusion value according to a plurality of candidate values included in the target array includes:
selecting at least one candidate value from a plurality of candidate values included in the target array; carrying out encryption operation on the at least one candidate value to obtain the target confusion value; alternatively, the first and second electrodes may be,
randomly obtaining at least one candidate value from a plurality of candidate values included in the target array as the target obfuscation value.
According to a third aspect of the embodiments of the present application, a boolean acquisition method is provided, which is applied to a receiving end, where the receiving end has a candidate array in advance; the method comprises the following steps:
receiving a target confusion value sent by a sending end;
determining a target array from the candidate arrays according to the target confusion value;
and determining the Boolean value obtained by the sending end according to the target array.
Optionally, the determining the target array from the candidate array according to the target confusion value includes:
judging whether the truth value array comprises the target confusion value or not;
under the condition that the truth value array comprises the target confusion value, judging that the truth value array is the target array;
and under the condition that the target confusion value is not included in the true value array and the condition that the target confusion value is included in the false value array, judging that the false value array is the target array.
Optionally, before the determining the target array from the candidate arrays according to the target confusion value, the method further includes: carrying out decryption operation on the target confusion value to obtain a candidate value;
the determining a target array from the candidate arrays according to the target confusion value comprises:
and determining a target array from the candidate arrays according to the candidate values.
According to a fourth aspect of the embodiments of the present application, a boolean confusion system is provided, where the system includes a transmitting end and a receiving end, where both the transmitting end and the receiving end have preset candidate arrays;
wherein the sending end is configured to: obtaining a Boolean value; determining a target array corresponding to the Boolean value from the candidate arrays; the target array comprises a plurality of candidate values; obtaining a target confusion value according to a plurality of candidate values included in the target array; sending the target confusion value to the receiving end;
the receiving end is used for: determining a target array from the candidate arrays according to the target confusion value; and determining the Boolean value obtained by the sending end according to the target array.
According to a fifth aspect of the embodiments of the present application, there is provided a boolean value confusion apparatus, which is disposed at a sending end, where the sending end is preset with a candidate array; the device comprises:
the Boolean value acquisition module is used for acquiring Boolean values;
a target array determining module, configured to determine a target array corresponding to the boolean value from the candidate arrays; the target array comprises a plurality of candidate values;
the confusion value acquisition module is used for acquiring a target confusion value according to a plurality of candidate values included in the target array;
and the sending module is used for sending the target confusion value to a receiving end.
Optionally, the target array determining module further includes:
the Boolean type acquisition submodule is used for acquiring a Boolean type corresponding to the Boolean value;
and the target array determining submodule is used for determining the target array from the candidate arrays according to the Boolean type.
Optionally, the candidate arrays include a true value array corresponding to the true value type and a false value array corresponding to the false value type; the target array determining submodule is specifically configured to determine that the truth array is the target array if the boolean type is the truth type; or, if the boolean type is a false value type, determining that the false value array is the target array;
wherein a plurality of first candidate values included in the true value array are different from a plurality of second candidate values included in the false value array.
Optionally, the confusion value obtaining module is specifically configured to select at least one candidate value from a plurality of candidate values included in the target array; carrying out encryption operation on the at least one candidate value to obtain the target confusion value; or randomly acquiring at least one candidate value from a plurality of candidate values included in the target array to serve as the target confusion value.
According to a sixth aspect of the embodiments of the present application, there is provided a boolean confusion apparatus, which is disposed at a receiving end, where the receiving end has a candidate array preset; the device comprises:
the confusion value receiving module is used for receiving a target confusion value sent by the sending end;
a confusion value target array determination module, configured to determine a target array from the candidate arrays according to the target confusion value;
and the Boolean value determining module is used for determining the Boolean value acquired by the transmitting end according to the target array.
Optionally, the candidate arrays include a true array corresponding to the true type and a false array corresponding to the false type, and the confusion value target array determining module further includes:
a true value array confusion value judgment submodule for judging whether the true value array comprises the target confusion value;
a true value array judgment submodule, configured to judge that the true value array is the target array when the true value array includes the target confusion value;
and the false value array judgment submodule is used for judging that the false value array is the target array under the condition that the true value array does not comprise the target confusion value and under the condition that the false value array comprises the target confusion value.
Optionally, the apparatus further comprises:
the decryption module is used for carrying out decryption operation on the target confusion value to obtain a candidate value;
the confusion value target array determination module is specifically configured to determine a target array from the candidate arrays according to the candidate values.
According to a seventh aspect of the embodiments of the present application, there is provided a boolean obfuscation apparatus, including a processor and a memory, wherein,
the processor executes the computer program code stored in the memory to implement the steps of the boolean obfuscation method described herein.
According to an eighth aspect of embodiments herein, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the boolean obfuscation method described herein.
The embodiment of the application has the following advantages:
in the embodiment of the application, candidate arrays are preset at a sending end and a receiving end; a sending end obtains a Boolean value; the transmitting end determines a target array corresponding to the Boolean value from the candidate arrays; the target array comprises a plurality of candidate values; the sending end obtains a target confusion value according to a plurality of candidate values included by the target array; the sending end sends the target confusion value to the receiving end; the receiving end determines a target array from the candidate arrays according to the target confusion value; and the receiving end determines the Boolean value obtained by the sending end according to the target array. In summary, the boolean value is obfuscated by an array lookup to obtain the target obfuscated value, and compared with the prior art that a simple operation result is still an actual boolean value 0 or 1, the target obfuscated value has a large value range and a high value possibility, so that a falsifier is difficult to decipher the target obfuscated value to represent the boolean category, and even if the falsifier deciphers the target obfuscated value to represent the boolean category, because the value of the target obfuscated value is not limited to 0 or 1, the falsifier is difficult to decipher the actual boolean value before the obfuscated value according to the target obfuscated value under the condition that there is no corresponding relationship between the target obfuscated value and the actual boolean value, and thus the accuracy of the boolean value obtained by the receiving end is improved.
Drawings
FIG. 1 is a flow chart of steps of one Boolean obfuscation method embodiment of the present application;
FIG. 2 is a diagram illustrating a preset truth value array and false value array according to the present application;
FIG. 3 is a flow chart of steps of a first alternative embodiment of a Boolean obfuscation method of the present application;
FIG. 4 is a flow chart of steps in an alternative embodiment of a second Boolean obfuscation method of the present application;
FIG. 5 is a flow chart of steps in an alternative embodiment of a third Boolean obfuscation method of the present application;
FIG. 6 is a block diagram of a Boolean obfuscation system embodiment of the present application;
FIG. 7 is a block diagram of a Boolean obfuscator embodiment of the present application;
FIG. 8 is a block diagram of an alternative embodiment of a Boolean obfuscator of the present application;
FIG. 9 is a block diagram of an alternate Boolean obfuscator embodiment of the present application;
FIG. 10 is a block diagram of an alternative embodiment of a Boolean obfuscator of the present application;
FIG. 11 is a block diagram of an alternative embodiment of a Boolean obfuscator of the present application;
fig. 12 is a schematic hardware structure diagram of a boolean obfuscation apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
The present application will be described in detail with reference to specific examples.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a boolean obfuscation method according to the present application is shown, where the method may be applied to a system including a sending end and a receiving end, where the sending end may be a terminal or a server, and the receiving end may also be a terminal or a server.
In addition, the present application may also be applied to an electronic device including a sending end and a receiving end, where the sending end and the receiving end may be two functions in the electronic device, that is, the sending end is a sending function, the receiving end is a receiving function, and the electronic device may be a server or a terminal.
In the application, the sending end and the receiving end are both preset with candidate arrays, the candidate arrays are used for representing that the boolean value is a true value or the boolean value is a false value, and the number of the candidate arrays can be set according to actual needs. For example, the candidate arrays may be two, namely a true value array and a false value array, where the true value array may be used to represent the boolean value as a true value, and the false value array may be used to represent the boolean value as a false value.
The method specifically comprises the following steps:
step 101, the sending end obtains a boolean value.
In the embodiment of the application, a receiving end generally sends a message to be verified to a sending end, the sending end obtains the actual situation of the message to be verified after receiving the message to be verified, and the authenticity of the message to be verified is judged according to the actual situation of the message to be verified so as to obtain the boolean value.
For example, if the sending end is a terminal, if the receiving end is a video server, if the message to be verified is "whether the current environment of the electronic device corresponding to the sending end is in a safe state", the terminal acquires the safety parameters and the like of the current environment of the terminal after receiving the message to be verified sent by the video server, and if the acquired safety parameters indicate that the message is in the safe state, the boolean value acquired by the terminal is a true value, and if the acquired safety parameters indicate that the message is in a dangerous state, the boolean value acquired by the terminal is a false value. The above examples are merely illustrative, and the present application is not limited thereto.
In the embodiment of the present invention, the boolean value may be "true" or "false", or "1" may be used to indicate "true" and "0" may be used to indicate "false", and then the boolean value may also be "1" or "0". In the embodiment of the present invention, this is not particularly limited.
For example, for the above example, if the security parameter acquired by the terminal indicates a security state, the boolean value acquired by the terminal may be a true value or 1. If the security parameter acquired by the terminal indicates a dangerous state, the boolean value acquired by the terminal may be a false value or 0.
And 102, the transmitting end determines a target array corresponding to the Boolean value from the candidate arrays.
Wherein the target array comprises a plurality of candidate values. Specifically, the candidate value may be any value. In the embodiment of the present invention, this is not particularly limited.
In this embodiment, the candidate arrays may include a true value array corresponding to the true value type and a false value array corresponding to the false value type, and a plurality of first candidate values included in the true value array and a plurality of second candidate values included in the false value array are different, that is, there is no same value between the two arrays. Determining a truth value array representing a truth value type as a target array corresponding to the boolean value under the condition that the boolean value is a true value; and determining a false value array representing the false value type as a target array corresponding to the Boolean value when the Boolean value is the false value.
The true value array and the false value array may be pre-constructed and respectively set at the transmitting end and the receiving end. The system including the transmitting end and the receiving end may further include a preprocessor, and the preprocessor may be configured to generate a true value array and a false value array in advance, and set both the true value array and the false value array at the transmitting end and the receiving end.
For example, referring to fig. 2, fig. 2 shows a schematic diagram of presetting a true value array and a false value array according to the present application. The preprocessor in fig. 2 may randomly generate a true value array and a false value array of the non-intersecting elements by a random function or the like, the true value array may be used to characterize a boolean value of a true value type, and the false value array may be used to characterize a boolean value of a false value type. The preprocessor can send the true value array and the false value array to the sending end and the receiving end, and the sending end and the receiving end store the true value array and the false value array.
For example, if the true value array truelist is [ a1, a2, …, an ], the false value array falselist is [ b1, b2, …, bm ], m and n are positive integers, the first candidate values include a1, a2, …, an, and the second candidate values include b1, b2, …, bm, where in case that the boolean value is a true value, the true value array characterizing the true value type may be the target array corresponding to the boolean value, and in case that the boolean value is a false value, the false value array characterizing the false value type may be the target array corresponding to the boolean value.
And 103, the sending end acquires a target confusion value according to a plurality of candidate values included in the target array.
In the embodiment of the present invention, in the case that the boolean value is a true value, the true value array representing the true value type may be a target array corresponding to the boolean value; in the case that the boolean value is a false value, the false value array representing the false value type may be a target array corresponding to the boolean value. The target obfuscation value is obtained according to a plurality of candidate values included in the target array, for example, one or more candidate values may be randomly selected from the target array to serve as the target obfuscation value, or one or more candidate values may be randomly selected from the target array to perform simple operations and the like to serve as the target obfuscation value and the like, so that the decoding difficulty of a falsifier is increased. In the embodiment of the present invention, this is not particularly limited.
In this embodiment of the present invention, the obtaining a target confusion value according to a plurality of candidate values included in the target array may include: selecting at least one candidate value from a plurality of candidate values included in the target array; carrying out encryption operation on the at least one candidate value to obtain the target confusion value; or randomly acquiring at least one candidate value from a plurality of candidate values included in the target array to serve as the target confusion value.
Specifically, at least one candidate value may be randomly selected from the target array, and the at least one candidate value may be encrypted to obtain a target confusion value, thereby increasing the decoding difficulty of a falsifier. The encryption operation may include a unary encryption operation or a binary encryption operation, etc. The unary encryption operation may include: and performing arithmetic such as absolute value taking, inverse number taking, trigonometric function taking, inverse trigonometric function taking and logical inequality on the at least one candidate value. The binary encryption operation may include: and performing addition, subtraction, multiplication, division, power, evolution, logarithm, logical AND, logical OR and other operations on the preset value and the at least one candidate value to obtain a target confusion value.
For example, continuing with the example in step 102, in the case that the target array is the truth array, at least one candidate value may be selected from the truth array truelist, such as a2, and a2 may be inverted-a 2 to obtain a target confusion value; in the case that the target array is a false value array, at least one candidate value, such as bn, may be randomly selected from the false value array false, and the target confusion value may be obtained by taking the inverse of bn.
According to the method and the device, at least one candidate value can be randomly obtained from a plurality of values to be selected included in the target array to serve as the target confusion value, so that the decoding difficulty of a falsifier is increased. Illustratively, continuing with the example in step 102 as an example, in the case that the target array is the truth array, a candidate value may be randomly obtained from the truth array truelist as a target obfuscation value, such as a2 as a target obfuscation value; in the case that the target array is a false value array, a candidate value may be randomly obtained from the false value array false as a target aliasing value, such as bn as the target aliasing value.
In addition, in the prior art, the boolean value is set to be '1' when the boolean value is a true value, and the boolean value is set to be '0' when the boolean value is a false value, but the obfuscated boolean value can be obtained according to a plurality of candidate values, so that the target obfuscated value sent by the sending end in the subsequent step is uncertain, and the difficulty of the tamperer in deciphering the target obfuscated value is increased.
And 104, the sending end sends the target confusion value to the receiving end.
In the embodiment of the invention, the sending end and the receiving end can communicate, and the sending end sends the target confusion value to the receiving end.
And 105, the receiving end determines a target array from the candidate arrays according to the target confusion value.
The candidate arrays stored by the receiving end and the transmitting end are the same array, so that the target array can be determined by a plurality of first candidate values included in the true value array and a plurality of second candidate values included in the false value array in the step.
Specifically, if the target confusion value is directly and randomly selected from the target array, the target array is the true array if the target confusion value is the first candidate value, and the target array is the false array if the target confusion value is the second candidate value.
For example, in the case of the example in step 103, if the target confusion value a2 is directly and randomly obtained from the true value array truelist, the receiving end determines that the target confusion value a2 is the first candidate value, and the true value array is the target array.
If the target obfuscation value is further encrypted after being randomly selected from the target array, before the step 105, the method may further include: carrying out decryption operation on the target confusion value to obtain a candidate value; the determining a target array from the candidate arrays according to the target confusion value may include: and determining a target array from the candidate arrays according to the candidate values.
That is, if the target obfuscated value is randomly selected from the target array and then encrypted, a decryption operation corresponding to the encryption operation needs to be performed on the target obfuscated value first, if the candidate value obtained by the decryption operation is a first candidate value, the target array is a true array, and if the candidate value obtained by the decryption operation is a second candidate value, the target array is a false array. The decryption operation may be an inverse operation of the encryption operation.
For example, continuing with the example in step 103, if the target confusion value-a 2 is obtained randomly from the true value array truelist and then the inverse encryption operation is performed, the receiving end first performs the inverse decryption operation on the target confusion value-a 2 to obtain the candidate value a2, and the receiving end determines that the candidate value a2 is the first candidate value, then the true value array is the target array.
And 106, the receiving end determines the Boolean value acquired by the transmitting end according to the target array.
The boolean type may be determined as the true value type when the target array is the true value array, and may be determined as the false value type when the target array is the false value array.
By adopting the method, the candidate arrays are preset at the sending end and the receiving end; a sending end obtains a Boolean value; the transmitting end determines a target array corresponding to the Boolean value from the candidate arrays; the target array comprises a plurality of candidate values; the sending end obtains a target confusion value according to a plurality of candidate values included by the target array; the sending end sends the target confusion value to the receiving end; the receiving end determines a target array from the candidate arrays according to the target confusion value; and the receiving end determines the Boolean value obtained by the sending end according to the target array. In summary, the boolean value is obfuscated by an array lookup to obtain the target obfuscated value, and compared with the prior art that a simple operation result is still an actual boolean value 0 or 1, the target obfuscated value has a large value range and a high value possibility, so that a falsifier is difficult to decipher the target obfuscated value to represent the boolean category, and even if the falsifier deciphers the target obfuscated value to represent the boolean category, because the value of the target obfuscated value is not limited to 0 or 1, the falsifier is difficult to decipher the actual boolean value before the obfuscated value according to the target obfuscated value under the condition that there is no corresponding relationship between the target obfuscated value and the actual boolean value, and thus the accuracy of the boolean value obtained by the receiving end is improved.
Referring to fig. 3, a flowchart of steps of an optional embodiment of a first boolean confusion method according to the present application of the boolean confusion method is shown, where the method is applied to a transmitting end, in the present application, the transmitting end presets a candidate array, where the candidate array is used to represent that a boolean value is a true value or a boolean value is a false value, and the number of the candidate array may be set according to actual needs. For example, the candidate arrays may be two, and the candidate arrays may be a true value array and a false value array, respectively, where the true value array may be used to represent the boolean value as a true value, and the false value array may be used to represent the boolean value as a false value.
The method specifically comprises the following steps:
in step 201, a boolean value is obtained.
Step 202, determining a target array corresponding to the boolean value from the candidate arrays.
The target array comprises a plurality of candidate values.
Step 203, obtaining a target confusion value according to a plurality of candidate values included in the target array.
And step 204, sending the target confusion value to a receiving end.
In the embodiment of the present invention, the steps 201 to 204 may respectively refer to the related descriptions in the steps 101 to 104, and the same effect can be achieved, and the description is omitted herein for avoiding repetition.
Referring to fig. 4, a flowchart of steps of an alternative embodiment of a boolean value obfuscation method according to a second boolean value obfuscation method of the present application is shown, where the step is applied to a receiving end, in the present application, a candidate array is preset at the receiving end, where the candidate array is used to represent that a boolean value is a true value or a boolean value is a false value, and the number of the candidate array may be set according to actual needs. For example, the candidate arrays may be two, and the candidate arrays may be a true value array and a false value array, respectively, where the true value array may be used to represent the boolean value as a true value, and the false value array may be used to represent the boolean value as a false value.
The method specifically comprises the following steps:
step 301, receiving a target confusion value sent by a sending end.
The target confusion value is a boolean value after confusion, which is acquired by the sending end according to a plurality of candidate values included in the target array.
Step 302, determining a target array from the candidate arrays according to the target confusion value.
The candidate arrays stored by the receiving end and the transmitting end are the same array, the candidate arrays comprise a true value array corresponding to the true value type and a false value array corresponding to the false value type, and a plurality of first candidate values included in the true value array are different from a plurality of second candidate values included in the false value array.
Specifically, if the target confusion value is directly and randomly selected from the target array, the target array is the true array if the target confusion value is the first candidate value, and the target array is the false array if the target confusion value is the second candidate value.
For example, if the true value array truelist is [ a1, a2, …, an ], the false value array falselist is [ b1, b2, …, bm ], m and n are positive integers, then the first candidate values are a1, a2, …, an, and the second candidate values are b1, b2, …, bm, at this time, if the target confusion value is directly randomly obtained from the true value array truelist or the false value array falselist, then, in case that the target confusion value belongs to the true value array, the target array is determined to be the true value array, and in case that the target confusion value belongs to the false value array, the target array is determined to be the false value array.
If the target obfuscation value is further encrypted after being randomly selected from the target array, before the step 302, the method may further include: carrying out decryption operation on the target confusion value to obtain a candidate value; the determining a target array from the candidate arrays according to the target confusion value may include: and determining a target array from the candidate arrays according to the candidate values.
That is, if the target obfuscated value is randomly selected from the target array and then encrypted, a decryption operation corresponding to the encryption operation needs to be performed on the target obfuscated value first, if the candidate value obtained by the decryption operation is a first candidate value, the target array is a true array, and if the candidate value obtained by the decryption operation is a second candidate value, the target array is a false array. The decryption operation may be an inverse operation of the encryption operation.
Step 303, determining the boolean value obtained by the transmitting end according to the target array.
In the embodiment of the present invention, the steps 302 to 303 may respectively refer to the related descriptions in the steps 105 to 106, and are not repeated herein for the sake of avoiding repetition.
The method of steps 301 to 303 can achieve the same effects of steps 105 to 106, and will not be described herein again to avoid repetition.
Referring to fig. 5, a flowchart illustrating steps of an alternative embodiment of a boolean value obfuscation method according to a third boolean value obfuscation method of the present application is shown. For the above-mentioned system, reference may be made to the above description, and details thereof are not repeated herein to avoid redundancy. The method specifically comprises the following steps:
step 401, the sending end obtains a boolean value.
In the embodiment of the present application, the step may refer to the related description of step 101 or step 201, and is not described herein again to avoid repetition.
Step 402, the sending end obtains the boolean type corresponding to the boolean value.
In the embodiment of the present invention, the boolean type corresponding to the boolean value specifically includes: a true value type, a false value type. The above information to be verified is taken as an example of "whether the current environment of the electronic device corresponding to the sending end is in the safe state", where the boolean type of the boolean value is the true value type in the case that the current environment of the electronic device corresponding to the sending end is in the safe state ", and the boolean type of the boolean value is the false value type in the case that the current environment of the electronic device corresponding to the sending end is in the dangerous state", which is only exemplified and is not limited in this application.
In step 403, the transmitting end determines the target array from the candidate arrays according to the boolean type.
Wherein the target array comprises a plurality of candidate values. Specifically, the candidate value may be any value. In the embodiment of the present invention, this is not particularly limited.
In this embodiment, the candidate arrays may include a true value array corresponding to the true value type and a false value array corresponding to the false value type, and a plurality of first candidate values included in the true value array and a plurality of second candidate values included in the false value array are different, that is, there is no same value between the two arrays. In this way, under the condition that the boolean type includes the truth type, determining the truth array corresponding to the truth type as the target array; and under the condition that the Boolean type comprises a false value type, determining a false value array corresponding to the false value type as a target array.
In addition, in order to enable the receiving end and the transmitting end to perform boolean type acquisition through an array search mode, the receiving end in the present application needs to receive a true value array and a false value array sent by the preprocessor and store the true value array and the false value array. Specifically, reference may be made to fig. 2 and the description related to fig. 2.
Step 404, the transmitting end selects at least one candidate value from a plurality of candidate values included in the target array; carrying out encryption operation on the at least one candidate value to obtain the target confusion value; or randomly acquiring at least one candidate value from a plurality of candidate values included in the target array to serve as the target confusion value.
In the embodiment of the invention, the selected at least one candidate value is subjected to encryption operation, so that the decoding difficulty of a falsifier is increased. Or, the target confusion value is randomly acquired, so that the decoding difficulty of a falsifier is increased, and the target confusion values acquired each time are possibly different, so that the falsifier can be irregular.
In the embodiment of the present invention, the step may refer to the related description of step 103 or step 203, and is not described herein again to avoid repetition.
Step 405, the sending end sends the target confusion value to a receiving end.
In the embodiment of the present invention, the step may refer to the related description of the step 104 or the step 204, and is not described herein again to avoid repetition.
In the present invention, in the above step 404, if at least one candidate value is randomly obtained from the plurality of candidate values included in the target array as the target aliasing value, the following steps 406 to 408 and 411 are performed.
In the present invention, in the above step 404, if at least one candidate value is selected from the plurality of candidate values included in the target array; if the at least one candidate value is encrypted to obtain the target obfuscated value, the following steps 409 to 410 and 411 are performed.
Step 406, the candidate arrays include a true value array corresponding to the true value type and a false value array corresponding to the false value type, and the receiving end determines whether the true value array includes the target confusion value.
Step 407, in a case that the true value array includes the target confusion value, the receiving end determines that the true value array is the target array.
Step 408, when the true value array does not include the target confusion value, and the receiving end determines that the false value array includes the target confusion value, determining that the false value array is the target array.
In the embodiment of the present invention, since the target confusion value is directly obtained from a plurality of candidate values included in the target array at random, if the true value array includes the target confusion value, the true value array may be the target array. If the false value array comprises the target confusion value, the false value array can be the target array.
In the embodiment of the present invention, optionally, under the condition that neither the true value array nor the false value array includes the target obfuscated value, the receiving end determines that the target obfuscated value is a tampered value.
In an embodiment of the present invention, since the target confusion value is directly obtained randomly from a plurality of candidate values included in a target array, and the target array is any one of a true value array and a false value array, if neither the false value array nor the true value array includes the target confusion value, it indicates that the target confusion value is tampered by an attacker during transmission, and the target confusion value is a tamper value.
And 409, the receiving end carries out decryption operation on the target confusion value to obtain a candidate value.
Step 410, the receiving end determines a target array from the candidate arrays according to the candidate value.
In the embodiment of the present invention, if the target confusion value is randomly selected from the target array and then is subjected to an encryption operation, a decryption operation corresponding to the encryption operation needs to be performed on the target confusion value, if the candidate value obtained by the decryption operation is a first candidate value, the target array is a true array, and if the candidate value obtained by the decryption operation is a second candidate value, the target array is a false array. The decryption operation may be an inverse operation of the encryption operation.
In the embodiment of the present invention, the above steps 409 to 410 may refer to the related descriptions in the above step 105 or step 302, and are not described herein again to avoid repetition.
In the embodiment of the present invention, optionally, if neither the false value array nor the true value array includes the candidate value obtained by the decryption operation, it is also stated that the target obfuscated value is tampered by an attacker in the transmission process, and the target obfuscated value is a tamper value.
Step 411, the receiving end determines the boolean value obtained by the transmitting end according to the target array.
In the embodiment of the present invention, the above step 411 may refer to the related description in the above step 106, and is not described herein again to avoid repetition.
By adopting the method, the target confusion value is obtained by carrying out encryption operation on at least one selected candidate value, so that the decoding difficulty of a falsifier is increased. Or, the target confusion value is randomly acquired, so that the decoding difficulty of a falsifier is increased, and the target confusion values acquired at each time are possibly different, so that the falsifier is irregular, the falsifier is difficult to decode the actual boolean value before the confusion according to the target confusion value, the confused boolean value is difficult to be modified, and the accuracy of the boolean value acquired by the receiving end is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
Referring to fig. 6, a block diagram of an embodiment of a boolean confusion system 60 according to the present application is shown, where the system 60 includes a transmitting end 61 and a receiving end 62, where both the transmitting end and the receiving end have preset candidate arrays;
wherein the transmitting end 61 is configured to: obtaining a Boolean value; determining a target array corresponding to the Boolean value from the candidate arrays; the target array comprises a plurality of candidate values; obtaining a target confusion value according to a plurality of candidate values included in the target array; sending the target confusion value to the receiving end 62;
the receiving end 62 is configured to: determining a target array from the candidate arrays according to the target confusion value; and determining the Boolean value obtained by the sending end 61 according to the target array.
By adopting the system, the same beneficial effects of the steps 101 to 106 can be achieved, and the details are not repeated herein in order to avoid repetition.
Referring to fig. 7, a block diagram of an embodiment of a boolean obfuscation device 70 according to the present application is shown, and the boolean obfuscation device is disposed at a sending end, where a candidate array is preset at the sending end; the sending end may specifically include the following modules:
a boolean value acquisition module 71, configured to acquire a boolean value;
a target array determining module 72, configured to determine a target array corresponding to the boolean value from the candidate arrays; the target array comprises a plurality of candidate values;
a confusion value obtaining module 73, configured to obtain a target confusion value according to a plurality of candidate values included in the target array;
a sending module 74, configured to send the target confusion value to a receiving end.
Referring to fig. 8, in an alternative embodiment of the present application, the target array determination module 72 further includes:
a boolean type acquisition submodule 721 configured to acquire a boolean type corresponding to the boolean value;
and a target array determining submodule 722, configured to determine the target array from the candidate arrays according to the boolean type.
In an optional embodiment of the present application, the candidate arrays include a true value array corresponding to a true value type and a false value array corresponding to a false value type; the target array determining submodule 722 is specifically configured to determine that the truth array is the target array if the boolean type is the truth type; or, if the boolean type is a false value type, determining that the false value array is the target array;
wherein a plurality of first candidate values included in the true value array are different from a plurality of second candidate values included in the false value array.
In an optional embodiment of the present application, the confusion value obtaining module 73 is specifically configured to select at least one candidate value from a plurality of candidate values included in the target array; carrying out encryption operation on the at least one candidate value to obtain the target confusion value; or randomly acquiring at least one candidate value from a plurality of candidate values included in the target array to serve as the target confusion value.
By adopting the device, the sending end is preset with the candidate array; a sending end obtains a Boolean value; the transmitting end determines a target array corresponding to the Boolean value from the candidate arrays; the target array comprises a plurality of candidate values; the sending end obtains a target confusion value according to a plurality of candidate values included by the target array; and the sending end sends the target confusion value to the receiving end. In summary, the boolean value is obfuscated by an array lookup to obtain the target obfuscated value, and compared with the prior art that a simple operation result is still an actual boolean value 0 or 1, the target obfuscated value has a large value range and a high value possibility, so that a falsifier is difficult to decipher the target obfuscated value to represent the boolean category, and even if the falsifier deciphers the target obfuscated value to represent the boolean category, because the value of the target obfuscated value is not limited to 0 or 1, the falsifier is difficult to decipher the actual boolean value before the obfuscated value according to the target obfuscated value under the condition that there is no corresponding relationship between the target obfuscated value and the actual boolean value, and thus the accuracy of the boolean value obtained by the receiving end is improved.
Referring to fig. 9, a block diagram of an embodiment of a boolean obfuscation device 90 according to the present application is shown, and the boolean obfuscation device is disposed at a receiving end, where a candidate array is preset at the receiving end; the method specifically comprises the following modules:
an confusion value receiving module 91, configured to receive a target confusion value sent by a sending end;
a confusion value target array determination module 92 for determining a target array from the candidate arrays according to the target confusion value;
and a boolean value determination module 93, configured to determine, according to the target array, a boolean value obtained by the sending end.
Referring to fig. 10, in an optional embodiment of the present application, the candidate arrays include a true array corresponding to a true type and a false array corresponding to a false type, and the confusion value target array determining module 92 further includes:
a true value array confusion value judgment sub-module 921, configured to judge whether the true value array includes the target confusion value;
a true value array judgment sub-module 922, configured to judge that the true value array is the target array when the true value array includes the target confusion value;
a false value array determining submodule 923, configured to determine that the false value array is the target array when the true value array does not include the target confusion value and the false value array includes the target confusion value.
Referring to fig. 11, in an alternative embodiment of the present application, the apparatus further comprises:
a decryption module 94, configured to perform decryption operation on the target obfuscated value to obtain a candidate value;
the confusion value target array determination module 92 is specifically configured to determine a target array from the candidate arrays according to the candidate values.
By adopting the device, the candidate array is preset at the receiving end; the receiving end determines a target array from the candidate arrays according to the target confusion value; and the receiving end determines the Boolean value obtained by the sending end according to the target array. In summary, the boolean value is obfuscated by an array lookup to obtain the target obfuscated value, and compared with the prior art that a simple operation result is still an actual boolean value 0 or 1, the target obfuscated value has a large value range and a high value possibility, so that a falsifier is difficult to decipher the target obfuscated value to represent the boolean category, and even if the falsifier deciphers the target obfuscated value to represent the boolean category, because the value of the target obfuscated value is not limited to 0 or 1, the falsifier is difficult to decipher the actual boolean value before the obfuscated value according to the target obfuscated value under the condition that there is no corresponding relationship between the target obfuscated value and the actual boolean value, and thus the accuracy of the boolean value obtained by the receiving end is improved.
The present application further provides a non-volatile readable storage medium, where one or more modules (programs) are stored in the storage medium, and when the one or more modules are applied to a terminal device, the one or more modules may cause the terminal device to execute instructions (instructions) of method steps in the present application.
Fig. 12 is a schematic hardware structure diagram of a boolean obfuscation apparatus according to an embodiment of the present disclosure. As shown in fig. 12, the obfuscating device for boolean values of the present embodiment includes a processor 121 and a memory 122.
The processor 121 executes the computer program code stored in the memory 122 to implement the boolean obfuscation method of fig. 1-5 in the above embodiments.
The memory 122 is configured to store various types of words to support operation of obfuscation methods at boolean values. Examples of such words include instructions for any application or method operating on a boolean obfuscation device, such as a message, a picture, a video, and so forth. The memory 122 may include a Random Access Memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as a plurality of disk memories.
Optionally, the processor 121 is provided in the processing assembly 120. The boolean obfuscation apparatus may further include: a communication component 123, a power component 124, a multimedia component 125, an audio component 126, an input/output interface 127 and/or a sensor component 128. The specific components included in the boolean obfuscation device are set according to actual requirements, which is not limited in this embodiment.
The processing component 120 generally controls the overall operation of the boolean obfuscation device. The processing component 120 may include one or more processors 121 to execute instructions to perform all or part of the steps of the methods of fig. 1-5 described above. Further, processing component 120 may include one or more modules that facilitate interaction between processing component 120 and other components. For example, the processing component 120 may include a multimedia module to facilitate interaction between the multimedia component 125 and the processing component 120.
The power supply component 124 provides power to the various components of the boolean obfuscation device. The power components 124 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for a boolean obfuscated device.
The multimedia component 125 includes a display screen providing an output interface between the boolean obfuscation device and the user. In some embodiments, the display screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the display screen includes a touch panel, the display screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The audio component 126 is configured to output and/or input audio signals. For example, the audio component 126 includes a Microphone (MIC). The received audio signal may further be stored in the memory 122 or transmitted via the communication component 123. In some embodiments, the audio component 126 also includes a speaker for outputting audio signals.
The input/output interface 127 provides an interface between the processing component 120 and peripheral interface modules, which may be click wheels, buttons, etc. These buttons may include, but are not limited to: a volume button, a start button, and a lock button.
The sensor assembly 128 includes one or more sensors for providing various aspects of state evaluation for a boolean obfuscation device. For example, the sensor assembly 128 may detect an open/closed state of a boolean obfuscation device, a relative positioning of the assemblies, a presence or absence of user contact with the boolean obfuscation device. The sensor assembly 128 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. In some embodiments, the sensor assembly 128 may also include a camera or the like.
The communication component 123 is configured to facilitate communication between the obfuscation arrangement of boolean values and other devices in a wired or wireless manner. The boolean obfuscation device may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
From the above, the communication component 123, the audio component 126, the input/output interface 127 and the sensor component 128 involved in the embodiment of fig. 12 can be implemented as input devices.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable word processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable word processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable word processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable word processing terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method and apparatus for obfuscating boolean values and the computer-readable storage medium provided by the present application are described in detail above, and specific examples are applied herein to illustrate the principles and implementations of the present application, and the above descriptions of the examples are only used to help understand the method and its core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (17)

1. A confusion method of Boolean values is characterized in that the confusion method is applied to a system comprising a sending end and a receiving end, wherein both the sending end and the receiving end are preset with candidate arrays; the method comprises the following steps:
the sending end obtains a Boolean value;
the transmitting end determines a target array corresponding to the Boolean value from the candidate arrays; the target array comprises a plurality of candidate values;
the sending end obtains a target confusion value according to a plurality of candidate values included by the target array;
the sending end sends the target confusion value to the receiving end;
the receiving end determines a target array from the candidate arrays according to the target confusion value;
the receiving end determines the Boolean value obtained by the transmitting end according to the target array;
the candidate arrays comprise a true value array corresponding to a true value type and a false value array corresponding to a false value type; wherein a plurality of first candidate values included in the true value array are different from a plurality of second candidate values included in the false value array.
2. The Boolean type acquisition method is characterized by being applied to a transmitting end, wherein the transmitting end is preset with a candidate array; the method comprises the following steps:
obtaining a Boolean value;
determining a target array corresponding to the Boolean value from the candidate arrays; the target array comprises a plurality of candidate values;
obtaining a target confusion value according to a plurality of candidate values included in the target array;
sending the target confusion value to a receiving end;
the candidate arrays comprise a true value array corresponding to a true value type and a false value array corresponding to a false value type; wherein a plurality of first candidate values included in the true value array are different from a plurality of second candidate values included in the false value array.
3. The method of claim 2, wherein determining the target array corresponding to the boolean value from the candidate arrays comprises:
acquiring a Boolean type corresponding to the Boolean value;
and determining the target array from the candidate arrays according to the Boolean type.
4. The method of claim 3, wherein determining the target array from the candidate arrays according to the Boolean type comprises:
if the Boolean type is a truth value type, determining that the truth value array is the target array; or if the Boolean type is a false value type, determining that the false value array is the target array.
5. The method of claim 2, wherein obtaining a target obfuscation value from a plurality of candidate values included in the target array comprises:
selecting at least one candidate value from a plurality of candidate values included in the target array; carrying out encryption operation on the at least one candidate value to obtain the target confusion value; alternatively, the first and second electrodes may be,
randomly obtaining at least one candidate value from a plurality of candidate values included in the target array as the target obfuscation value.
6. The Boolean type acquisition method is characterized by being applied to a receiving end, wherein a candidate array is preset at the receiving end; the method comprises the following steps:
receiving a target confusion value sent by a sending end;
determining a target array from the candidate arrays according to the target confusion value;
determining a Boolean value obtained by the sending end according to the target array;
the candidate arrays comprise a true value array corresponding to a true value type and a false value array corresponding to a false value type; wherein a plurality of first candidate values included in the true value array are different from a plurality of second candidate values included in the false value array.
7. The method of claim 6, wherein the candidate arrays comprise a truth array corresponding to a truth type and a false array corresponding to a false type, and wherein determining a target array from the candidate arrays according to the target obfuscation value comprises:
judging whether the truth value array comprises the target confusion value or not;
under the condition that the truth value array comprises the target confusion value, judging that the truth value array is the target array;
and under the condition that the target confusion value is not included in the true value array and the condition that the target confusion value is included in the false value array, judging that the false value array is the target array.
8. The method of claim 6, further comprising, prior to said determining a target array from said candidate arrays based on said target obfuscation value: carrying out decryption operation on the target confusion value to obtain a candidate value;
the determining a target array from the candidate arrays according to the target confusion value comprises:
and determining a target array from the candidate arrays according to the candidate values.
9. A confusion system of Boolean values is characterized by comprising a sending end and a receiving end, wherein both the sending end and the receiving end are preset with candidate arrays;
wherein the sending end is configured to: obtaining a Boolean value; determining a target array corresponding to the Boolean value from the candidate arrays; the target array comprises a plurality of candidate values; obtaining a target confusion value according to a plurality of candidate values included in the target array; sending the target confusion value to the receiving end;
the receiving end is used for: determining a target array from the candidate arrays according to the target confusion value; determining a Boolean value obtained by the sending end according to the target array;
the candidate arrays comprise a true value array corresponding to a true value type and a false value array corresponding to a false value type; wherein a plurality of first candidate values included in the true value array are different from a plurality of second candidate values included in the false value array.
10. The confusion device for Boolean values is characterized by being arranged at a sending end, wherein a candidate array is preset at the sending end; the device comprises:
the Boolean value acquisition module is used for acquiring Boolean values;
a target array determining module, configured to determine a target array corresponding to the boolean value from the candidate arrays; the target array comprises a plurality of candidate values;
the confusion value acquisition module is used for acquiring a target confusion value according to a plurality of candidate values included in the target array;
the sending module is used for sending the target confusion value to a receiving end;
the candidate arrays comprise a true value array corresponding to a true value type and a false value array corresponding to a false value type; wherein a plurality of first candidate values included in the true value array are different from a plurality of second candidate values included in the false value array.
11. The apparatus of claim 10, wherein the target array determination module further comprises:
the Boolean type acquisition submodule is used for acquiring a Boolean type corresponding to the Boolean value;
and the target array determining submodule is used for determining the target array from the candidate arrays according to the Boolean type.
12. The apparatus of claim 11, wherein the candidate arrays comprise a truth array corresponding to a truth type and a false array corresponding to a false type; the target array determining submodule is specifically configured to determine that the truth array is the target array if the boolean type is the truth type; or, if the boolean type is a false value type, determining that the false value array is the target array;
wherein a plurality of first candidate values included in the true value array are different from a plurality of second candidate values included in the false value array.
13. The apparatus according to claim 10, wherein the confusion value obtaining module is specifically configured to select at least one candidate value from a plurality of candidate values included in the target array; carrying out encryption operation on the at least one candidate value to obtain the target confusion value; or randomly acquiring at least one candidate value from a plurality of candidate values included in the target array to serve as the target confusion value.
14. The confusion device for the Boolean values is characterized by being arranged at a receiving end, wherein a candidate array is preset at the receiving end; the device comprises:
the confusion value receiving module is used for receiving a target confusion value sent by the sending end;
a confusion value target array determination module, configured to determine a target array from the candidate arrays according to the target confusion value;
the Boolean value determining module is used for determining the Boolean value acquired by the transmitting end according to the target array;
the candidate arrays comprise a true value array corresponding to a true value type and a false value array corresponding to a false value type; wherein a plurality of first candidate values included in the true value array are different from a plurality of second candidate values included in the false value array.
15. The apparatus of claim 14, wherein the candidate arrays comprise a truth array corresponding to a truth type and a false array corresponding to a false type, and wherein the obfuscated value target array determining module further comprises:
a true value array confusion value judgment submodule for judging whether the true value array comprises the target confusion value;
a true value array judgment submodule, configured to judge that the true value array is the target array when the true value array includes the target confusion value;
and the false value array judgment submodule is used for judging that the false value array is the target array under the condition that the true value array does not comprise the target confusion value and under the condition that the false value array comprises the target confusion value.
16. The apparatus of claim 14, further comprising:
the decryption module is used for carrying out decryption operation on the target confusion value to obtain a candidate value;
the confusion value target array determination module is specifically configured to determine a target array from the candidate arrays according to the candidate values.
17. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the boolean obfuscation method according to claim 1; or implementing a boolean obfuscation method as claimed in any one of claims 2 to 5; or implementing a boolean obfuscation method as claimed in any one of claims 6 to 8.
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 CN110378083A (en) 2019-10-25
CN110378083B true 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 (3)

* 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
CN108023724A (en) * 2016-11-04 2018-05-11 北京展讯高科通信技术有限公司 Data transmission method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8185749B2 (en) * 2008-09-02 2012-05-22 Apple Inc. System and method for revising boolean and arithmetic operations
US10498528B2 (en) * 2016-06-30 2019-12-03 AEMEA Inc. Clock computing Machines

Patent Citations (3)

* 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
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
用于软件保护的代码混淆技术;罗宏 等;《计算机工程》;20060615;第32卷(第11期);第177-179页 *

Also Published As

Publication number Publication date
CN110378083A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
CN107391298B (en) Data storage state detection method and device and computer readable storage medium
US11288371B2 (en) Blockchain-based data processing method, apparatus, and device
US9208334B2 (en) Content management using multiple abstraction layers
CN106650355B (en) Method and device for protecting function call
CN105119888B (en) Plug-in unit installation kit method for uploading, installation method and device
EP3220573A1 (en) Method and system for controlling encryption of information and analyzing information as well as terminal
US8683563B1 (en) Soft token posture assessment
KR101688182B1 (en) Anti-counterfeiting verification method, device and system, program and recording medium
KR102474243B1 (en) A Method and Apparatus For Providing a Secure Mode for User Device
CN108880859B (en) Configuration method, device, server, terminal and storage medium of upgrade file
CN106685644B (en) Communication encryption method and device, gateway, server, intelligent terminal and system
CN111339508A (en) Shared password analysis method and device, electronic equipment and storage medium
CN112149137B (en) Vulnerability detection method and device, electronic equipment and computer readable storage medium
CN108092947B (en) Method and device for identity authentication of third-party application
JP2018521403A (en) Binary merging apparatus, method and computer program
CN111343204A (en) Control command obfuscation method, apparatus and computer-readable storage medium
EP3945696B1 (en) Blockchain data processing method, apparatus, and device
CN110245523B (en) Data verification method, system and device and computer readable storage medium
CN110753257A (en) Data display method, display terminal, server, display system, and storage medium
CN110378083B (en) Boolean value confusion method and device and computer readable storage medium
CN104113588A (en) Updating method and apparatus of internet yellow page
CN106407815B (en) Vulnerability detection method and device
CN109120576B (en) Data sharing method and device, computer equipment and storage medium
CN117579338A (en) Method for processing streaming media file and related equipment
US9990127B2 (en) Secure user input mode for electronic devices using randomized mathematical operators and operands

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