[go: up one dir, main page]

CN108574566A - A kind of whitepack encipher-decipher method, device and storage medium - Google Patents

A kind of whitepack encipher-decipher method, device and storage medium Download PDF

Info

Publication number
CN108574566A
CN108574566A CN201810151198.1A CN201810151198A CN108574566A CN 108574566 A CN108574566 A CN 108574566A CN 201810151198 A CN201810151198 A CN 201810151198A CN 108574566 A CN108574566 A CN 108574566A
Authority
CN
China
Prior art keywords
result
algorithm
whitepack
plaintext
calculated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810151198.1A
Other languages
Chinese (zh)
Inventor
阚志刚
陈彪
王全洲
龚晓燕
刘瑞
卢佐华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Bang Bang Safety Technology Co Ltd
Original Assignee
Beijing Bang Bang Safety 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 Bang Bang Safety Technology Co Ltd filed Critical Beijing Bang Bang Safety Technology Co Ltd
Priority to CN201810151198.1A priority Critical patent/CN108574566A/en
Publication of CN108574566A publication Critical patent/CN108574566A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0631Substitution permutation network [SPN], i.e. cipher composed of a number of stages or rounds each involving linear and nonlinear transformations, e.g. AES algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/101Access control lists [ACL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

This application discloses a kind of whitepack encipher-decipher methods, to improve the safety of data in the prior art.This method includes:According to key information, plaintext or cipher text is carried out by first via algorithm the first result is calculated;According to the key information, plaintext or cipher text is carried out by the second road algorithm the second result is calculated;Compare first result and second result;If comparing result is difference, random output error value.The application also provides a kind of whitepack ciphering and deciphering device and computer readable storage medium.

Description

A kind of whitepack encipher-decipher method, device and storage medium
Technical field
This application involves a kind of field of computer technology more particularly to whitepack encipher-decipher method, device and storage mediums.
Background technology
With the development of terminal technology, the application program installed in terminal is more and more.Some are often had in terminal not The data stolen by attacker are wished, for example, secret that user can use during using application program or generation Data or developer are often not intended to the execution logic of application program inversely to be cracked by attacker.In order to protect application program And its safety of the data generated in operational process, it is often necessary to which these data are encrypted.
In recent years, intelligent terminal is largely popularized, since the running environment of intelligent terminal is opposing open, intelligent terminal Running environment is visible for attacker and (is commonly called as whitepack (white-box) environment), and whitepack cryptographic technique is correspondingly carried Go out.By whitepack cryptographic technique, cryptographic algorithm is obscured so that attacker can not learn specific algorithm flow, in turn Achieve the purpose that protect key information, prevents attacker from extracting key in whitepack environment, to ensure protected data Safety.
In existing white-box attack method, difference fault analysis (Differential Fault Attack, DFA) meeting exists In encryption device, mistake is introduced by some or the certain byte locations in algorithmic procedure, encryption device is caused to generate mistake As a result, to obtain ciphertext difference, then by analyzing ciphertext difference, and then key is obtained.
Invention content
The embodiment of the present application provides a kind of whitepack encipher-decipher method, to improve the safety of data in the prior art.
The embodiment of the present application uses following technical proposals:
A kind of whitepack encipher-decipher method, including:
According to key information, plaintext or cipher text is carried out by first via algorithm the first result is calculated;
According to the key information, plaintext or cipher text is carried out by the second road algorithm the second result is calculated;
Compare first result and second result;
If comparing result is difference, random output error value.
The embodiment of the present application also provides a kind of whitepack ciphering and deciphering device, to improve the safety of data in the prior art.
The embodiment of the present application uses following technical proposals:
A kind of whitepack ciphering and deciphering device, including:
First computing unit carries out plaintext or cipher text by first via algorithm to be calculated first according to key information As a result;
Second computing unit is calculated plaintext or cipher text by the second road algorithm according to the key information Second result;
Comparison unit compares first result and second result;
First output unit, when comparing result is different, random output error value.
The embodiment of the present application also provides a kind of whitepack ciphering and deciphering device, to improve the safety of data in the prior art.
The embodiment of the present application uses following technical proposals:
A kind of whitepack ciphering and deciphering device, including:It memory, processor and is stored on the memory and can be at the place The computer program run on reason device, realizes the whitepack encryption and decryption of the present invention when computer program is executed by the processor The step of method.
The embodiment of the present application also provides a kind of whitepack ciphering and deciphering device, to improve the safety of data in the prior art.
The embodiment of the present application uses following technical proposals:
A kind of computer readable storage medium, which is characterized in that calculating is stored on the computer readable storage medium Machine program, when the computer program is executed by processor the step of the whitepack encipher-decipher method of the realization present invention.
Above-mentioned at least one technical solution that the embodiment of the present application uses can reach following advantageous effect:
It when carrying out encryption and decryption to plaintext or cipher text according to key information, can be calculated respectively by two-way algorithm, respectively The first result and second is obtained as a result, then compared to two-way result of calculation, if comparing result is different, illustrates to attack The person of hitting has modified algorithm, then random output error value, without exporting result of calculation, to prevent attacker from being obtained by changing algorithm Ciphertext difference is obtained to obtain key, is guaranteed data security.
Description of the drawings
Attached drawing described herein is used for providing further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please do not constitute the improper restriction to the application for explaining the application.In the accompanying drawings:
Fig. 1 is a kind of implementation process schematic diagram of whitepack encipher-decipher method provided by the embodiments of the present application;
Fig. 2 is a kind of realization process schematic of whitepack encipher-decipher method provided by the embodiments of the present application;
Fig. 3 is the structural schematic diagram of one embodiment electronic equipment of the application.
Specific implementation mode
To keep the purpose, technical scheme and advantage of the application clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Go out the every other embodiment obtained under the premise of creative work, shall fall in the protection scope of this application.
Below in conjunction with attached drawing, the technical solution that each embodiment of the application provides is described in detail.
Difference fault analysis can cause encryption device to generate wrong in encryption device by introducing mistake in cryptographic algorithm Accidentally as a result, being analyzed error result to obtain key.
For whitepack cryptographic algorithm, attacker can observe easily and Modify password systematic parameter and median.Especially The input value for distorting last wheel of algorithm makes algorithm obtain error result, the difference between mistake of statistics result and correct result, The original round key of the wheel can be recovered after obtaining a certain amount of statistical value, and then recovers all original round key.
In this specification, by using two-way algorithm, two-way result of calculation is compared, if two-way result of calculation is inconsistent Random error value is exported, to prevent DFA from attacking.
To solve the problems, such as that key data safety is relatively low in the prior art, a kind of whitepack of the embodiment of the present application offer adds solution Decryption method.The executive agent of whitepack encipher-decipher method provided by the embodiments of the present application can be terminal device, such as mobile phone, tablet Computer etc..In addition, the executive agent of this method, can also be to realize the program module of this method, for example be used for ensureing application The module of program safety, such as whitepack cipher key module.
For ease of description, hereafter executive agent in this way be whitepack cipher key module for, to the embodiment party of this method Formula is introduced.It is appreciated that it is a kind of illustrative explanation that the executive agent of this method, which is whitepack cipher key module, do not answer It is interpreted as the restriction to this method.
The implementation process schematic diagram of this method is as shown in Figure 1, include the following steps:
Step 11:According to key information, plaintext or cipher text is carried out by first via algorithm the first result is calculated;
Step 12:According to the key information, plaintext or cipher text is carried out by the second road algorithm the second knot is calculated Fruit;
In the embodiment of the present application, if the first via algorithm is identical with the input parameter of second road algorithm, and each rank The result of calculation or parameter of section are not changed by the external world, then first result is identical with second result.And if certain single order The result of calculation or parameter of section are changed by the external world, then the first result and the second result are likely to difference.
Step 13:Compare first result and second result;
Step 14:If comparing result is difference, random output error value.
If comparing result is different, illustrate there is attacker to have modified algorithm, then random output error value, without exporting Result of calculation obtains key to prevent attacker by changing algorithm acquisition ciphertext difference, guarantees data security.
Whitepack key algorithm can be divided into n wheel calculation stages, wherein n is the natural number more than 1, in existing whitepack key In algorithm, n is generally 10.
In one or more embodiments of this specification, first via algorithm and the second road algorithm are whitepack key algorithm Preceding m take turns calculation stages, m is natural number less than n, and m such as can be 9.And first result and second result with Ciphertext form exists, and first result and second result of ciphertext form are different.
It should be noted that if algorithm is not changed, the first result of plaintext version and second is the result is that identical. It, can be to the first result of ciphertext form before the follow-up whitepack encryption and decryption operation that algorithm carries out first via algorithm and the second road algorithm Operation is decrypted with the second result, if the plaintext decrypted is identical, can just carry out the subsequent encryption and decryption behaviour of whitepack key Make.
It, can will be to the first result solution for ease of description, after carrying out encryption and decryption operation to the first result and the second result The plaintext that the plaintext obtained after close obtains after being known as third as a result, will be decrypted to the second result is known as the 4th result.
In one or more embodiments of this specification, in the preceding m wheel calculating of whitepack key algorithm, each round calculates all Two-way calculating may be used, then before each round starts, last round of result can be verified.It is of course also possible to Only the result of calculation of wheel second from the bottom is verified before last wheel starts.
When DFA is attacked, it is contemplated that calculate cost, often attack last wheel, for example, existing whitepack is close Key algorithm frequently includes the calculating of 10 wheels, then the result of calculation of the 9th wheel can be changed, in this way when the result of calculation input of the 9th wheel When in being calculated to the 10th wheel, attacker can be according to the result exported in the 10th wheel come computation key.
So, in the embodiment of the present application, first via algorithm and the second road algorithm can be preceding 9 algorithms taken turns, and the 10th wheel is calculated Method is the 10th wheel algorithm of step 13 and original whitepack key algorithm.In this way, when the in the whitepack encipher-decipher method of the present invention After the input of 10 wheel algorithms is changed by attacker, whitepack key algorithm obtains after the result of calculation that decryption two-way algorithm the 9th is taken turns Two-wheeled result will be different, at this time can random output error value, to prevent DFA from attacking.
In one or more embodiments of the application, in order to allow two-way algorithm to obtain different cryptogram computations as a result, can be with Make the S boxes of first via algorithm and the second road algorithm different, without complicating first via algorithm and the second road algorithm.And to When the result of calculation of algorithm and the second road algorithm is decrypted all the way, it can be operated by inverse S boxes, you can obtain and the first result Corresponding third is as a result, and the 4th result corresponding with the second result.Then the third result and the 4th knot are compared again Whether fruit is identical.
In addition, in one or more embodiments of the invention, in order to improve Information Security, each data variation operation all may be used It, therefore, can be according to preset look-up table, to first result and second knot to be realized by searching for table Fruit is decrypted, and obtains and the corresponding third of the first result is as a result, and the 4th result corresponding with the second result.Then it compares again Whether the third result and the 4th result are identical.
After according to look-up table comparison first result and second result is preset, if comparing result is identical, According to the third result or the 4th as a result, by the subsequent algorithm in whitepack enciphering and deciphering algorithm, encryption and decryption result and defeated is obtained Go out.
For example, first via algorithm and the second road algorithm can be the algorithms of preceding 9 wheel of whitepack enciphering and deciphering algorithm, this specification 10th wheel of the 10th wheel algorithm of the whitepack enciphering and deciphering algorithm of offer, as above-mentioned comparison process and original whitepack key algorithm is calculated Method.In this way, when by above-mentioned comparison, after determining that the result of the 9th wheel of input is identical, then whitepack key calculation is carried out using the result 10th wheel algorithm of method, obtains encryption and decryption result and exports.
For concrete example, such as to 1234 being encrypted in plain text, intermediate result is before last wheel of first via algorithm Abcd, last wheel calculate after the result is that eeee, the intermediate result before last wheel of the second road algorithm is efgh, last wheel The result is that eeee after calculating;Efgh and abcd can be compared before last calculating taken turns, it can be decrypted when comparing, If the substantive content after decryption is identical, is just calculated by last wheel, eeee can be obtained.If after decryption Substantive content differs, then is calculated without last wheel, and exports random error value.
In addition, in existing whitepack cipher key attacks method, there is also Attacks method, Attacks belong to side channel and attack It hits, is divided into simple energy attack (Simple Power Analysis, SPA) according to developing stage, differential power is attacked The attack of (Differential Power Analysis, DPA) and correlation energy (Correlation Power Analysis, CPA).Attacks analyze the physical messages such as energy expenditure for revealing in cipher software implementation procedure by mathematical method, can be with The anti-operand value released in current crypto system, and then the relevant information of key can be obtained, finally restore primary key.
For whitepack algorithm, if protecting corresponding look-up table using affine table or linear list, for specific lookup table, attack Multigroup different data can be carried out look-up table operations by person, after collecting look-up table operations result, analyzed and collected using mathematical method The correlation of the information arrived and canonical algorithm result of calculation, and then recover primary key.
In one or more embodiments of the application, the affine table for protecting look-up table or linear list are replaced with non-linear Table protects the look-up table of whitepack enciphering and deciphering algorithm, attacker that cannot obtain useful statistical result by non-linear table, to Prevent such attack.
It is whitepack encipher-decipher method provided by the present application above, is based on above-mentioned whitepack encipher-decipher method, the application also provides A kind of whitepack ciphering and deciphering device.The structural schematic diagram of the whitepack ciphering and deciphering device is as shown in Fig. 2, include mainly following function list Member:
First computing unit 201 carries out plaintext or cipher text by first via algorithm to be calculated according to key information One result;
Second computing unit 202 to plaintext or cipher text calculate according to the key information by the second road algorithm To the second result;
Comparison unit 203 compares first result and second result according to default look-up table;
First output unit 204, when comparing result is different, random output error value.
In one embodiment, before the first via algorithm and second road algorithm are whitepack enciphering and deciphering algorithm M takes turns algorithm, and first result and second result exist with ciphertext form, first result of ciphertext form and described Second result is different;
Then, the comparison unit 203, is specifically used for:
First result and second result are decrypted, obtain third corresponding with the first result as a result, and The 4th result corresponding with the second result;
It compares the third result and whether the 4th result is identical.
In one embodiment, the first via algorithm is different with the S boxes used in the algorithm of second road;
Then, the comparison unit 203, is specifically used for:
By the default look-up table, inverse S boxes operation is carried out respectively to first result and second result, is obtained And the corresponding third of the first result is as a result, and the 4th result corresponding with the second result;
It compares the third result and whether the 4th result is identical.
In one embodiment, described device further includes:
Second output unit 205, when comparing result is identical, according to the third as a result, being calculated by whitepack encryption and decryption Subsequent algorithm in method obtains encryption and decryption result and exports.
In one embodiment, it is non-linear table for protecting the table of the look-up table of whitepack enciphering and deciphering algorithm.
Whitepack ciphering and deciphering device provided by the present application, when carrying out encryption and decryption to plaintext or cipher text according to key information, meeting It is calculated respectively by two-way algorithm, respectively obtains the first result and second as a result, then compared to two-way result of calculation, If comparing result is different, illustrate there is attacker to have modified algorithm, then random output error value, knot is calculated without exporting Fruit obtains key to prevent attacker by changing algorithm acquisition ciphertext difference, guarantees data security.
Fig. 3 is the structural schematic diagram of one embodiment electronic equipment of the application.Referring to FIG. 3, in hardware view, the electricity Sub- equipment includes processor, further includes optionally internal bus, network interface, memory.Wherein, memory may include interior It deposits, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-volatile memories Device (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that other The required hardware of business.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA (Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always Line etc..For ease of indicating, only indicated with a four-headed arrow in Fig. 3, it is not intended that an only bus or a type of Bus.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculating Machine operational order.Memory may include memory and nonvolatile memory, and provide instruction and data to processor.
Processor is from then operation in corresponding computer program to memory is read in nonvolatile memory, in logical layer It is formed on face and applies whitepack ciphering and deciphering device.Processor executes the program that memory is stored, and specifically for executing following behaviour Make:
According to key information, plaintext or cipher text is carried out by first via algorithm the first result is calculated;
According to the key information, plaintext or cipher text is carried out by the second road algorithm the second result is calculated;
First result and second result are compared according to default look-up table;
If comparing result is difference, random output error value.
The method that whitepack ciphering and deciphering device disclosed in the above-mentioned embodiment illustrated in fig. 1 such as the application executes can be applied to handle In device, or realized by processor.Processor may be a kind of IC chip, the processing capacity with signal.It is realizing In the process, each step of the above method can pass through the integrated logic circuit of the hardware in processor or the instruction of software form It completes.Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processor, DSP), it is application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.It may be implemented or execute the disclosed each side in the embodiment of the present application Method, step and logic diagram.General processor can be microprocessor or the processor can also be any conventional processing Device etc..The step of method in conjunction with disclosed in the embodiment of the present application, can be embodied directly in hardware decoding processor and execute completion, Or in decoding processor hardware and software module combination execute completion.Software module can be located at random access memory, dodge It deposits, read-only memory, this fields such as programmable read only memory or electrically erasable programmable memory, register are ripe to deposit In storage media.The storage medium is located at memory, and processor reads the information in memory, and the above method is completed in conjunction with its hardware The step of.
The electronic equipment can also carry out the method that whitepack ciphering and deciphering device executes in Fig. 1, and realize whitepack encipher-decipher method The function of embodiment shown in Fig. 1, details are not described herein for the embodiment of the present application.
The embodiment of the present application also proposed a kind of computer readable storage medium, the computer-readable recording medium storage one A or multiple programs, the one or more program include instruction, which works as is held by the electronic equipment including multiple application programs When row, the electronic equipment can be made to execute the method that whitepack ciphering and deciphering device executes in embodiment illustrated in fig. 1, and specifically for holding Row:
According to key information, plaintext or cipher text is carried out by first via algorithm the first result is calculated;
According to the key information, plaintext or cipher text is carried out by the second road algorithm the second result is calculated;
First result and second result are compared according to default look-up table;
If comparing result is difference, random output error value.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, the present invention can be used in one or more wherein include computer usable program code computer The computer program production implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence " including one ... ", it is not excluded that including described There is also other identical elements in the process of element, method, commodity or equipment.
Above is only an example of the present application, it is not intended to limit this application.For those skilled in the art For, the application can have various modifications and variations.It is all within spirit herein and principle made by any modification, equivalent Replace, improve etc., it should be included within the scope of claims hereof.

Claims (10)

1. a kind of whitepack encipher-decipher method, which is characterized in that including:
According to key information, plaintext or cipher text is carried out by first via algorithm the first result is calculated;
According to the key information, plaintext or cipher text is carried out by the second road algorithm the second result is calculated;
Compare first result and second result;
If comparing result is difference, random output error value.
2. method as described in claim 1, which is characterized in that the first via algorithm and second road algorithm are that whitepack adds The preceding m of decipherment algorithm takes turns algorithm, and first result and second result exist with ciphertext form, and described the of ciphertext form One result and second result difference;
Then, the comparison first result and described second is as a result, specifically include:
According to default look-up table, first result and second result are decrypted, obtained corresponding with the first result Third is as a result, and the 4th result corresponding with the second result;
It compares the third result and whether the 4th result is identical.
3. method as claimed in claim 2, which is characterized in that used in the first via algorithm and second road algorithm S boxes are different;
Then, the comparison first result and described second is as a result, specifically include:
By the default look-up table, inverse S boxes operation is carried out respectively to first result and second result, is obtained and the The corresponding third of one result is as a result, and the 4th result corresponding with the second result;
It compares the third result and whether the 4th result is identical.
4. method as claimed in claim 3, which is characterized in that comparing first result and described the according to presetting look-up table After two results, the method further includes:
If comparing result is identical, according to the third as a result, by the subsequent algorithm in whitepack enciphering and deciphering algorithm, added Decrypted result simultaneously exports.
5. such as claim 1-4 the methods, which is characterized in that for protecting the table of the look-up table of whitepack enciphering and deciphering algorithm be non- Linear list.
6. a kind of whitepack ciphering and deciphering device, which is characterized in that including:
First computing unit carries out plaintext or cipher text by first via algorithm the first result is calculated according to key information;
Second computing unit carries out plaintext or cipher text by the second road algorithm to be calculated second according to the key information As a result;
Comparison unit compares first result and second result according to default look-up table;
First output unit, when comparing result is different, random output error value.
7. device as claimed in claim 6, which is characterized in that the first via algorithm and second road algorithm are that whitepack adds The preceding m of decipherment algorithm takes turns algorithm, and first result and second result exist with ciphertext form, and described the of ciphertext form One result and second result difference;
Then, the comparison unit, is specifically used for:
First result and second result are decrypted, obtain third corresponding with the first result as a result, and with Corresponding 4th result of two results;
It compares the third result and whether the 4th result is identical.
8. device as claimed in claim 7, which is characterized in that described device further includes:
Second output unit, when comparing result is identical, according to the third as a result, by after in whitepack enciphering and deciphering algorithm Continuous algorithm, obtains encryption and decryption result and exports.
9. a kind of whitepack ciphering and deciphering device, which is characterized in that including:It memory, processor and is stored on the memory simultaneously The computer program that can be run on the processor is realized when the computer program is executed by the processor as right is wanted The step of seeking the method described in any one of 1 to 5.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program, the step of method as described in any one of claim 1 to 5 is realized when the computer program is executed by processor.
CN201810151198.1A 2018-02-13 2018-02-13 A kind of whitepack encipher-decipher method, device and storage medium Pending CN108574566A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810151198.1A CN108574566A (en) 2018-02-13 2018-02-13 A kind of whitepack encipher-decipher method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810151198.1A CN108574566A (en) 2018-02-13 2018-02-13 A kind of whitepack encipher-decipher method, device and storage medium

Publications (1)

Publication Number Publication Date
CN108574566A true CN108574566A (en) 2018-09-25

Family

ID=63576643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810151198.1A Pending CN108574566A (en) 2018-02-13 2018-02-13 A kind of whitepack encipher-decipher method, device and storage medium

Country Status (1)

Country Link
CN (1) CN108574566A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113452505A (en) * 2020-03-27 2021-09-28 北京奇虎科技有限公司 Encryption method and device based on symmetric algorithm
CN113746735A (en) * 2020-05-28 2021-12-03 阿里巴巴集团控股有限公司 Detection method, device and equipment of controller and computer storage medium
CN114514724A (en) * 2019-10-17 2022-05-17 Arm有限公司 Obfuscation of operations in a computing device
CN116032496A (en) * 2022-12-26 2023-04-28 中国农业银行股份有限公司 A method, device, equipment and storage medium for performance testing of cryptographic algorithms

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8386791B2 (en) * 2004-03-11 2013-02-26 Oberthur Technologies Secure data processing method based particularly on a cryptographic algorithm
WO2017080769A1 (en) * 2015-11-09 2017-05-18 Koninklijke Philips N.V. A cryptographic device arranged to compute a target block cipher
CN106850603A (en) * 2017-01-19 2017-06-13 北京洋浦伟业科技发展有限公司 A kind of whitepack password Bidirectional identity authentication method, terminal, service end and system
CN107438065A (en) * 2016-05-27 2017-12-05 三星Sds株式会社 Data encryption device and method, data decryption apparatus and method
CN107612683A (en) * 2017-09-30 2018-01-19 上海众人网络安全技术有限公司 A kind of encipher-decipher method, device, system, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8386791B2 (en) * 2004-03-11 2013-02-26 Oberthur Technologies Secure data processing method based particularly on a cryptographic algorithm
WO2017080769A1 (en) * 2015-11-09 2017-05-18 Koninklijke Philips N.V. A cryptographic device arranged to compute a target block cipher
CN107438065A (en) * 2016-05-27 2017-12-05 三星Sds株式会社 Data encryption device and method, data decryption apparatus and method
CN106850603A (en) * 2017-01-19 2017-06-13 北京洋浦伟业科技发展有限公司 A kind of whitepack password Bidirectional identity authentication method, terminal, service end and system
CN107612683A (en) * 2017-09-30 2018-01-19 上海众人网络安全技术有限公司 A kind of encipher-decipher method, device, system, equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114514724A (en) * 2019-10-17 2022-05-17 Arm有限公司 Obfuscation of operations in a computing device
CN113452505A (en) * 2020-03-27 2021-09-28 北京奇虎科技有限公司 Encryption method and device based on symmetric algorithm
CN113746735A (en) * 2020-05-28 2021-12-03 阿里巴巴集团控股有限公司 Detection method, device and equipment of controller and computer storage medium
CN116032496A (en) * 2022-12-26 2023-04-28 中国农业银行股份有限公司 A method, device, equipment and storage medium for performance testing of cryptographic algorithms

Similar Documents

Publication Publication Date Title
US11251935B2 (en) Multiplicative blinding for cryptographic operations
US10389517B2 (en) Using secure key storage to bind a white-box implementation to one platform
US9571289B2 (en) Methods and systems for glitch-resistant cryptographic signing
US10097342B2 (en) Encoding values by pseudo-random mask
CN108494546A (en) A kind of whitepack encryption method, device and storage medium
CN109040091A (en) The encryption method and device of deep neural network model
EP3596876B1 (en) Elliptic curve point multiplication device and method for signing a message in a white-box context
US20120284533A1 (en) Method and circuit for cryptographic operation
CN107609418A (en) Desensitization method, device, storage device and the computer equipment of text data
CN105406957B (en) Encryption device confrontation is protected to realize attack
CN103404073B (en) Protection Against Passive Listening
EP2922235B1 (en) Security module for secure function execution on untrusted platform
US10572635B2 (en) Automatic correction of cryptographic application program interfaces
CN108574566A (en) A kind of whitepack encipher-decipher method, device and storage medium
US20170141911A1 (en) Split-and-merge approach to protect against dfa attacks
CN108416224B (en) A kind of data encryption/decryption method and device
CN109687966A (en) Encryption method and its system
CN108111622A (en) A kind of method, apparatus and system for downloading whitepack library file
CN112383523B (en) Image encryption method, related device and storage medium
EP3664359A1 (en) A computation device using shared shares
CN105978680A (en) Implementing padding in a white-box implementation
Drăguşin et al. A Brief Overview Of Current Encryption Techniques Used In Embedded Systems: Present And Future Technologies
CN107391974A (en) A kind of backup method and device of software protecting equipment data
CN103246494A (en) Safety modular exponentiation method for resisting energy analysis and fault attack
WO2025129873A1 (en) Cross-institution blacklist sharing method and system based on reusable garbled circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180925