CN104504311A - Safe SDK production and operation method - Google Patents
Safe SDK production and operation method Download PDFInfo
- Publication number
- CN104504311A CN104504311A CN201510023559.0A CN201510023559A CN104504311A CN 104504311 A CN104504311 A CN 104504311A CN 201510023559 A CN201510023559 A CN 201510023559A CN 104504311 A CN104504311 A CN 104504311A
- Authority
- CN
- China
- Prior art keywords
- sdk
- file
- shared library
- jar file
- outside
- 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
Abstract
The invention discloses a safe SDK production and operation method. The SDK is composed of the external SDK and the interior SDK according to the method; the external SDK generates the corresponding JAR file used for loading the SO shared library file and defining the external interface, the SO shared library file is used for loading the interior SDK and checking and decoding the files packed in the interior SDK; the external interface is used by the user, the user can use the classified algorithm and function packed in the interior SDK through the interface; the interior SDK generates the corresponding JAR file, packs the classified algorithm and function and encrypts and signs the JAR file, the encrypting and signing method is matched with the decoding and checking method of the SO shared library file of the external SDK. According to the method, the core code is separated from the shell code for guaranteeing the safety for the source code of the SDK during the distributing and using process and the risk of cracking is greatly reduced.
Description
Technical field
The present invention relates to Mobile solution field, specifically a kind of safe SDK makes and operation method.
Background technology
At present, SDK (Software Development Kit comparatively popular on the market, software development kit, hereinafter referred to as SDK) presentation mode is the jar file bag of directly deriving, jar file directly covers in software project and develops and run by caller.Because jar file bag is derived by java class file, so source code and the operation logic of SDK can be checked easily by decompiling software.If the jar file made in this way is to provide the ability that the demand for security grades such as charging are higher, be then easy to be cracked use in unwarranted situation.
Summary of the invention
The object of the invention is for the SDK safety problem existing for prior art, propose a kind of safe SDK and make and operation method, ensure that the source code of SDK in the process of distribution use is comparatively safe, greatly reduce the risk be cracked.
Technical scheme of the present invention is:
A safe SDK method for making, SDK is made as outside SDK and inner SDK by the method;
Described outside SDK generates corresponding jar file, and for loading the definition of SO shared library file and external interface, described SO shared library file is used for the School Affairs deciphering of packaged file in the loading of inner SDK and inner SDK; Described external interface is called by user, can be called by this Interface User to the algorithm of need to be keep secret packaged in inner SDK and function;
Described inside SDK generates corresponding jar file, for encapsulating algorithm and the function of need to be keep secret, being encrypted and signing to this jar file, and the deciphering in described encryption and endorsement method and outside SDK in SO shared library file and the method for inspection match.
In inner SDK of the present invention, packaged classified document adopts AES encryption method to be encrypted, and in outside SDK, SO shared library file adopts AES decryption method corresponding to be with it decrypted.
In inner SDK of the present invention, packaged classified document adopts RSA private key signature method to sign, and in outside SDK, SO shared library file adopts RSA method of calibration corresponding with it to verify.
A kind of safe SDK operation method, it comprises the following steps: first developer calls outside jar file, initialization is carried out to SO shared library file, SO shared library file carries out signature verification to inner jar file, by being decrypted inner jar file after signature verification and loading the inside jar file after deciphering, carry out calling of API afterwards.
Beneficial effect of the present invention:
The SDK of the safety that the present invention proposes makes and operation method, makes core code and shell code dehind; The encryption of inner SDK uses AES256 bit encryption and RSA signature authentication, and the DexClassLoader that JAR calls ClassLoader and Android of Java by Java Native Interface loads.
Accompanying drawing explanation
Fig. 1 is structural representation of the present invention.
The Making programme figure of Fig. 2 SDK.
The operational flow diagram of Fig. 3 SDK.
Embodiment
Below in conjunction with drawings and Examples, the present invention is further illustrated.
As shown in Figure 2, SDK Making programme is: first outside SDK generates corresponding jar file, is mainly used in the definition of loading SO shared library and external interface.Then generate the SO file of shared library, be mainly used in file verification and deciphering, and inner SDK loads.And inner SDK is after the corresponding jar file of generation, jar file is encrypted and signs, finally obtaining JAR and the signature file of encryption.Inner SDK is the specific implementation to the interface that outside SDK defines, and such user is at dynamic loading after inner SDK, and in fact call outside SDK interface is exactly realize part what call its interface.
As shown in Figure 3, SDK call flow: first developer calls the initial methods of outside jar file, carries out initialization to SO file.SO file verification is signed, and by being decrypted inner jar file after signature and loading the inside jar file after deciphering, just can carry out have invoked of API afterwards.
The making of the SDK that the present invention proposes and call method, carry out asymmetric encryption to the jar file of the SDK derived.Use C++ to realize the loading method of jar file, SDK calls the method when initialization and is decrypted jar file, and then dynamic loading is in internal memory.Only that a JAR shelf document (provides initial method and some interfaces what externally provide like this, without specific implementation), so shared library (core decipherment algorithm, SDK stowage etc. that C++ realizes) and jar file the encrypted primary interface of the SDK (realize part), as shown in Figure 1.These files compare one completely without the jar file of encryption, substantially increase the difficulty cracked.
The part that the present invention does not relate to prior art that maybe can adopt all same as the prior art is realized.
Claims (4)
1. a SDK method for making for safety, is characterized in that SDK is made as outside SDK and inner SDK by the method;
Described outside SDK generates corresponding jar file, and for loading the definition of SO shared library file and external interface, described SO shared library file is used for the School Affairs deciphering of packaged file in the loading of inner SDK and inner SDK; Described external interface is called by user, can be called by this Interface User to the algorithm of need to be keep secret packaged in inner SDK and function;
Described inside SDK generates corresponding jar file, for encapsulating algorithm and the function of need to be keep secret, being encrypted and signing to this jar file, and the deciphering in described encryption and endorsement method and outside SDK in SO shared library file and the method for inspection match.
2. safe SDK method for making according to claim 1, it is characterized in that in inner SDK, packaged classified document adopts AES encryption method to be encrypted, in outside SDK, SO shared library file adopts AES decryption method corresponding to be with it decrypted.
3. safe SDK method for making according to claim 1, it is characterized in that in inner SDK, packaged classified document adopts RSA private key signature method to sign, in outside SDK, SO shared library file adopts RSA method of calibration corresponding with it to verify.
4. the SDK operation method of a safety, it is characterized in that it comprises the following steps: first developer calls outside jar file, initialization is carried out to SO shared library file, SO shared library file carries out signature verification to inner jar file, by being decrypted inner jar file after signature verification and loading the inside jar file after deciphering, carry out calling of API afterwards.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510023559.0A CN104504311A (en) | 2015-01-19 | 2015-01-19 | Safe SDK production and operation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510023559.0A CN104504311A (en) | 2015-01-19 | 2015-01-19 | Safe SDK production and operation method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104504311A true CN104504311A (en) | 2015-04-08 |
Family
ID=52945708
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510023559.0A Pending CN104504311A (en) | 2015-01-19 | 2015-01-19 | Safe SDK production and operation method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104504311A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106203062A (en) * | 2016-08-29 | 2016-12-07 | 广州汽车集团股份有限公司 | A kind of security authentication systems and method |
CN106560830A (en) * | 2016-07-01 | 2017-04-12 | 哈尔滨安天科技股份有限公司 | Linux embedded system safety protection method and system |
CN107066842A (en) * | 2017-03-28 | 2017-08-18 | 福建天晴在线互动科技有限公司 | A kind of method and system of reinforcing SDK projects |
CN107103211A (en) * | 2016-02-19 | 2017-08-29 | 腾讯科技(深圳)有限公司 | SDK is sent, using issue, using operation method and device |
CN107196907A (en) * | 2017-03-31 | 2017-09-22 | 武汉斗鱼网络科技有限公司 | A kind of guard method of Android SO files and device |
CN109522022A (en) * | 2018-11-01 | 2019-03-26 | 北京指掌易科技有限公司 | A kind of efficient method realized Android engineering and turn SDK |
CN109740303A (en) * | 2018-09-07 | 2019-05-10 | 天翼电子商务有限公司 | A method of using promotion safety when external SDK |
CN111078224A (en) * | 2019-10-12 | 2020-04-28 | 中国平安人寿保险股份有限公司 | Software package file data processing method and device, computer equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101957903A (en) * | 2010-09-13 | 2011-01-26 | 中兴通讯股份有限公司 | Method and device for protecting class files |
KR20110035140A (en) * | 2009-09-29 | 2011-04-06 | (주)제이모바일 | Method to protect the jar file containing j2me application from unauthorized copy and disassembly |
CN102739470A (en) * | 2012-05-29 | 2012-10-17 | 百度在线网络技术(北京)有限公司 | Method and device for realizing Hadoop system testing |
CN104091101A (en) * | 2014-06-27 | 2014-10-08 | 北京思特奇信息技术股份有限公司 | Data encryption method based on digital watermarking and JAVA local calling, data decryption method based on digital watermarking and JAVA local calling and data encryption and decryption system based on digital watermarking and JAVA local calling |
CN104200137A (en) * | 2014-09-04 | 2014-12-10 | 成都卫士通信息产业股份有限公司 | Method for guaranteeing self-security of JAVA program |
-
2015
- 2015-01-19 CN CN201510023559.0A patent/CN104504311A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20110035140A (en) * | 2009-09-29 | 2011-04-06 | (주)제이모바일 | Method to protect the jar file containing j2me application from unauthorized copy and disassembly |
CN101957903A (en) * | 2010-09-13 | 2011-01-26 | 中兴通讯股份有限公司 | Method and device for protecting class files |
CN102739470A (en) * | 2012-05-29 | 2012-10-17 | 百度在线网络技术(北京)有限公司 | Method and device for realizing Hadoop system testing |
CN104091101A (en) * | 2014-06-27 | 2014-10-08 | 北京思特奇信息技术股份有限公司 | Data encryption method based on digital watermarking and JAVA local calling, data decryption method based on digital watermarking and JAVA local calling and data encryption and decryption system based on digital watermarking and JAVA local calling |
CN104200137A (en) * | 2014-09-04 | 2014-12-10 | 成都卫士通信息产业股份有限公司 | Method for guaranteeing self-security of JAVA program |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107103211A (en) * | 2016-02-19 | 2017-08-29 | 腾讯科技(深圳)有限公司 | SDK is sent, using issue, using operation method and device |
CN107103211B (en) * | 2016-02-19 | 2019-03-08 | 腾讯科技(深圳)有限公司 | SDK send, using publication, using operation method and device |
CN106560830A (en) * | 2016-07-01 | 2017-04-12 | 哈尔滨安天科技股份有限公司 | Linux embedded system safety protection method and system |
CN106203062A (en) * | 2016-08-29 | 2016-12-07 | 广州汽车集团股份有限公司 | A kind of security authentication systems and method |
CN106203062B (en) * | 2016-08-29 | 2019-05-03 | 广州汽车集团股份有限公司 | A kind of security authentication systems and method |
CN107066842A (en) * | 2017-03-28 | 2017-08-18 | 福建天晴在线互动科技有限公司 | A kind of method and system of reinforcing SDK projects |
CN107196907A (en) * | 2017-03-31 | 2017-09-22 | 武汉斗鱼网络科技有限公司 | A kind of guard method of Android SO files and device |
CN107196907B (en) * | 2017-03-31 | 2018-08-03 | 武汉斗鱼网络科技有限公司 | A kind of guard method of Android SO files and device |
CN109740303A (en) * | 2018-09-07 | 2019-05-10 | 天翼电子商务有限公司 | A method of using promotion safety when external SDK |
CN109522022A (en) * | 2018-11-01 | 2019-03-26 | 北京指掌易科技有限公司 | A kind of efficient method realized Android engineering and turn SDK |
CN111078224A (en) * | 2019-10-12 | 2020-04-28 | 中国平安人寿保险股份有限公司 | Software package file data processing method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104504311A (en) | Safe SDK production and operation method | |
CN102087605B (en) | Android-based platform application installation control method and system | |
CN104298932B (en) | A kind of call method and device of SO files | |
KR101391982B1 (en) | Encryption method for preventing decompile of andriod application | |
CN105612527A (en) | Method for providing security for common intermediate language-based program | |
JP2010140470A (en) | Method and apparatus for secure processing of confidential content within virtual machine of processor | |
CN101814124A (en) | Java-based method for enhancing software security | |
CN107196907B (en) | A kind of guard method of Android SO files and device | |
US20200356642A1 (en) | Enabling an encrypted software module in a container file | |
CN107480478B (en) | A kind of encryption method and operation method of JAVA application program | |
CN108134673B (en) | Method and device for generating white box library file | |
WO2018213744A3 (en) | Reducing compromise of sensitive data in virtual machine | |
CN108111622B (en) | Method, device and system for downloading white box library file | |
CN105320535A (en) | Checking method of installation package, client side, server and system | |
CN102236756A (en) | File encryption method based on TCM (trusted cryptography module) and USBkey | |
CN108710500A (en) | Resource issuing method, update method and device | |
WO2017156962A1 (en) | Elf shared library protection method and system | |
CN107092816A (en) | A kind of Android application programs reinforcement means | |
CN110826031A (en) | Encryption method, device, computer equipment and storage medium | |
CN103853943A (en) | Program protection method and device | |
CN110619224B (en) | Data processing method and related device | |
CN107257282A (en) | A kind of full bag encryption method of code based on RC4 algorithms | |
CN107066842A (en) | A kind of method and system of reinforcing SDK projects | |
CN108256346B (en) | Key data protection method, encryption protection device and embedded system device | |
CN112115430A (en) | Apk reinforcement method, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: The Jianye District of Nanjing City, Jiangsu province 210019 Jiangdong Street No. 18 building 4 floor 17 Applicant after: Xuan Cai interactive network Science and Technology Ltd. Address before: Nanjing City, Jiangsu province Hanzhoung road 210029 No. 268 Hanzhoung mansion 4 floor Applicant before: Xuan Cai interactive network Science and Technology Ltd. |
|
COR | Change of bibliographic data | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150408 |