CN104657635A - Application processing method, device and server - Google Patents

Application processing method, device and server Download PDF

Info

Publication number
CN104657635A
CN104657635A CN201310589322.XA CN201310589322A CN104657635A CN 104657635 A CN104657635 A CN 104657635A CN 201310589322 A CN201310589322 A CN 201310589322A CN 104657635 A CN104657635 A CN 104657635A
Authority
CN
China
Prior art keywords
application
class file
ciphertext
user
described class
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201310589322.XA
Other languages
Chinese (zh)
Inventor
秦志伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Founder Information Industry Holdings Co Ltd
Founder Mobile Media Technology Beijing Co Ltd
Original Assignee
Founder Information Industry Holdings Co Ltd
Founder Mobile Media Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Founder Information Industry Holdings Co Ltd, Founder Mobile Media Technology Beijing Co Ltd filed Critical Founder Information Industry Holdings Co Ltd
Priority to CN201310589322.XA priority Critical patent/CN104657635A/en
Publication of CN104657635A publication Critical patent/CN104657635A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software
    • G06F21/14Protecting executable software against software analysis or reverse engineering, e.g. by obfuscation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention provides an application processing method, device and server. The method includes the steps: acquiring a class file needing protection in an application; encrypting the class file needing protection in the application by an encryption key to obtain a ciphertext of the class file. Only when a user calls the application, the class file in the application is encrypted, so that the user can use the related application, the class file exists in the form of the ciphertext in general case, the user cannot obtain a source file of the application by means of decompiling when not obtaining the key, and the copyright of the application can be effectively protected.

Description

