CN110535642A - A kind of method, intelligent terminal and the storage medium of dispersion storage key - Google Patents
A kind of method, intelligent terminal and the storage medium of dispersion storage key Download PDFInfo
- Publication number
- CN110535642A CN110535642A CN201910822954.3A CN201910822954A CN110535642A CN 110535642 A CN110535642 A CN 110535642A CN 201910822954 A CN201910822954 A CN 201910822954A CN 110535642 A CN110535642 A CN 110535642A
- Authority
- CN
- China
- Prior art keywords
- data
- key
- data block
- file
- block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/085—Secret sharing or secret splitting, e.g. threshold schemes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0894—Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses method, intelligent terminal and the storage mediums of a kind of dispersion storage key, which comprises dynamic random generates multiple modules for dispersing to store key;Multiple modules are subjected to on-the-flier compiler and carry out packing preservation;During handling user APP, the key is divided into multiple data blocks and carries out distributed and saved;When operation, multiple data blocks are combined, generate integrity key.Invention enhances the safeties of algorithm secret key, allow key it is safer be stored in muti-piece resource, in code module, during dynamic operation, it is applied in combination in real time, guarantees that key is that dispersion is stored in multiple places, and what is stored is some scattered data blocks under static state, when final operation, data block is combined, final key is generated, achievees the purpose that guarantee key secure storage.
Description
Technical field
The present invention relates to computer application technology more particularly to a kind of methods of dispersion storage key, intelligent terminal
And storage medium.
Background technique
Present Android APP applies increasingly common in life, and the function of Android application is also increasingly
It is more, wherein being no lack of the various information for involving the various sensitivities such as fund, personal information, secrecy technology.
The way of the safety of general warranty information is that it is encrypted using algorithm, and the safety of algorithm is general
It is all guaranteed, for example (SM algorithm, national secret algorithm are a series of calculations that State Commercial Cryptography Administration formulates standard to national secret algorithm series
Method), international algorithm series (AES etc., by the U.S. security bureau issue, be commercial algorithm most general now);But it calculates
There are also another important security parameters for method, are exactly the code key of algorithm, code key is directly related to whole safety, it may be said that
It is most important parameter in ciphering process.
But various preservation means in the prior art are generally all relatively simple, safety is not high;Such as it is key is direct
It writes in java code, such mode is least safe, is easy to be directly acquired, further be directly written in C layer identification code, still
This mode is also inadequate safety, again may be by the softwares such as IDA and simply obtains.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
The main purpose of the present invention is to provide method, intelligent terminal and the storage medium of a kind of dispersion storage key, purports
Leakage important information is easy solving the problem of that Encryption Algorithm safety in the prior art is not high.
To achieve the above object, the present invention provides a kind of method of dispersion storage key, the side of the dispersion storage key
Method includes the following steps:
Dynamic random generates multiple modules for dispersing to store key;
Multiple modules are subjected to on-the-flier compiler and carry out packing preservation;
During handling user APP, the key is divided into multiple data blocks and carries out distributed and saved;
When operation, multiple data blocks are combined, generate integrity key.
Optionally, the method for the dispersion storage key, wherein the dynamic random generates multiple for dispersing storage
The module of key, specifically includes:
Random data combination A and random index table B is stored in sound code file, and is written in source file, is defined as the
One module;
32 random data combinations are generated, and an index value C is randomly generated, 32 random data is combined and is written
In the source file, the index value C is saved in java code, the second module is defined as;
Burst of data is randomly generated, calculates the hash value of the data, and is stored in the java code, is defined as
Three modules;
A resource file is randomly generated, the resource file is stored under APK Resource TOC, is defined as the 4th mould
Block.
Optionally, the method for the dispersion storage key, wherein described that multiple modules are subjected to on-the-flier compiler simultaneously
Packing preservation is carried out, is specifically included:
The source file is compiled into the library dynamic SO;
It is DEX file by the java code compilation;
The resource file being randomly generated is bundled in APK file.
Optionally, the method for the dispersion storage key, wherein it is described during handling user APP, it will be described close
Key is divided into multiple data blocks and carries out distributed and saved, specifically includes:
It obtains and applies APP packet name, form the first data block;
The random index table B is obtained from the library SO of on-the-flier compiler, A is combined in the random data according to index
It is middle to obtain corresponding data, form the second data block;
Obtain 32 random data combination from the library SO of on-the-flier compiler, and from the DEX of the java code
The index value C that preservation is obtained in file removes 31 data combination outside the index value C, cycle calculations hash value, shape
At third data block;
The hash value of storage is read from the java code, forms the 4th data block;
The data of preservation are read from the resource file, and calculate hash value, form the 5th data block.
Optionally, the method for the dispersion storage key, wherein when the operation, multiple data blocks are carried out
Combination generates integrity key, specifically includes:
It is calculated according to first data block, the second data block, third data block, the 4th data block and the 5th data block
Hash value, and generate key character string;
In dynamic operation, by first data block, the second data block, third data block, the 4th data block and the 5th
Data block carries out cipher key combinations and generates integrity key.
Optionally, the method for the dispersion storage key, wherein first data block includes with uniqueness
APP packet name;
Key distributed and saved in second data block is into C layer identification code file, and on-the-flier compiler is into SO file;
The data of the third data block are stored in the C layer identification code file, and carry out dynamic combined at runtime;
The data of a string of 256 byte lengths are randomly generated during progress, hash value is taken to the data, by hash value
It is saved in the java code, and is compiled as DEX file, at runtime, obtain the hash value that java code saves and obtain institute
State the 4th data block;
One piece of data for being not fixed length in the process of processing, is being randomly generated to user APP, is then being stored in
In the resource file below assets Resource TOC, during on-the-flier compiler, this file is stored in APK, is being transported
Row order section reads the resource file, takes hash value to obtain the 5th data block data.
Optionally, the method for the dispersion storage key, wherein the key distributed and saved in second data block arrives
In C layer identification code file, and on-the-flier compiler is specifically included into SO file:
One piece of data content is randomly generated, and an array of indexes table is randomly generated;
The data content and the array of indexes table are written in C code file;
During on-the-flier compiler, sound code file is compiled into the dynamic library SO, in the process of running, described in calling
The library SO obtains the array of indexes table and randomized block data, further according to the array of indexes table in the random data block
Face obtains true content, obtains second data block.
Optionally, the method for the dispersion storage key, wherein the data of the third data block are stored in the C
In layer identification code file, and dynamic combined is carried out at runtime, specifically include:
32 groups of data blocks are randomly generated, every group of data block exists in the C layer identification code file, and is compiled as SO file;
The index value within one 32 is randomly generated, is stored in the java code, and be compiled as DEX file;
In the process of running, the index data saved according to the java code excludes the data block of this index, will remain
Under 31 pieces of data block cycle calculations hash values, the hash of the first block number evidence combines calculating with the hash value of the second block number evidence
Hash, then hash is calculated with the hash combination of third block number evidence, and so on, a hash value is finally got, is obtained described
Third data block.
In addition, to achieve the above object, the present invention also provides a kind of intelligent terminals, wherein the intelligent terminal includes: to deposit
Reservoir, processor and the program for dispersing storage key that is stored on the memory and can run on the processor, institute
It states and realizes the step of dispersion as described above stores the method for key when the program for dispersing to store key is executed by the processor.
In addition, to achieve the above object, the present invention also provides a kind of storage mediums, wherein the storage medium is stored with
The program of the program of dispersion storage key, the dispersion storage key realizes dispersion storage as described above when being executed by processor
The step of method of key.
In the present invention, multiple modules for dispersing to store key are generated by dynamic random;By multiple modules into
Mobile state compiles and carries out packing preservation;During handling user APP, the key is divided into multiple data blocks and is dispersed
It saves;When operation, multiple data blocks are combined, generate integrity key.Invention enhances the safety of algorithm secret key
Property, allow key it is safer be stored in muti-piece resource, in code module, during dynamic operation, carry out real-time group
It closes and uses, guarantee that key is that dispersion is stored in multiple places, and what is stored is some scattered data blocks under static state, most
Eventually when operation, data block is combined, final key is generated, achievees the purpose that guarantee key secure storage.
Detailed description of the invention
Fig. 1 is the flow chart of the preferred embodiment of the method for present invention dispersion storage key;
Fig. 2 is the running environment schematic diagram of the preferred embodiment of intelligent terminal of the present invention.
Specific embodiment
To make the objectives, technical solutions, and advantages of the present invention clearer and more explicit, right as follows in conjunction with drawings and embodiments
The present invention is further described.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and do not have to
It is of the invention in limiting.
The method of dispersion storage key described in present pre-ferred embodiments, as shown in Figure 1, the dispersion storage key
Method the following steps are included:
Step S10, dynamic random generates multiple modules for dispersing to store key.
Specifically, random data combination A and random index table B is stored in sound code file, and source file is written
In (encRandom Buffer.h), it is defined as the first module;32 random data combinations are generated, and an index is randomly generated
32 random data combination is written in the source file, the index value C is saved in java code, defined by value C
For the second module;Burst of data is randomly generated, calculates hash value (cryptographic Hash, also known as hash function or hash calculation of the data
Method, also known as hash function are a kind of methods for creating small number " fingerprint " from any kind of data, and hash function is message
Or data compression, so that data volume becomes smaller, the format of data is fixed up at abstract), and be stored in the java code,
It is defined as third module;A resource file is randomly generated, by the resource file be stored in APK (AndroidPackage, i.e.,
Android installation kit) under Resource TOC, it is defined as the 4th module.
Step S20, multiple modules are subjected to on-the-flier compiler and carry out packing preservation.
Specifically, the source file is compiled into the library dynamic SO;It is DEX file by the java code compilation;It will be with
The resource file that machine generates is bundled in APK file.
Wherein, DEX is the executable file of (Dalvik virtual machine) in Android platform, is equivalent in windows platform
Exe file, have DEX file in each APK installation kit, the inside contains all source codes of the APP, passes through decompiling instrument
It is available to arrive corresponding java source code.
Due to can directly be seen that java source code by decompiling DEX file, more and more APP (including malicious virus
APP reinforcement technique is all employed) to prevent APP by decompiling easily, when needing the malicious virus APP reinforced to one to divide
Analysis or when being cracked to an APP, it is necessary to understand DEX file format, after the DEX file of reinforcing is restored (shelling) again into
Row decompiling obtains java source code.
Step S30, during handling user APP, the key is divided into multiple data blocks and carries out distributed and saved.
Specifically, it obtains and applies APP packet name, form the first data block;Described in being obtained from the library SO of on-the-flier compiler
Random index table B obtains corresponding data in random data combination A according to index, forms the second data block;From dynamic
32 random data combination is obtained in the library SO of compiling, and is obtained and saved from the DEX file of the java code
The index value C, remove outside the index value C 31 data combination, cycle calculations hash value, formed third data block;
The hash value of storage is read from the java code, forms the 4th data block;The number of preservation is read from the resource file
According to, and hash value is calculated, form the 5th data block.
Wherein, first data block: dynamically directly acquiring the APP packet name of user, and packet name has in Android application
Uniqueness is used herein as packet name as the data in first data block.
Second data block: key carries out inside distributed and saved to C layer identification code file, and in on-the-flier compiler to SO file
Face;Firstly, one piece of data content is randomly generated in platform, an array of indexes table is then randomly generated, and (array of indexes table is exactly needle
1024 data contents are produced to the index data of the Position Number of earlier data, such as front, here just in 0-1024
Between randomly select the indexes of multiple data), this group of data length is also to need to be randomly generated, but be less than a block number
According to content-length;Then it this block data content and array of indexes table, is written to inside C code header file, in case subsequent tune
With;This sound code file can be compiled to inside the library dynamic SO, in the process of running, can call during on-the-flier compiler below
SO dynamic base, to obtain array indexing table and random block number evidence, then according to array of indexes table in random data block
Face obtains true content, obtains the data of the second final data block.
It is specific to obtain rule: assuming that the storage of array of indexes table is 0x01, then to represent and need to read inside random data block
0x01 data ... and so on.
The third data block: this partial data technical principle is similar to second data block portions, and uses dynamic
Technique of compiling, critical data is stored in C layer identification code module, and carries out dynamic combined at runtime, but is used in processing
And the technology that Java layer identification code combines, specifically: 32 groups of data blocks can be randomly generated in platform, these data blocks all have C
Inside layer identification code, and it is compiled as SO file below, the index value within one 32 in addition can be randomly generated, be stored in Java
Inside layer identification code, it is then compiled into DEX file;In the process of running, the index data saved first according to Java layer identification code, row
The data block for removing this index, remaining 31 pieces of data blocks, cycle calculations hash value, hash and second piece of the first block number evidence
The hash value combination of data calculates hash, then calculates hash and so in the hash combination with third block number evidence, finally obtains
A hash value is got, the data as the third data block.
4th data block: can be randomly generated the data of a string of 256 byte lengths during progress, to this block number evidence
Hash value is taken, then this hash value is saved in inside Java code, in on-the-flier compiler module, is compiled as DEX file;It is running
When, the hash value that can obtain the preservation of Java layer identification code obtains the data of the 4th data block.
5th data block: during to user APP processing, being randomly generated one piece of data for being not fixed length,
Then it is stored in inside the png file below assets Resource TOC, during on-the-flier compiler, this file can be stored in
Inside APK;In the operation phase, this resource file is first read, then takes hash value to obtain the 5th data block data
Data.
Step S40, when running, multiple data blocks are combined, generate integrity key.
Specifically, according to first data block, the second data block, third data block, the 4th data block and the 5th data
Block calculates hash value, and generates key character string;In dynamic operation, by first data block, the second data block, third number
Cipher key combinations, which are carried out, according to block, the 4th data block and the 5th data block generates integrity key.
SM4 block cipher key length is 128bit, is saved to this key using the theory of distributed storage
And eventually on-the-flier compiler generates algorithm SO file, while can be randomly generated in Java code layer and APP resource file
The cipher key combinations at this several place are finally generated final algorithm secret key by part of key.
Present invention aim to enhance the safety of algorithm secret key, the muti-piece that is stored in for making key safer is provided
It in the modules such as source, code, during dynamic operation, is applied in combination, is guaranteed under static state, key is in real time
Dispersion is stored in multiple places, and what is stored is some scattered data blocks, finally when operation, is combined to data block,
Final key is generated, the function of guaranteeing code key secure storage is reached.
Further, as shown in Fig. 2, the method based on above-mentioned dispersion storage key, the present invention further correspondingly provide one kind
Intelligent terminal, the intelligent terminal include: processor 10, memory 20 and display 30.Fig. 2 illustrates only the portion of intelligent terminal
Subassembly, it should be understood that being not required for implementing all components shown, the implementation that can be substituted is more or less
Component.
The memory 20 can be the internal storage unit of the intelligent terminal in some embodiments, such as intelligence is eventually
The hard disk or memory at end.The external storage that the memory 20 is also possible to the intelligent terminal in further embodiments is set
Plug-in type hard disk that is standby, such as being equipped on the intelligent terminal, intelligent memory card (Smart Media Card, SMC), safe number
Word (Secure Digital, SD) card, flash card (Flash Card) etc..Further, the memory 20 can also be wrapped both
The internal storage unit for including the intelligent terminal also includes External memory equipment.The memory 20 is installed on described for storage
The application software and Various types of data of intelligent terminal, such as the program code etc. of the installation intelligent terminal.The memory 20 is also
It can be used for temporarily storing the data that has exported or will export.In one embodiment, it is stored on memory 20 point
The program 40 of storage key is dissipated, the program 40 which stores key can be performed by processor 10, to realize in the application
The method of dispersion storage key.
The processor 10 can be in some embodiments a central processing unit (Central Processing Unit,
CPU), microprocessor or other data processing chips, for running the program code stored in the memory 20 or processing number
According to, such as execute the method etc. of the dispersion storage key.
The display 30 can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display in some embodiments
And OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..The display 30 is used
In the information for being shown in the intelligent terminal and for showing visual user interface.The component 10- of the intelligent terminal
30 are in communication with each other by system bus.
In one embodiment, realized when processor 10 executes in the memory 20 program 40 of dispersion storage key with
Lower step:
Dynamic random generates multiple modules for dispersing to store key;
Multiple modules are subjected to on-the-flier compiler and carry out packing preservation;
During handling user APP, the key is divided into multiple data blocks and carries out distributed and saved;
When operation, multiple data blocks are combined, generate integrity key.
The dynamic random generates multiple modules for dispersing to store key, specifically includes:
Random data combination A and random index table B is stored in sound code file, and is written in source file, is defined as the
One module;
32 random data combinations are generated, and an index value C is randomly generated, 32 random data is combined and is written
In the source file, the index value C is saved in java code, the second module is defined as;
Burst of data is randomly generated, calculates the hash value of the data, and is stored in the java code, is defined as
Three modules;
A resource file is randomly generated, the resource file is stored under APK Resource TOC, is defined as the 4th mould
Block.
It is described that multiple modules are subjected to on-the-flier compiler and carry out packing preservation, it specifically includes:
The source file is compiled into the library dynamic SO;
It is DEX file by the java code compilation;
The resource file being randomly generated is bundled in APK file.
It is described that the key is divided into multiple data blocks and carries out distributed and saved during handling user APP, it is specific to wrap
It includes:
It obtains and applies APP packet name, form the first data block;
The random index table B is obtained from the library SO of on-the-flier compiler, A is combined in the random data according to index
It is middle to obtain corresponding data, form the second data block;
Obtain 32 random data combination from the library SO of on-the-flier compiler, and from the DEX of the java code
The index value C that preservation is obtained in file removes 31 data combination outside the index value C, cycle calculations hash value, shape
At third data block;
The hash value of storage is read from the java code, forms the 4th data block;
The data of preservation are read from the resource file, and calculate hash value, form the 5th data block.
When the operation, multiple data blocks are combined, integrity key is generated, specifically includes:
It is calculated according to first data block, the second data block, third data block, the 4th data block and the 5th data block
Hash value, and generate key character string;
In dynamic operation, by first data block, the second data block, third data block, the 4th data block and the 5th
Data block carries out cipher key combinations and generates integrity key.
First data block includes APP packet name with uniqueness;
Key distributed and saved in second data block is into C layer identification code file, and on-the-flier compiler is into SO file;
The data of the third data block are stored in the C layer identification code file, and carry out dynamic combined at runtime;
The data of a string of 256 byte lengths are randomly generated during progress, hash value is taken to the data, by hash value
It is saved in the java code, and is compiled as DEX file, at runtime, obtain the hash value that java code saves and obtain institute
State the 4th data block;
One piece of data for being not fixed length in the process of processing, is being randomly generated to user APP, is then being stored in
In the resource file below assets Resource TOC, during on-the-flier compiler, this file is stored in APK, is being transported
Row order section reads the resource file, takes hash value to obtain the 5th data block data.
Key distributed and saved in second data block is into C layer identification code file, and on-the-flier compiler has into SO file
Body includes:
One piece of data content is randomly generated, and an array of indexes table is randomly generated;
The data content and the array of indexes table are written in C code file;
During on-the-flier compiler, sound code file is compiled into the dynamic library SO, in the process of running, described in calling
The library SO obtains the array of indexes table and randomized block data, further according to the array of indexes table in the random data block
Face obtains true content, obtains second data block.
The data of the third data block are stored in the C layer identification code file, and carry out dynamic combined at runtime, tool
Body includes:
32 groups of data blocks are randomly generated, every group of data block exists in the C layer identification code file, and is compiled as SO file;
The index value within one 32 is randomly generated, is stored in the java code, and be compiled as DEX file;
In the process of running, the index data saved according to the java code excludes the data block of this index, will remain
Under 31 pieces of data block cycle calculations hash values, the hash of the first block number evidence combines calculating with the hash value of the second block number evidence
Hash, then hash is calculated with the hash combination of third block number evidence, and so on, a hash value is finally got, is obtained described
Third data block.
Further, the present invention also provides a kind of storage mediums, wherein the storage medium is stored with dispersion storage key
Program, the program of the dispersion storage key realizes the method for dispersion storage key as described above when being executed by processor
Step.
In conclusion the present invention provides method, intelligent terminal and the storage medium of a kind of dispersion storage key, the method
It include: that dynamic random generates multiple modules for dispersing to store key;Multiple modules are subjected to on-the-flier compiler and are carried out
It is packaged and saves;During handling user APP, the key is divided into multiple data blocks and carries out distributed and saved;It, will be more when operation
A data block is combined, and generates integrity key.Invention enhances the safeties of algorithm secret key, make key safer
Be stored in muti-piece resource, in code module, during dynamic operation, be applied in combination in real time, guarantee static shape
Key is that dispersion is stored in multiple places, and what is stored is some scattered data blocks under state, finally when operation, to data block
It is combined, generates final key, achieve the purpose that guarantee key secure storage.
Certainly, those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method,
It is that related hardware (such as processor, controller etc.) can be instructed to complete by computer program, the program can store
In a computer-readable storage medium, described program may include the process such as above-mentioned each method embodiment when being executed.
Wherein the storage medium can be memory, magnetic disk, CD etc..
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can
With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention
Protect range.
Claims (10)
1. it is a kind of dispersion storage key method, which is characterized in that it is described dispersion storage key method include:
Dynamic random generates multiple modules for dispersing to store key;
Multiple modules are subjected to on-the-flier compiler and carry out packing preservation;
During handling user APP, the key is divided into multiple data blocks and carries out distributed and saved;
When operation, multiple data blocks are combined, generate integrity key.
2. the method for dispersion storage key according to claim 1, which is characterized in that the dynamic random generates multiple use
In the module of dispersion storage key, specifically include:
Random data combination A and random index table B is stored in sound code file, and is written in source file, the first mould is defined as
Block;
32 random data combinations are generated, and an index value C is randomly generated, it will be described in 32 random data combination write-in
In source file, the index value C is saved in java code, the second module is defined as;
Burst of data is randomly generated, calculates the hash value of the data, and is stored in the java code, is defined as third mould
Block;
A resource file is randomly generated, the resource file is stored under APK Resource TOC, is defined as the 4th module.
3. the method for dispersion storage key according to claim 2, which is characterized in that described to carry out multiple modules
On-the-flier compiler simultaneously carries out packing preservation, specifically includes:
The source file is compiled into the library dynamic SO;
It is DEX file by the java code compilation;
The resource file being randomly generated is bundled in APK file.
4. the method for dispersion storage key according to claim 3, which is characterized in that described in processing user APP process
In, the key is divided into multiple data blocks and carries out distributed and saved, is specifically included:
It obtains and applies APP packet name, form the first data block;
The random index table B is obtained from the library SO of on-the-flier compiler, is obtained in random data combination A according to index
Corresponding data are taken, the second data block is formed;
Obtain 32 random data combination from the library SO of on-the-flier compiler, and from the DEX file of the java code
It is middle to obtain the index value C saved, 31 data combination outside the index value C is removed, cycle calculations hash value forms the
Three data blocks;
The hash value of storage is read from the java code, forms the 4th data block;
The data of preservation are read from the resource file, and calculate hash value, form the 5th data block.
5. the method for dispersion storage key according to claim 4, which is characterized in that, will be multiple described when the operation
Data block is combined, and is generated integrity key, is specifically included:
Hash is calculated according to first data block, the second data block, third data block, the 4th data block and the 5th data block
Value, and generate key character string;
In dynamic operation, by first data block, the second data block, third data block, the 4th data block and the 5th data
Block carries out cipher key combinations and generates integrity key.
6. the method for dispersion storage key according to claim 4, which is characterized in that first data block includes to have
The APP packet name of uniqueness;
Key distributed and saved in second data block is into C layer identification code file, and on-the-flier compiler is into SO file;
The data of the third data block are stored in the C layer identification code file, and carry out dynamic combined at runtime;
The data of a string of 256 byte lengths are randomly generated during progress, hash value is taken to the data, hash value is saved
Into the java code, and it is compiled as DEX file, at runtime, obtains the hash value that java code saves and obtain described the
Four data blocks;
One piece of data for being not fixed length in the process of processing, is being randomly generated to user APP, is then being stored in assets
In the resource file below Resource TOC, during on-the-flier compiler, this file is stored in APK, in the operation phase,
The resource file is read, takes hash value to obtain the 5th data block data.
7. the method for dispersion storage key according to claim 6, which is characterized in that the key in second data block
Distributed and saved is into C layer identification code file, and on-the-flier compiler is specifically included into SO file:
One piece of data content is randomly generated, and an array of indexes table is randomly generated;
The data content and the array of indexes table are written in C code file;
During on-the-flier compiler, sound code file is compiled into the dynamic library SO, in the process of running, calls the SO
Library obtains the array of indexes table and randomized block data, further according to the array of indexes table inside the random data block
True content is obtained, second data block is obtained.
8. the method for dispersion storage key according to claim 6, which is characterized in that the data of the third data block are protected
There are in the C layer identification code file, and dynamic combined is carried out at runtime, specifically include:
32 groups of data blocks are randomly generated, every group of data block exists in the C layer identification code file, and is compiled as SO file;
The index value within one 32 is randomly generated, is stored in the java code, and be compiled as DEX file;
In the process of running, the index data saved according to the java code excludes the data block of this index, will be remaining
31 pieces of data block cycle calculations hash values, the hash of the first block number evidence is combined with the hash value of the second block number evidence calculates hash, then
Hash combination with third block number evidence calculates hash, and so on, a hash value is finally got, the third data are obtained
Block.
9. a kind of intelligent terminal, which is characterized in that the intelligent terminal includes: memory, processor and is stored in the storage
On device and can run on the processor dispersion storage key program, it is described dispersion storage key program by the place
Manage the step of method such as the described in any item dispersion storage keys of claim 1-8 is realized when device executes.
10. a kind of storage medium, which is characterized in that the storage medium is stored with the program of dispersion storage key, the dispersion
The program of storage key is realized when being executed by processor such as the method for the described in any item dispersion storage keys of claim 1-8
Step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910822954.3A CN110535642B (en) | 2019-09-02 | 2019-09-02 | Method for distributing storage keys, intelligent terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910822954.3A CN110535642B (en) | 2019-09-02 | 2019-09-02 | Method for distributing storage keys, intelligent terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110535642A true CN110535642A (en) | 2019-12-03 |
CN110535642B CN110535642B (en) | 2022-09-13 |
Family
ID=68666110
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910822954.3A Active CN110535642B (en) | 2019-09-02 | 2019-09-02 | Method for distributing storage keys, intelligent terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110535642B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111404682A (en) * | 2020-03-17 | 2020-07-10 | 江苏恒宝智能系统技术有限公司 | Android environment key segmentation processing method and device |
CN114844644A (en) * | 2022-03-16 | 2022-08-02 | 深信服科技股份有限公司 | Resource request method, device, electronic equipment and storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101311942A (en) * | 2007-05-23 | 2008-11-26 | 西门子(中国)有限公司 | Software encryption and decryption method and encryption and decryption device |
CN102708069A (en) * | 2012-05-12 | 2012-10-03 | 北京深思洛克软件技术股份有限公司 | Protection method for memory data in Android system |
CN103283177A (en) * | 2010-12-23 | 2013-09-04 | 莫雷加系统股份有限公司 | Cryptography module for use with fragmented key and methods for use therewith |
US20140211944A1 (en) * | 2012-09-24 | 2014-07-31 | Daniel Joseph Lutz | System and method of protecting, storing and decrypting keys over a computerized network |
CN107294702A (en) * | 2017-07-17 | 2017-10-24 | 四川长虹电器股份有限公司 | Front-end code encryption method based on Hybrid APP unique characteristics |
WO2017215148A1 (en) * | 2016-06-17 | 2017-12-21 | 中兴通讯股份有限公司 | File protection method and device |
US20180212785A1 (en) * | 2017-01-25 | 2018-07-26 | Salesforce.Com, Inc. | Secure remote user authentication leveraging public key cryptography and key splitting |
CN108712412A (en) * | 2018-05-15 | 2018-10-26 | 北京五八信息技术有限公司 | A kind of encryption and decryption method of database, device, storage medium and terminal |
CN109005196A (en) * | 2018-09-10 | 2018-12-14 | 北京旷视科技有限公司 | Data transmission method, data decryption method, device and electronic equipment |
CN109495255A (en) * | 2018-12-11 | 2019-03-19 | 中新金桥数字科技(北京)有限公司 | Digital cryptographic key protection method and its system based on android system |
CN109657488A (en) * | 2019-02-26 | 2019-04-19 | 北京智游网安科技有限公司 | A kind of resource file cipher processing method, intelligent terminal and storage medium |
-
2019
- 2019-09-02 CN CN201910822954.3A patent/CN110535642B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101311942A (en) * | 2007-05-23 | 2008-11-26 | 西门子(中国)有限公司 | Software encryption and decryption method and encryption and decryption device |
CN103283177A (en) * | 2010-12-23 | 2013-09-04 | 莫雷加系统股份有限公司 | Cryptography module for use with fragmented key and methods for use therewith |
CN102708069A (en) * | 2012-05-12 | 2012-10-03 | 北京深思洛克软件技术股份有限公司 | Protection method for memory data in Android system |
US20140211944A1 (en) * | 2012-09-24 | 2014-07-31 | Daniel Joseph Lutz | System and method of protecting, storing and decrypting keys over a computerized network |
WO2017215148A1 (en) * | 2016-06-17 | 2017-12-21 | 中兴通讯股份有限公司 | File protection method and device |
US20180212785A1 (en) * | 2017-01-25 | 2018-07-26 | Salesforce.Com, Inc. | Secure remote user authentication leveraging public key cryptography and key splitting |
CN107294702A (en) * | 2017-07-17 | 2017-10-24 | 四川长虹电器股份有限公司 | Front-end code encryption method based on Hybrid APP unique characteristics |
CN108712412A (en) * | 2018-05-15 | 2018-10-26 | 北京五八信息技术有限公司 | A kind of encryption and decryption method of database, device, storage medium and terminal |
CN109005196A (en) * | 2018-09-10 | 2018-12-14 | 北京旷视科技有限公司 | Data transmission method, data decryption method, device and electronic equipment |
CN109495255A (en) * | 2018-12-11 | 2019-03-19 | 中新金桥数字科技(北京)有限公司 | Digital cryptographic key protection method and its system based on android system |
CN109657488A (en) * | 2019-02-26 | 2019-04-19 | 北京智游网安科技有限公司 | A kind of resource file cipher processing method, intelligent terminal and storage medium |
Non-Patent Citations (2)
Title |
---|
刘培鹤等: "基于Android的密钥分存方案", 《计算机应用与软件》 * |
田伟等: "Android数据安全存储平台的设计与实现", 《信息网络安全》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111404682A (en) * | 2020-03-17 | 2020-07-10 | 江苏恒宝智能系统技术有限公司 | Android environment key segmentation processing method and device |
CN114844644A (en) * | 2022-03-16 | 2022-08-02 | 深信服科技股份有限公司 | Resource request method, device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110535642B (en) | 2022-09-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11669637B2 (en) | Decentralized token table generation | |
KR101471589B1 (en) | Method for Providing Security for Common Intermediate Language Program | |
CN110008745B (en) | Encryption method, computer equipment and computer storage medium | |
CN105683990B (en) | Method and apparatus for protecting dynamic base | |
CN117278224A (en) | Method and system for verifying identity attribute information | |
US20150095653A1 (en) | Method and apparatus of creating application package, method and apparatus of executing application package, and recording medium storing application package | |
US20120144208A1 (en) | Indexed table based code encrypting/decrypting device and method thereof | |
CN107273723B (en) | So file shell adding-based Android platform application software protection method | |
CN104866739A (en) | Application program encryption method and application program encryption system in Android system | |
KR20140029562A (en) | Encryption method for preventing decompile of andriod application | |
CN108399319B (en) | Source code protection method, application server and computer readable storage medium | |
CN102238001A (en) | Method and device for enhancing data security | |
CN113010856A (en) | Dynamic asymmetric encryption and decryption JavaScript code obfuscation method and system | |
CN113722683B (en) | Model protection method, device, equipment, system and storage medium | |
CN110210211A (en) | A kind of method of data protection and calculate equipment | |
CN110535642A (en) | A kind of method, intelligent terminal and the storage medium of dispersion storage key | |
CN109241707A (en) | Application program obscures method, apparatus and server | |
CN108985096B (en) | Security enhancement and security operation method and device for Android SQLite database | |
CN103530169B (en) | Method for protecting virtual machine files and user terminal | |
CN110990846B (en) | Information storage method, device and computer readable storage medium | |
CN110147655A (en) | The security protection system and method for application program | |
CN111291333A (en) | Java application program encryption method and device | |
KR101556908B1 (en) | Apparatus For Protecting Binary Code | |
CN115632776B (en) | Secret key burning method and device, electronic equipment and readable storage medium | |
CN112685697B (en) | Method and terminal for preventing cracking and tampering of Ann Zhuo Ying application |
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 |