CN109995526A - A kind of storage method of key and the call method and device of device, key - Google Patents
A kind of storage method of key and the call method and device of device, key Download PDFInfo
- Publication number
- CN109995526A CN109995526A CN201910285103.XA CN201910285103A CN109995526A CN 109995526 A CN109995526 A CN 109995526A CN 201910285103 A CN201910285103 A CN 201910285103A CN 109995526 A CN109995526 A CN 109995526A
- Authority
- CN
- China
- Prior art keywords
- language
- key
- executable program
- data packet
- compiling
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/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)
- Devices For Executing Special Programs (AREA)
Abstract
The embodiment of the invention discloses the call methods and device of a kind of storage method of key and device, key, primary key is encrypted using first language, obtain the corresponding executable program of first language, and compile the executable program, data packet is obtained, which is that can not obtain the programming language of executable program by carrying out reversed compiling to data packet;Then, which is stored under the target directory of second language engineering, completes preservation to primary key, wherein the second language is programming language used in the application development installed in terminal.In this way, by reversely compiling encryption of the first language for being unable to get source code to primary key, and it is stored under the project directory of second language used in application development, other people can not decode out the primary key by reversely compiling again, but need to obtain key using the call method of key provided by the invention, improve the safety of key storage.
Description
Technical field
The present invention relates to field of computer technology, the tune of storage method and device, key more particularly to a kind of key
Use method and apparatus.
Background technique
Currently, " key " of the key as available other information, is generally stored in local by configuration file, so as to
Real-time perfoming is called when using.And the configuration file is generally configured using the language for being easily reversed compiling, and such as: pass through
Extensible markup language (English: eXtensible Markup Language, referred to as: XML) generate configuration file.
But malicious person is easily reversed the configuration file of compiling (such as XML format) to this, it is easy to
By reversely compiling the key decoded out and stored in the configuration file, its of user is obtained so as to the key that utilization is decoded out
His information, causes user information to be revealed.As information security is increasingly paid attention to by masses, it would be highly desirable to provide more safe and reliable
Method for storing cipher key, to protect the information security of user.
Summary of the invention
In order to solve the above-mentioned technical problem, the embodiment of the present invention provides the storage method and device and key of a kind of key
Call method and device, can be by the nesting between language that the language for being not easy reversely to compile and application program are supported, really
It is stored in local key and will not easily pass through decompiling and be decrypted out, to realize the secure storage and tune of key
With.
In a first aspect, providing a kind of storage method of key, comprising:
Primary key is encrypted using first language, obtains the corresponding executable program of the first language;
The executable program is compiled, data packet is obtained;
The data packet is stored under the target directory of second language engineering;
Wherein, the first language is that can not obtain the executable program by carrying out reversed compiling to the data packet
Programming language;The second language is programming language used in the application development installed in terminal.
It is optionally, described that by primary key to be encrypted to obtain the first language using first language corresponding executable
Program, comprising:
Under the first language environment, the primary key is encrypted using predetermined encryption algorithm, is encrypted
Key;
The encryption key is written in the corresponding executable program of the first language.
Optionally, the first language is C language, C Plus Plus or Python.
Optionally, the second language is Java language.
In embodiments of the present invention, it is possible, firstly, to which primary key is encrypted using first language, described first is obtained
The corresponding executable program of language, and the executable program is compiled, obtain data packet, wherein the first language is that can not lead to
It crosses that the data packet reversely compile and obtains the programming language of the executable program;It then, can be by the data packet
It is stored under the target directory of second language engineering, completes the preservation to primary key, wherein the second language is to pacify in terminal
Programming language used in the application development of dress.In this way, being unable to get the first language pair of source code by reversely compiling
The encryption of primary key, and be stored under the project directory of second language used in application development, other people can not be again
The primary key is decoded out by reversely compiling, but is needed (detailed using the call method of key provided in an embodiment of the present invention
See second aspect) key of storage of the embodiment of the present invention is obtained, the safety of key storage is substantially increased, is overcome
Not safe enough the problem of key is locally stored.
Second aspect provides a kind of call method of key, comprising:
Corresponding second executable program of second language is executed, under the target directory for calling the engineering of the second language
Data packet;The data packet is derived and saved in the target directory by the corresponding first executable program compiling of first language
Under;
Based on the mapping relations between the first language and the second language, the data packet is parsed, is obtained described
Corresponding first executable program of first language;
Primary key is obtained according to first executable program;
Wherein, the first language is that can not obtain the executable program by carrying out reversed compiling to the data packet
Programming language;The second language is programming language used in the application development installed in terminal.
It is optionally, described that primary key is obtained according to first executable program, comprising:
From first executable program, encryption key is obtained;
Using the corresponding decipherment algorithm of predetermined encryption algorithm, the encryption key is decrypted, is obtained described original close
Key.
Optionally, the first language is C language, C Plus Plus or Python.
Optionally, the second language is Java language.
Optionally, the mapping relations are Java local interface JNI.
In embodiments of the present invention, the primary key saved for the storage method of the key provided using first aspect,
If necessary to call the primary key, it is possible, firstly, to execute corresponding second executable program of second language, described second is called
Data packet under the target directory of the engineering of language, the data packet are compiled to obtain by corresponding first executable program of first language
And it is stored under the target directory;Then, based on the mapping relations between the first language and the second language, parsing
The data packet obtains corresponding first executable program of the first language;Then, it is obtained according to first executable program
Obtain primary key;Wherein, the first language is that can not obtain described can be performed by carrying out reversed compiling to the data packet
The programming language of program;The second language is programming language used in the application development installed in terminal.In this way, logical
The mapping relations (such as calling interface) between first language and second language are crossed, the second language that application program is supported can be adjusted
With and parse be not easy decompiling language, obtain primary key, other people can not again easily by reversely compiling decode out the original
Beginning key substantially increases the safety of key storage, overcomes and not safe enough the problem of key is locally stored.
The third aspect provides a kind of storage device of key, comprising:
Encryption unit, for encrypting primary key using first language, obtaining that the first language is corresponding can
Execute program;
Compilation unit obtains data packet for compiling the executable program;
Storage unit, for the data packet to be stored under the target directory of second language engineering;
Wherein, the first language is that can not obtain the executable program by carrying out reversed compiling to the data packet
Programming language;The second language is programming language used in the application development installed in terminal.
Optionally, encryption unit, comprising:
Encryption sub-unit operable, under the first language environment, to the primary key using predetermined encryption algorithm into
Row encryption, obtains encryption key;
Subelement is written, for the encryption key to be written in the corresponding executable program of the first language.
Optionally, the first language is C language, C Plus Plus or Python.
Optionally, the second language is Java language.
Fourth aspect provides a kind of calling device of key, comprising:
Call unit calls the engineering of the second language for executing corresponding second executable program of second language
Target directory under data packet;The data packet is derived and saved in by the corresponding first executable program compiling of first language
Under the target directory;
Resolution unit, for parsing the number based on the mapping relations between the first language and the second language
According to packet, corresponding first executable program of the first language is obtained;
Acquiring unit, for obtaining primary key according to first executable program;
Wherein, the first language is that can not obtain the executable program by carrying out reversed compiling to the data packet
Programming language;The second language is programming language used in the application development installed in terminal.
Optionally, the acquiring unit, comprising:
Subelement is obtained, for obtaining encryption key from first executable program;
Subelement is decrypted, for using the corresponding decipherment algorithm of predetermined encryption algorithm, the encryption key to be decrypted,
Obtain the primary key.
Optionally, the first language is C language, C Plus Plus or Python.
Optionally, the second language is Java language.
Optionally, the mapping relations are Java local interface JNI.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations recorded in the present invention
Example, for those of ordinary skill in the art, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of the storage method of key provided in an embodiment of the present invention;
Fig. 2 is an exemplary flow diagram of step 101 provided in an embodiment of the present invention;
Fig. 3 is a kind of flow diagram of the call method of key provided in an embodiment of the present invention;
Fig. 4 is an exemplary flow diagram of step 303 provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of the storage device of key provided in an embodiment of the present invention;
Fig. 6 is a kind of structural schematic diagram of the calling device of key provided in an embodiment of the present invention.
Specific embodiment
Currently, verifying for convenience, many keys are stored in terminal local, can generally be deposited by configuration file
Storage, such as: key is saved by the configuration file of XML format.But it is easy to be reversed compiling since configuration file generally uses
Language (such as: XML) configuration, easily by malicious person by reversely compiling decode out stored in the configuration file it is close
Key causes user information to be revealed so as to obtain the other information of user using the key decoded out.It should be noted that
It is easy to be reversed the language of compiling, such as: XML, Java etc., the executable program write can pass through simple reversed compiling
Process obtains the corresponding source code of the executable program, so as to intuitively acquire the key write in source code.
Based on this, in order to solve the above-mentioned technical problem, the embodiment of the invention provides a kind of storage methods of key, device
And the call method and device of key, it is unable to get the first language of source code by reversely compiling primary key is added
It is close, and be stored under the project directory of second language used in application development, other people can not be again by reversely compiling
The call method for the key decoded out the primary key, but need accordingly to be provided using the embodiment of the present invention implements the present invention
The key of example storage is obtained, and the safety of key storage is substantially increased, and overcomes that key is locally stored is not safe enough
Problem.
As an example it is assumed that being unable to get the C voice of source code using reversed compiling in the embodiment of the present invention and being equipped with
The application development language Java supported in the mobile phone of Android operation system stores key " abc123 ".It is specific real
Now, when needing to save key " abc123 ", the first step is first encrypted " abc123 " using C language, obtains C language
Executable program X;Second step, compiling X obtain data packet D;Data packet D is stored in some catalogue O of Java engineering by third step
Under, in this way, will " abc123 " be stored in the mobile phone local.It, can when needing that the key is called to go to obtain other information
To execute the corresponding executable program of Java, the data packet D under the catalogue O of Java engineering is called, then, is based on Java and C language
Mapping relations between speech parse data packet D, the executable program X of C language are obtained, finally, obtaining key from X
“abc123”。
It, can be by the language that is not easy reversely to compile and using journey in this way, in technical solution provided in an embodiment of the present invention
The nesting between language that sequence is supported, it is ensured that be stored in local key and will not easily pass through decompiling and be decrypted out, that is, right
Data packet D under Java engineering catalogue O cannot reversely compile the source code X including key that be decrypted out by simple, such as
This, realizes the secure storage and calling of key.
It is understood that above-mentioned is only a Sample Scenario provided in an embodiment of the present invention, the embodiment of the present invention is not
It is limited to this scene.
With reference to the accompanying drawing, by embodiment come a kind of storage method and dress of key in the present invention will be described in detail embodiment
It sets, the specific implementation of the call method of key and device.
Fig. 1 is a kind of flow diagram of the storage method of key provided in an embodiment of the present invention, referring to Fig. 1, the present invention
Embodiment can specifically include:
Step 101, primary key is encrypted using first language, obtains the corresponding executable journey of the first language
Sequence.
Step 102, the executable program is compiled, data packet is obtained.
Wherein, which is that can not obtain the executable program by carrying out reversed compiling to the data packet
Programming language.
It is understood that for programming language, according to whether can be reversed compiling, two classes can be roughly divided into, first
Class be easy to be reversed the programming language of compiling, such as: XML, Java etc., the source code write using such programming language are passed through
The data packet obtained after compiling can readily be reversed compiling, that is, reversely obtain source code by data packet;Second class is
It is not easy even be reversed the programming language of compiling completely, such as: C language, C Plus Plus, Python etc. utilize this
The data packet that the source code that class programming language is write obtains after compiling, can not compile to obtain its source code by direction.
When specific implementation, the first language in step 101 can be using C language, C Plus Plus or Python etc. no
The programming language easily reversely compiled.
It is understood that can determine the use of first language according to actual needs and add to what primary key was encrypted
Close mode.
As an example, the primary key relatively weak for significance level, can directly will be to be saved original close
Key is written in C language, obtains C language executable program directly including primary key.In this way, the C language executable program into
The data packet obtained after row compiling, can not directly obtain the C language executable program by reversely compiling, to can not therefrom obtain
The primary key is got, improves the safety and reliability of key storage to a certain extent.
As another example, the primary key relatively high for significance level, can be according to mode as shown in Figure 2
It realizes step 101, can specifically include:
Step 1011, under the first language environment, the primary key is encrypted using predetermined encryption algorithm,
Obtain encryption key;
Step 1012, the encryption key is written in the corresponding executable program of the first language.
It is understood that the predetermined encryption algorithm can be pre-set symmetric encipherment algorithm (such as: DES,
3DES, RC4, RC5 etc.), rivest, shamir, adelman (such as: RSA, Diffie-Hellman, El Gamal) or Hash encryption
Algorithm (such as: MD2, MD5, HAVAL, SHA).User can need self-setting.As an example, C language can use
The corresponding C language executable program of predetermined encryption algorithm is write in advance, and is added thereto primary key as encrypted object, is made
For C language executable program obtained in step 101;As another example, the predetermined encryption algorithm can also be advanced with
The primary key is encrypted, corresponding encryption key is obtained, then directly the encryption key is written in C language,
Obtain include encryption key C language executable program.
When specific implementation, primary key to be saved is passed through first language (such as C language) corresponding encryption by the first step
Algorithm is encrypted, and obtains encryption key;The encryption key is utilized the corresponding executable journey of the first language by second step
In sequence.In this way, the data packet that the first language executable program obtains after being compiled, on the one hand, can not be by reversely compiling
The first language executable program is directly obtained, so that the primary key can not therefrom be got;On the other hand, even if can lead to
It crosses reversed compiling and obtains the first language executable program, then, due to passing through predetermined encryption algorithm in the first language program
Encryption has been carried out to primary key, the corresponding primary key of the encryption key also can not have easily been known, be relevant to this
The safety and reliability of key storage increases dual fail-safe.
It is understood that having obtained data by compiling of the step 102 to the corresponding executable program of first language
Packet, which, which is not easy to be reversed to compile, obtains the source code of the first language executable program.It is locally stored in this way, improving
The safety of primary key, to improve the reliability for the relevant information that the primary key is protected.
Step 103, the data packet is stored under the target directory of second language engineering.
Wherein, which is programming language used in the application development installed in terminal.
When specific implementation, due to save the primary key in terminal local, therefore, it is determined the behaviour installed in terminal
Make to support programming language used in application development in system, is denoted as second language;Then, by the data packet this time the
Under the target directory of two language engineerings, on the one hand, facilitate the subsequent calling to the primary key, improve user experience;Another party
Face is saved by first language the nested of second language with application program is supported for being not easy reversely to compile, is improved original close
The safety that key is locally stored.
It is understood that the operating system if necessary to the terminal installation of storage primary key is Android system, then,
Language used in the application development can be Java language, that is, the second language can be Java language.If necessary
The operating system for storing the terminal installation of primary key is IOS system, then, language used in the application development can be with
It is Objective-C language or swift language, that is, the second language can be Objective-C language or swift language
Speech.
As it can be seen that the storage method of the key provided through the embodiment of the present invention, specifically includes: it is possible, firstly, to by original close
Key is encrypted using first language, obtains the corresponding executable program of the first language, and compile the executable program,
Obtain data packet, wherein the first language is that can not obtain the executable journey by carrying out reversed compiling to the data packet
The programming language of sequence;Then, the data packet can be stored under the target directory of second language engineering, is completed to original close
The preservation of key, wherein the second language is programming language used in the application development installed in terminal.In this way, passing through
Reversed compiling is unable to get encryption of the first language to primary key of source code, and is stored in used in application development
Under the project directory of second language, other people can not decode out the primary key by reversely compiling again, but need to utilize this
The call method (being detailed in the method that the corresponding embodiment of Fig. 3 provides) for the key that inventive embodiments provide deposits the embodiment of the present invention
The key of storage is obtained, and the safety of key storage is substantially increased, and overcomes and not safe enough the problem of key is locally stored.
Correspondingly, being provided the embodiment of the invention also provides a kind of call method of key for using above-described embodiment
Key storage method save primary key, called accordingly, extract primary key to obtain relevant information.
Fig. 3 is a kind of flow example figure of the call method of key provided in an embodiment of the present invention.Referring to Fig. 3, this method
Embodiment can specifically include:
Step 301, corresponding second executable program of second language is executed, the target of the engineering of the second language is called
Data packet under catalogue;The data packet is derived and saved in the mesh by the corresponding first executable program compiling of first language
Under heading record.
Wherein, the first language is that can not obtain the executable program by carrying out reversed compiling to the data packet
Programming language;The second language is programming language used in the application development installed in terminal.For the first language
Speech, specifically may refer to the associated description in above-mentioned steps 101, for second language, specifically may refer to above-mentioned steps 103
Associated description.
It is understood that first language specifically can be C language, C Plus Plus or Python.For the second language
Speech is Android system if necessary to store the operating system of terminal installation of primary key, then, which is made
Language can be Java language, that is, the second language can be Java language;If necessary to store the terminal of primary key
The operating system of installation is IOS system, then, language used in the application development can be Objective-C language
Or swift language, that is, the second language can be Objective-C language or swift language.
When specific implementation, the primary key of terminal local is stored in by embodiment shown in FIG. 1 if necessary to call
When, corresponding second executable program of second language can be directly executed, which can call second language
Engineering target directory under data packet, that is, store the data packet of the primary key.It should be noted that assuming by first
Corresponding first executable program of language compiles the data packet being derived and saved under the target directory of second language engineering, that
, need to write the second executable program of the data packet under invocation target catalogue using second language when calling, by holding
Row second executable program gets the data packet for preserving primary key, provides data for subsequent acquisition primary key
Basis.
Step 302, based on the mapping relations between the first language and the second language, the data packet is parsed,
Obtain corresponding first executable program of the first language.
It is understood that the mapping relations can be using resulting data after second language parsing first language compiling
The tool of packet, as an example, if second language is Java language, which can be Java and locally connects
Mouthful (English: Java Native Interface, referred to as: JNI).
When specific implementation, using the mapping relations between first language and second language, the first language can be parsed out
The corresponding source code of resulting data packet after compiling, that is, first obtained after being encrypted using first language to primary key
Executable program.
Step 303, primary key is obtained according to first executable program.
It as an example, for directly preserving primary key in data packet the case where, can be by being solved in step 302
The first obtained executable program is analysed, the primary key carried in the executable program is obtained.Such as: assuming that primary key saves
Form in the first executable program are as follows: xxxxxabc123yyyyy, then, it can be directly obtained from the executable program
Primary key " abc123 ".
As another example, if being to carry out Encryption Algorithm treated encryption key to primary key in data packet,
Then step 303 can be realized according to mode as shown in Figure 4, can specifically include:
Step 3031, from first executable program, encryption key is obtained;
Step 3032, using the corresponding decipherment algorithm of predetermined encryption algorithm, the encryption key is decrypted, obtains institute
State primary key.
It is understood that the predetermined encryption algorithm can be pre-set symmetric encipherment algorithm (such as: DES,
3DES, RC4, RC5 etc.), rivest, shamir, adelman (such as: RSA, Diffie-Hellman, El Gamal) or Hash encryption
Algorithm (such as: MD2, MD5, HAVAL, SHA).User can need self-setting.
As an example, if directly preserving encryption key in the first executable program, the first step can pass through step
The first executable program parsed in rapid 3031 obtains the encryption key carried in the executable program, such as: assuming that plus
Key is stored in the form in the first executable program are as follows: xxxxxdef456yyyyy, then, from first executable program
In can directly obtain encryption key " def456 ";Second step, can be corresponding using predetermined encryption algorithm by step 3032
Encryption key is decrypted in decipherment algorithm, obtains the corresponding primary key of the encryption key, such as: by by " abc123 "
Processing is the corresponding decipherment algorithm of Encryption Algorithm of " def456 ", " def456 " is decrypted original close to get arriving for " abc123 "
Key is " abc123 ".
When specific implementation, the first step gets encryption key from the first executable program;Second step, by encryption key
It is decrypted by the corresponding decipherment algorithm of Encryption Algorithm, obtains primary key.In this way, the first language executable program
The data packet obtained after being compiled, on the one hand, corresponding by corresponding first executable program of first language and second language
Executable program between nesting, improve call key complexity, improve the safety of the key storage and calling
Property;On the other hand, by the mapping relations between first language and second language, available original not reversible compiling is somebody's turn to do
The corresponding executable program of first language (i.e. source code), so as to effectively call the primary key.
As another example, if including that journey can be performed in the corresponding C language of predetermined encryption algorithm in the first executable program
Sequence, it is possible to first determine the corresponding part of Encryption Algorithm in first executable program, as encryption key, then from this
Partially encrypted object, as primary key are extracted in (i.e. encryption key).
As it can be seen that the call method of the key provided through the embodiment of the present invention, provided in an embodiment of the present invention for utilizing
The primary key that the storage method of key saves, calls the primary key if necessary, specifically includes: it is possible, firstly, to execute the
Corresponding second executable program of two language, calls the data packet under the target directory of the engineering of the second language, the data
Packet is derived and saved under the target directory by the corresponding first executable program compiling of first language;Then, based on described
Mapping relations between first language and the second language parse the data packet, obtain the first language corresponding
One executable program;Then, primary key is obtained according to first executable program;Wherein, the first language be can not
The programming language of the executable program is obtained by carrying out reversed compiling to the data packet;The second language is in terminal
Programming language used in the application development of installation.In this way, passing through the mapping relations between first language and second language
(such as calling interface), the second language that application program is supported, which can be called and be parsed, is not easy decompiling language, obtains original close
Key, other people easily can not decode out the primary key by reversely compiling again, substantially increase the safety of key storage,
It overcomes and not safe enough the problem of key is locally stored.
Correspondingly, the embodiment of the invention also provides a kind of storage device of key, referring to Fig. 5, which specifically can be with
Include:
It is corresponding to obtain the first language for encrypting primary key using first language for encryption unit 501
Executable program;
Compilation unit 502 obtains data packet for compiling the executable program;
Storage unit 503, for the data packet to be stored under the target directory of second language engineering;
Wherein, the first language is that can not obtain the executable program by carrying out reversed compiling to the data packet
Programming language;The second language is programming language used in the application development installed in terminal.
Optionally, encryption unit 501, comprising:
Encryption sub-unit operable, under the first language environment, to the primary key using predetermined encryption algorithm into
Row encryption, obtains encryption key;
Subelement is written, for the encryption key to be written in the corresponding executable program of the first language.
Optionally, the first language is C language, C Plus Plus or Python.
Optionally, the second language is Java language.
Foregoing description is a kind of associated description of the storage device of key, wherein specific implementation and the effect reached
Fruit may refer to a kind of description of the storage method embodiment of key shown in FIG. 1, and which is not described herein again.
Correspondingly, the embodiment of the invention also provides a kind of calling device of key, referring to Fig. 6, which specifically can be with
Include:
Call unit 601 calls the work of the second language for executing corresponding second executable program of second language
Data packet under the target directory of journey;The data packet is compiled to obtain and be saved by corresponding first executable program of first language
Under the target directory;
Resolution unit 602, for based on the mapping relations between the first language and the second language, described in parsing
Data packet obtains corresponding first executable program of the first language;
Acquiring unit 603, for obtaining primary key according to first executable program;
Wherein, the first language is that can not obtain the executable program by carrying out reversed compiling to the data packet
Programming language;The second language is programming language used in the application development installed in terminal.
Optionally, the acquiring unit 603, comprising:
Subelement is obtained, for obtaining encryption key from first executable program;
Subelement is decrypted, for using the corresponding decipherment algorithm of predetermined encryption algorithm, the encryption key to be decrypted,
Obtain the primary key.
Optionally, the first language is C language, C Plus Plus or Python.
Optionally, the second language is Java language.
Optionally, the mapping relations are Java local interface JNI.
Foregoing description is a kind of associated description of the calling device of key, wherein specific implementation and the effect reached
Fruit may refer to a kind of description of the call method embodiment of key shown in Fig. 3, and which is not described herein again.
" first " in the titles such as " first language " mentioned in the embodiment of the present invention, " the first executable program " is only used
Name mark is done, does not represent first sequentially.The rule is equally applicable to " second " etc..
As seen through the above description of the embodiments, those skilled in the art can be understood that above-mentioned implementation
All or part of the steps in example method can add the mode of general hardware platform to realize by software.Based on this understanding,
Technical solution of the present invention can be embodied in the form of software products, which can store is situated between in storage
In matter, such as read-only memory (English: read-only memory, ROM)/RAM, magnetic disk, CD etc., including some instructions to
So that a computer equipment (can be the network communication equipments such as personal computer, server, or router) executes
Method described in certain parts of each embodiment of the present invention or embodiment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.The apparatus embodiments described above are merely exemplary, wherein mould as illustrated by the separation member
Block may or may not be physically separated, and the component shown as module may or may not be physics
Module, it can it is in one place, or may be distributed over multiple network units.It can select according to the actual needs
Some or all of the modules therein achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creation
Property labour in the case where, it can understand and implement.
The above is only a preferred embodiment of the present invention, it is not intended to limit the scope of the present invention.It should refer to
Out, for those skilled in the art, under the premise of not departing from the present invention, can also make several improvements
And retouching, these modifications and embellishments should also be considered as the scope of protection of the present invention.
Claims (11)
1. a kind of storage method of key characterized by comprising
Primary key is encrypted using first language, obtains the corresponding executable program of the first language;
The executable program is compiled, data packet is obtained;
The data packet is stored under the target directory of second language engineering;
Wherein, the first language is that can not obtain the volume of the executable program by carrying out reversed compiling to the data packet
Cheng Yuyan;The second language is programming language used in the application development installed in terminal.
2. the method according to claim 1, wherein described encrypt using first language by primary key
To the corresponding executable program of the first language, comprising:
Under the first language environment, the primary key is encrypted using predetermined encryption algorithm, obtains encryption key;
The encryption key is written in the corresponding executable program of the first language.
3. the method according to claim 1, wherein the first language be C language, C Plus Plus or
Python.
4. the method according to claim 1, wherein the second language is Java language.
5. a kind of call method of key characterized by comprising
Corresponding second executable program of second language is executed, the data under the target directory of the engineering of the second language are called
Packet;The data packet is derived and saved under the target directory by the corresponding first executable program compiling of first language;
Based on the mapping relations between the first language and the second language, the data packet is parsed, obtains described first
Corresponding first executable program of language;
Primary key is obtained according to first executable program;
Wherein, the first language is that can not obtain the volume of the executable program by carrying out reversed compiling to the data packet
Cheng Yuyan;The second language is programming language used in the application development installed in terminal.
6. according to the method described in claim 5, it is characterized in that, described original close according to first executable program acquisition
Key, comprising:
From first executable program, encryption key is obtained;
Using the corresponding decipherment algorithm of predetermined encryption algorithm, the encryption key is decrypted, obtains the primary key.
7. according to the method described in claim 5, it is characterized in that, the first language be C language, C Plus Plus or
Python.
8. according to the method described in claim 5, it is characterized in that, the second language is Java language.
9. according to the method described in claim 8, it is characterized in that, the mapping relations are Java local interface JNI.
10. a kind of storage device of key characterized by comprising
It is corresponding executable to obtain the first language for encrypting primary key using first language for encryption unit
Program;
Compilation unit obtains data packet for compiling the executable program;
Storage unit, for the data packet to be stored under the target directory of second language engineering;
Wherein, the first language is that can not obtain the volume of the executable program by carrying out reversed compiling to the data packet
Cheng Yuyan;The second language is programming language used in the application development installed in terminal.
11. a kind of calling device of key characterized by comprising
Call unit calls the mesh of the engineering of the second language for executing corresponding second executable program of second language
Data packet under heading record;The data packet is derived and saved in described by the corresponding first executable program compiling of first language
Under target directory;
Resolution unit, for parsing the data packet based on the mapping relations between the first language and the second language,
Obtain corresponding first executable program of the first language;
Acquiring unit, for obtaining primary key according to first executable program;
Wherein, the first language is that can not obtain the volume of the executable program by carrying out reversed compiling to the data packet
Cheng Yuyan;The second language is programming language used in the application development installed in terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910285103.XA CN109995526A (en) | 2019-04-10 | 2019-04-10 | A kind of storage method of key and the call method and device of device, key |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910285103.XA CN109995526A (en) | 2019-04-10 | 2019-04-10 | A kind of storage method of key and the call method and device of device, key |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109995526A true CN109995526A (en) | 2019-07-09 |
Family
ID=67132752
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910285103.XA Pending CN109995526A (en) | 2019-04-10 | 2019-04-10 | A kind of storage method of key and the call method and device of device, key |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109995526A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110826031A (en) * | 2019-10-31 | 2020-02-21 | 北京东软望海科技有限公司 | Encryption method, device, computer equipment and storage medium |
CN112948773A (en) * | 2021-02-07 | 2021-06-11 | 深圳市大梦龙途文化传播有限公司 | Script encryption and decryption method, terminal device and readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006134304A2 (en) * | 2005-06-14 | 2006-12-21 | France Telecom | Method for protecting a source code in semi-interpreted language |
CN101944042A (en) * | 2010-09-01 | 2011-01-12 | 深圳市拜特科技股份有限公司 | Operation method of Java program and electronic terminal |
CN103093136A (en) * | 2012-12-27 | 2013-05-08 | 飞天诚信科技股份有限公司 | Method enabling java application to access to intelligent secret key device |
WO2015067170A1 (en) * | 2013-11-06 | 2015-05-14 | 中国银联股份有限公司 | Method and system for analyzing android application program |
CN107871066A (en) * | 2016-09-28 | 2018-04-03 | 传化物流集团有限公司 | code compiling method and device based on Android system |
CN109572620A (en) * | 2018-11-14 | 2019-04-05 | 东软睿驰汽车技术(沈阳)有限公司 | A kind of method for limiting of vehicle launch, apparatus and system |
-
2019
- 2019-04-10 CN CN201910285103.XA patent/CN109995526A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2006134304A2 (en) * | 2005-06-14 | 2006-12-21 | France Telecom | Method for protecting a source code in semi-interpreted language |
CN101944042A (en) * | 2010-09-01 | 2011-01-12 | 深圳市拜特科技股份有限公司 | Operation method of Java program and electronic terminal |
CN103093136A (en) * | 2012-12-27 | 2013-05-08 | 飞天诚信科技股份有限公司 | Method enabling java application to access to intelligent secret key device |
WO2015067170A1 (en) * | 2013-11-06 | 2015-05-14 | 中国银联股份有限公司 | Method and system for analyzing android application program |
CN107871066A (en) * | 2016-09-28 | 2018-04-03 | 传化物流集团有限公司 | code compiling method and device based on Android system |
CN109572620A (en) * | 2018-11-14 | 2019-04-05 | 东软睿驰汽车技术(沈阳)有限公司 | A kind of method for limiting of vehicle launch, apparatus and system |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110826031A (en) * | 2019-10-31 | 2020-02-21 | 北京东软望海科技有限公司 | Encryption method, device, computer equipment and storage medium |
CN110826031B (en) * | 2019-10-31 | 2022-08-02 | 望海康信(北京)科技股份公司 | Encryption method, device, computer equipment and storage medium |
CN112948773A (en) * | 2021-02-07 | 2021-06-11 | 深圳市大梦龙途文化传播有限公司 | Script encryption and decryption method, terminal device and readable storage medium |
CN112948773B (en) * | 2021-02-07 | 2024-05-24 | 深圳市大梦龙途文化传播有限公司 | Script encryption and decryption method, terminal equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108595989B (en) | Mobile APP safety protection system and method under iOS | |
CN105426708B (en) | A kind of reinforcement means of the application program of android system | |
US11361083B1 (en) | Method and apparatus for securing embedded device firmware | |
US9571471B1 (en) | System and method of encrypted transmission of web pages | |
US9135434B2 (en) | System and method for third party creation of applications for mobile appliances | |
CN109067528B (en) | Password operation method, work key creation method, password service platform and equipment | |
US20160117518A1 (en) | File Encryption/Decryption Device And File Encryption/Decryption Method | |
KR102433011B1 (en) | Method of apk file protection, apk file protection system performing the same, and storage medium storing the same | |
CN106063185A (en) | Methods and apparatus to securely share data | |
US7970133B2 (en) | System and method for secure and flexible key schedule generation | |
CN108399319B (en) | Source code protection method, application server and computer readable storage medium | |
CN111475524B (en) | Data processing method and device based on interceptor and computer equipment | |
JP2006522387A (en) | System and method for managing the execution of computer software | |
CN111385084A (en) | Key management method and device for digital assets and computer readable storage medium | |
CN105095771A (en) | Method and apparatus for protecting shared target file | |
CN108134673A (en) | A kind of method and device for generating whitepack library file | |
CN109995526A (en) | A kind of storage method of key and the call method and device of device, key | |
CN105825142A (en) | Method and device for encrypting and decrypting documents in mobile terminal | |
CN107220528A (en) | The protection of java applet and operation method, device and terminal | |
CN106326733A (en) | Method and apparatus for managing applications in mobile terminal | |
CN103605927B (en) | Encryption and decryption method and device based on embedded Linux system | |
CN104182691B (en) | data encryption method and device | |
CN113127850A (en) | Browser password filling interaction control method and device | |
WO2013042409A1 (en) | Module encryption/decryption program | |
Lee et al. | Classification and analysis of security techniques for the user terminal area in the internet banking service |
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: 20190709 |