A kind of application processing method, device and server
Technical field
The present invention relates to information security field, particularly relate to a kind of application processing method, device and server.
Background technology
Java language is a kind of interpreted languages.Java source code, through compiling, generates byte code files, and the byte code files generated is explained and performed in Java Virtual Machine (JVM).The operating mechanism that this explanation performs causes Java source code to be easy to by decompiling.Current this decompiling instrument is a lot, and the effect of decompiling is also fine, make the user of any use Java software can the source code of decompiling easily and reconstituted product, thus make all authorization identifyings based on Java language permit to become meaningless.
Prior art java applet invoked procedure as shown in Figure 1, by the parents of ClassLoader pattern of appointing can prevent user load former Java standard jar wrap in the class that has, wherein, the parents of ClassLoader appoint pattern as shown in Figure 2; As can be seen here, the protection intensity of the method for existing protection Java software program is lower, cannot provide effective copyright protection for Java software program.
Summary of the invention
For overcoming above-mentioned defect, the embodiment of the present invention provides a kind of application processing method, device and server.
First aspect, the embodiment of the present invention provides a kind of application processing method, and described method comprises the steps:
Obtain the class file needing in application to protect;
By needing the described class file encryption key protected to be encrypted in application, obtain the ciphertext of described class file.
Preferably, when user calls described application, described method also comprises:
Load the described class file of described application;
Obtain the ciphertext of described class file and corresponding decruption key;
Utilize the ciphertext of described decruption key to described class file to be decrypted operation, obtain described class file;
The application comprising described class file obtained is returned to user.
Preferably, described will application in need protect described class file encryption key be encrypted, the ciphertext obtaining described class file specifically comprises:
Use the encryption key of symmetric encipherment algorithm generation for encrypting described class file;
The encryption key produced is utilized to be encrypted needing the class file protected in application.
Preferably, judge whether load application, if load application, the application of loading is returned to user, otherwise enters load application step.
First aspect, the embodiment of the present invention provides a kind of application treating apparatus, and described device comprises:
First processing module, for obtaining in application the class file needing to protect;
Second processing module, for by needing the described class file encryption key protected to be encrypted in application, obtains the ciphertext of described class file.
Preferably, when user calls described application, described device also comprises:
Load-on module, for loading the described class file of described application;
Acquisition module, for obtaining the ciphertext of described class file and corresponding decruption key;
3rd processing module, for utilizing the ciphertext of described decruption key to described class file to be decrypted operation, obtains described class file;
Return module, for the application comprising described class file obtained is returned to user.
Preferably, described second processing module specifically for:
Use the encryption key of symmetric encipherment algorithm generation for encrypting described class file;
The encryption key produced is utilized to be encrypted needing the class file protected in application.
Preferably, described device also comprises:
Judge module, for judging whether load application, if load application, returns to user by the application of loading, otherwise performs the function of load-on module.
The third aspect, the embodiment of the present invention provides a kind of server, comprising: described application treating apparatus.
The application processing method that the embodiment of the present invention provides, device and server; by being encrypted the class file in application; only when calling application as user; just user can be made can to use relevant application to class file deciphering wherein; and in the ordinary course of things, class file just exists with the form of ciphertext, when not obtaining key; user, not by the source file that the means of decompiling are applied, can carry out available protecting to the copyright of application.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 represents the invoked procedure schematic diagram of java applet in prior art.
What Fig. 2 represented that the parents of the ClassLoader of java applet in prior art appoint pattern calls schematic diagram.
Fig. 3 represents the process flow diagram of application processing method in the embodiment of the present invention.
Fig. 4 represents the process schematic diagram of application processing method in the embodiment of the present invention.
Fig. 5 represents in the embodiment of the present invention structural representation applying treating apparatus.
Embodiment
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 3, described method comprises the steps: the process flow diagram of application processing method
Step 100. obtains the class file needing in application to protect;
Step 101. is encrypted needing the described class file encryption key protected in application, obtains the ciphertext of described class file.
By above-mentioned operation, by being encrypted the class file in application, available protecting is carried out to the copyright of application.
The application processing method that the present embodiment proposes can be applied to various occasion, as the APP etc. of the java applet on PC, mobile terminal.
It is existing when user calls application, to call java applet, as shown in Figure 1, first according to the order loaded targets class of first ExtClassloader, again AppClassloader, wherein, ExtClassloader is as the parent loader of AppClassloader.
First inquire whether the parent Classloader ExtClassloader of AppClassloader is loaded with this target class when loaded targets class according to the two mechanism of entrusting of jvm, if parent Classloader ExtClassloader is loaded with target class, then invocation target class, otherwise whether be loaded with this target class to Classloader AppClassloader inquiry, if Classloader AppClassloader is loaded with target class, then invocation target class, otherwise notify that user applies and load unsuccessfully.Therefrom can find out, the existing loading procedure to application can not play a protective role to the source file of application.
In the present embodiment, when user calls described application, described method also comprises:
Load the described class file of described application;
Obtain the ciphertext of described class file and corresponding decruption key;
Utilize the ciphertext of described decruption key to described class file to be decrypted operation, obtain described class file;
The application comprising described class file obtained is returned to user.
By operation above; the ciphertext of the described class file obtaining institute's load application and corresponding key is called in the process of application user; after being decrypted by class file described in double secret key; the application comprising described class file is returned to user; be in during the course; when being only used in key, user could use application, makes the source file that user can not be applied easily, in the process that application loads, serve protective effect to the source file of application.
In the existing process that application is created, only application is created and stores and use for user, can't protect the source file of class file in application, make user can be applied easily middle class file source file and modify.
In the present embodiment, be encrypted created application, concrete operations are as follows:
Described will application in need protect described class file encryption key be encrypted, the ciphertext obtaining described class file specifically comprises:
Use the encryption key of symmetric encipherment algorithm generation for encrypting described class file;
The encryption key produced is utilized to be encrypted needing the class file protected in application.
By above-mentioned operation, can be encrypted the source file of class file in application, and the source file of the class file in application is protected, avoid user and can be applied easily the source file of middle class file the defect of modifying.
Further, symmetric encipherment algorithm can use the cryptographic algorithm such as DES, AES and triple des, and these cryptographic algorithm realize class file that is simple and that may correspond to and protect reliably.
Optionally, described method also comprises:
Judge whether load application, if load application, the application of loading is returned to user, otherwise enters load application step.
As shown in Figure 4, to load java applet, application processing method is further described.
Described application processing method comprises the steps:
Step 1. defines MyClassloader, defines the encryption key of class file in MyClassloader;
The MyClassloader of definition is arranged on the next stage of AppClassloader by step 2., so AppClassloader is the parent loader of MyClassloader;
Step 3. is after application creates, and the class file in being applied by double secret key is encrypted;
Step 4. when user calls application, according to the order loaded targets class of ExtClassloader, AppClassloader, MyClassloader;
Step 5. is because the class file of target class is encrypted by MyClassloader, so parent loader ExtClassloader and AppClassloader of MyClassloader can not load successfully, MyClassloader is decrypted by double secret key class file, then loaded targets class;
Step 6. makes user's invocation target class.
Alternatively, in step 1, self-defined GenerateKey tool-class, secret key writing in files: in %javaGenerateKey key.data.
In step 3, utilize EncryptClasses to be encrypted the class in application: as %javaEncryptClasses key.data App.class Foo.class Bar.class, this order replaces to their respective encryption versions each class file.
By above-mentioned operation, the application processing method that the present embodiment proposes is compared and code protection method on the market, and advantage is that all these possible attacks have a prerequisite, and Here it is, and assailant can obtain secret key; If assailant there is no secret key, so just can ensure the security of applying, although the method for this protecting code does not claim perfect in every way, it still be can yet be regarded as a kind of protecting the intellectual property and the effective scheme of sensitive user data.
By description above; the application processing method that embodiment provides; by being encrypted the class file in application; only when calling application as user, just user can be made can to use relevant application to class file deciphering wherein, and in the ordinary course of things; class file just exists with the form of ciphertext; when not obtaining key, user, not by the source file that the means of decompiling are applied, can carry out available protecting to the copyright of application.
As shown in Figure 5, described device comprises the structure of application treating apparatus:
First processing module 10, for obtaining in application the class file needing to protect;
Second processing module 20, for by needing the described class file encryption key protected to be encrypted in application, obtains the ciphertext of described class file.
Further, when user calls described application, described device also comprises:
Load-on module, for loading the described class file of described application;
Acquisition module, for obtaining the ciphertext of described class file and corresponding decruption key;
3rd processing module, for utilizing the ciphertext of described decruption key to described class file to be decrypted operation, obtains described class file;
Return module, for the application comprising described class file obtained is returned to user.
Further, described second processing module specifically for:
Use the encryption key of symmetric encipherment algorithm generation for encrypting described class file;
The encryption key produced is utilized to be encrypted needing the class file protected in application.
Further, described device also comprises:
Judge module, for judging whether load application, if load application, returns to user by the application of loading, otherwise performs the function of load-on module.
The function of the application treating apparatus provided in the present embodiment and treatment scheme, see the flow process of the embodiment of the application processing method provided above, can repeat no more herein.
Alternatively, the present embodiment also provides a kind of server, comprising: above-mentioned application treating apparatus.
The function of the server provided in the present embodiment and treatment scheme, see the flow process of the embodiment of the application processing method provided above, can repeat no more herein.
By description above; the application treating apparatus that embodiment provides and server; by being encrypted the class file in application; only when calling application as user, just user can be made can to use relevant application to class file deciphering wherein, and in the ordinary course of things; class file just exists with the form of ciphertext; when not obtaining key, user, not by the source file that the means of decompiling are applied, can carry out available protecting to the copyright of application.
One of ordinary skill in the art will appreciate that: all or part of step realizing each embodiment of said method can have been come by the hardware that programmed instruction is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (9)

1. an application processing method, is characterized in that, described method comprises the steps:
Obtain the class file needing in application to protect;
By needing the described class file encryption key protected to be encrypted in application, obtain the ciphertext of described class file.
2. method according to claim 1, is characterized in that, when user calls described application, described method also comprises:
Load the described class file of described application;
Obtain the ciphertext of described class file and corresponding decruption key;
Utilize the ciphertext of described decruption key to described class file to be decrypted operation, obtain described class file;
The application comprising described class file obtained is returned to user.
3. according to claim 1 or claim 2, it is characterized in that, described will application in need protect described class file encryption key be encrypted, the ciphertext obtaining described class file specifically comprises:
Use the encryption key of symmetric encipherment algorithm generation for encrypting described class file;
The encryption key produced is utilized to be encrypted needing the class file protected in application.
4. method according to claim 2, is characterized in that, described method also comprises:
Judge whether load application, if load application, the application of loading is returned to user, otherwise enters load application step.
5. an application treating apparatus, is characterized in that, described device comprises:
First processing module, for obtaining in application the class file needing to protect;
Second processing module, for by needing the described class file encryption key protected to be encrypted in application, obtains the ciphertext of described class file.
6. device according to claim 5, is characterized in that, when user calls described application, described device also comprises:
Load-on module, for loading the described class file of described application;
Acquisition module, for obtaining the ciphertext of described class file and corresponding decruption key;
3rd processing module, for utilizing the ciphertext of described decruption key to described class file to be decrypted operation, obtains described class file;
Return module, for the application comprising described class file obtained is returned to user.
7. the device according to claim 5 or 6, is characterized in that, described second processing module specifically for:
Use the encryption key of symmetric encipherment algorithm generation for encrypting described class file;
The encryption key produced is utilized to be encrypted needing the class file protected in application.
8. device according to claim 6, is characterized in that, described device also comprises:
Judge module, for judging whether load application, if load application, returns to user by the application of loading, otherwise performs the function of load-on module.
9. a server, is characterized in that, comprising: the application treating apparatus described in any one of claim 5-8.
CN201310589322.XA 2013-11-20 2013-11-20 Application processing method, device and server Pending CN104657635A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310589322.XA CN104657635A (en) 2013-11-20 2013-11-20 Application processing method, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310589322.XA CN104657635A (en) 2013-11-20 2013-11-20 Application processing method, device and server

Publications (1)

Publication Number Publication Date
CN104657635A true CN104657635A (en) 2015-05-27

Family

ID=53248748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310589322.XA Pending CN104657635A (en) 2013-11-20 2013-11-20 Application processing method, device and server

Country Status (1)

Country Link
CN (1) CN104657635A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105227565A (en) * 2015-10-13 2016-01-06 北京娜迦信息科技发展有限公司 Anti-reversing for Android system cracks the method and apparatus of shared object file
CN106599628A (en) * 2016-12-08 2017-04-26 合肥康捷信息科技有限公司 Python byte code file protection method based on module hook
CN109886023A (en) * 2017-12-06 2019-06-14 株洲中车时代电气股份有限公司 A kind of data processing method, device, equipment and computer readable storage medium
CN111310218A (en) * 2020-02-28 2020-06-19 云知声智能科技股份有限公司 Method and device for protecting java class core file
CN113489723A (en) * 2021-07-05 2021-10-08 平安科技(深圳)有限公司 Data transmission method, system, computer device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101814124A (en) * 2010-04-20 2010-08-25 浪潮电子信息产业股份有限公司 Java-based method for enhancing software security
CN101872404A (en) * 2009-04-21 2010-10-27 普天信息技术研究院有限公司 Method for protecting Java software program
CN101957903A (en) * 2010-09-13 2011-01-26 中兴通讯股份有限公司 Method and device for protecting class files
CN102346834A (en) * 2011-11-25 2012-02-08 武汉钢铁(集团)公司 Method for encrypting and protecting Java application software
CN102902911A (en) * 2012-09-18 2013-01-30 北京深思洛克软件技术股份有限公司 Method for running third-party codes safely in Java virtual computer

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872404A (en) * 2009-04-21 2010-10-27 普天信息技术研究院有限公司 Method for protecting Java software program
CN101814124A (en) * 2010-04-20 2010-08-25 浪潮电子信息产业股份有限公司 Java-based method for enhancing software security
CN101957903A (en) * 2010-09-13 2011-01-26 中兴通讯股份有限公司 Method and device for protecting class files
CN102346834A (en) * 2011-11-25 2012-02-08 武汉钢铁(集团)公司 Method for encrypting and protecting Java application software
CN102902911A (en) * 2012-09-18 2013-01-30 北京深思洛克软件技术股份有限公司 Method for running third-party codes safely in Java virtual computer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘中兵 等: "《精通Tomcat—Java Web应用开发、框架分析与组件配置、系统集成与案例实战》", 31 May 2007, 清华大学出版社 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105227565A (en) * 2015-10-13 2016-01-06 北京娜迦信息科技发展有限公司 Anti-reversing for Android system cracks the method and apparatus of shared object file
CN105227565B (en) * 2015-10-13 2019-02-22 北京娜迦信息科技发展有限公司 The method and apparatus that anti-reversing for Android system cracks shared object file
CN106599628A (en) * 2016-12-08 2017-04-26 合肥康捷信息科技有限公司 Python byte code file protection method based on module hook
CN106599628B (en) * 2016-12-08 2019-04-02 合肥康捷信息科技有限公司 A kind of Python byte code files guard method based on module hook
CN109886023A (en) * 2017-12-06 2019-06-14 株洲中车时代电气股份有限公司 A kind of data processing method, device, equipment and computer readable storage medium
CN109886023B (en) * 2017-12-06 2023-05-09 株洲中车时代电气股份有限公司 Data processing method, device, equipment and computer readable storage medium
CN111310218A (en) * 2020-02-28 2020-06-19 云知声智能科技股份有限公司 Method and device for protecting java class core file
CN113489723A (en) * 2021-07-05 2021-10-08 平安科技(深圳)有限公司 Data transmission method, system, computer device and storage medium
CN113489723B (en) * 2021-07-05 2022-11-22 平安科技(深圳)有限公司 Data transmission method, system, computer device and storage medium

Similar Documents

Publication Publication Date Title
US20160203087A1 (en) Method for providing security for common intermediate language-based program
KR101091465B1 (en) Method and apparatus for the secure processing of confidential content within a virtual machine of a processor
KR101391982B1 (en) Encryption method for preventing decompile of andriod application
KR101518420B1 (en) Apparatus and method for managing apk file in a android platform
CN102890758B (en) Method and system for protecting executable file
JP5113169B2 (en) Method and system for obfuscating cryptographic functions
CN106203006A (en) Android application reinforcement means based on dex Yu so file Dynamic Execution
CN106599629B (en) Android application program reinforcing method and device
US20150095653A1 (en) Method and apparatus of creating application package, method and apparatus of executing application package, and recording medium storing application package
KR101623096B1 (en) Apparatus and method for managing apk file in a android platform
CN102346834A (en) Method for encrypting and protecting Java application software
CN107273723B (en) So file shell adding-based Android platform application software protection method
CN106415491B (en) Application protection method, server and terminal
CN106548046B (en) Device and method for protecting code
CN102236757A (en) Software protection method and system applicable to Android system
CN108399319B (en) Source code protection method, application server and computer readable storage medium
CN104318135A (en) Java code safety dynamic loading method on basis of trusted execution environment
CN104298932A (en) Method and device for calling SO file
CN101814124A (en) Java-based method for enhancing software security
CN104657635A (en) Application processing method, device and server
CN105227565A (en) Anti-reversing for Android system cracks the method and apparatus of shared object file
CN103765429A (en) Digital signing authority dependent platform secret
CN108133147B (en) Method and device for protecting executable code and readable storage medium
CN109992974B (en) Method and device for protecting byte code file of virtual machine and readable storage medium
CN104090772A (en) Method and device for generating android package (APK)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into 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: 20150527