CN107122632A - The encryption method and device of software installation bag - Google Patents

The encryption method and device of software installation bag Download PDF

Info

Publication number
CN107122632A
CN107122632A CN201710283267.XA CN201710283267A CN107122632A CN 107122632 A CN107122632 A CN 107122632A CN 201710283267 A CN201710283267 A CN 201710283267A CN 107122632 A CN107122632 A CN 107122632A
Authority
CN
China
Prior art keywords
encrypted
source code
software installation
code fragment
installation bag
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
CN201710283267.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.)
YANGPUWEIYE TECHNOLOGY Ltd
Original Assignee
YANGPUWEIYE TECHNOLOGY 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 YANGPUWEIYE TECHNOLOGY Ltd filed Critical YANGPUWEIYE TECHNOLOGY Ltd
Priority to CN201710283267.XA priority Critical patent/CN107122632A/en
Publication of CN107122632A publication Critical patent/CN107122632A/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/121Restricting unauthorised execution of programs
    • G06F21/125Restricting unauthorised execution of programs by manipulating the program code, e.g. source code, compiled code, interpreted code, machine code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Abstract

The embodiment of the present application discloses the encryption method and device of a kind of software installation bag, and this method includes:Multiple source code fragments to be encrypted are determined from software installation bag to be encrypted;Based at least one default AES, multiple source code fragments to be encrypted are encrypted respectively, multiple encrypted source code fragments are obtained;Multiple encrypted source code fragments are stored into software installation bag to be encrypted;In software installation bag to be encrypted, multiple decryption files are generated based on decipherment algorithm corresponding with default AES.In the embodiment of the present application, can be by multiple source code fragments to be encrypted in software installation bag to be encrypted, it is encrypted respectively, to realize the encryption to software installation bag to be encrypted, so as to increase the difficulty of the source code in malicious attack identification software installation kit, the security of Mobile solution is improved.

Description

The encryption method and device of software installation bag
Technical field
The application is related to field of computer technology, more particularly to a kind of software installation bag encryption method and device.
Background technology
With the fast development of Mobile solution, the Mobile solution based on Android system is also more and more.Android system is to open The operating system put, can provide more facility for the exploitation of Mobile solution, but also can be the evil for Mobile solution simultaneously Meaning attack provides facility.
Specifically, the software installation bag of the Mobile solution based on Android system can be the installation kit based on java language, And java language is easier to by the code after decompiling, and decompiling to a certain extent close to the source generation in corresponding installation kit Code, the code after decompiling is relatively easy to be read, therefore, the logic of the Mobile solution based on Android system, for example, and opposite end Communication modes, enciphering and deciphering algorithm and key, and soft keyboard technology realize etc., be easier to be exposed.
As shown in the above, the security of the Mobile solution based on Android system is poor.
The content of the invention
The purpose of the embodiment of the present application is to provide the encryption method and device of a kind of software installation bag, and peace is based on to improve The security of the Mobile solution of tall and erect system.
In order to solve the above technical problems, what the embodiment of the present application was realized in:
The embodiment of the present application provides a kind of encryption method of software installation bag, and methods described includes:
Multiple source code fragments to be encrypted are determined from software installation bag to be encrypted;
Based at least one default AES, multiple source code fragments to be encrypted are encrypted respectively, obtained To multiple encrypted source code fragments;
Multiple encrypted source code fragments are stored into the software installation bag to be encrypted;
In the software installation bag to be encrypted, generated based on decipherment algorithm corresponding with the default AES Multiple decryption files.
The embodiment of the present application provides a kind of encryption device of software installation bag, and described device includes:
Determining module, for determining multiple source code fragments to be encrypted from software installation bag to be encrypted;
Encrypting module, for based at least one default AES, respectively to multiple source codes to be encrypted Section is encrypted, and obtains multiple encrypted source code fragments;
Memory module, for multiple encrypted source code fragments to be stored to the software installation bag to be encrypted In;
First generation module, in the software installation bag to be encrypted, based on the default AES Corresponding decipherment algorithm generates multiple decryption files.
The technical scheme provided from above the embodiment of the present application, the embodiment of the present application can be first from software to be encrypted Multiple source code fragments to be encrypted are determined in installation kit, it is then possible to based at least one default AES, come right respectively Multiple source code fragments to be encrypted are encrypted, and obtain multiple encrypted source code fragments, are obtaining encrypted source code fragment Afterwards, obtained encrypted source code fragment can be stored into the software installation bag to be encrypted, and it is to be encrypted soft at this In part installation kit, multiple decryption files are generated based on decipherment algorithm corresponding with default AES.
In the embodiment of the present application, can be by multiple source codes to be encrypted in software installation bag to be encrypted Section, is encrypted, to realize the encryption to software installation bag to be encrypted, so as to increase malicious attack identification software respectively The difficulty of source code in installation kit, improves the security of Mobile solution.Meanwhile, the embodiment of the present application can also generate solution ciphertext Part realizes the decryption to storing the encrypted source code fragment into software installation bag to be encrypted, so as to be encrypted The source code fragment being encrypted in software kit can be read and be handled by normal virtual machine.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments described in application, for those of ordinary skill in the art, are not paying the premise of creative labor Under, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of embodiment of the encryption method of software installation bag of the application;
Fig. 2 is the embodiment of the encryption method of another software installation bag of the application;
Fig. 3 is a kind of embodiment of the encryption device of software installation bag of the application;
Fig. 4 is the embodiment of the encryption device of another software installation bag of the application;
Fig. 5 is a kind of embodiment of the encryption device of software installation bag of the application.
Embodiment
The embodiment of the present application provides the encryption method and device of a kind of software installation bag.
In order that those skilled in the art more fully understand the technical scheme in the application, it is real below in conjunction with the application The accompanying drawing in example is applied, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described implementation Example only some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, this area is common The every other embodiment that technical staff is obtained under the premise of creative work is not made, should all belong to the application protection Scope.
Embodiment one
As shown in figure 1, the application provides a kind of embodiment of the encryption method of software installation bag, Android is based on to improve The security of the Mobile solution of system.The embodiment of the present application can be by multiple to be encrypted in software installation bag to be encrypted Source code fragment, be encrypted to realize the encryption to software installation bag to be encrypted respectively, so as to increase malicious attack The difficulty of source code in identification software installation kit, improves the security of Mobile solution.This method specifically includes following steps:
In step S101:Multiple source code fragments to be encrypted are determined from software installation bag to be encrypted.
In the present embodiment, software installation bag to be encrypted can include the software installation bag based on Android system, except base In outside the software installation bag of Android system, software installation bag to be encrypted can include or not include based on other operating systems Software kit, the present embodiment is without limitation.
In the present embodiment, multiple source code fragments to be encrypted can be determined from software installation bag to be encrypted.Specifically Ground, can determine multiple source codes to be encrypted according to the selection instruction of related personnel from software installation bag to be encrypted Section, for example, the higher source of importance can be determined from software installation bag to be encrypted according to the selection instruction of related personnel The higher source code fragment of code segment, risk, core source code fragment etc. are source code fragment to be encrypted.
It is of course also possible to automatically determine multiple treat from software installation bag to be encrypted according to default determination strategy The source code fragment of encryption, wherein, the default determination strategy can include determining that the correspondence such as class, method or function of specified title Source code fragment for source code fragment to be encrypted etc., the application is without limitation.
In step s 102:Based at least one default AES, multiple source code fragments to be encrypted are entered respectively Row encryption, obtains multiple encrypted source code fragments.
In the present embodiment, can with predetermined encryption algorithm pond, wherein, can add in the AES pond including at least one AES in close algorithm, the AES pond can be the AES of acquiescence, or related technical staff is certainly The AES of definition;It can be existing AES, or the combined ciphering obtained based on existing AES Algorithm etc., the present embodiment is without limitation.
In the present embodiment, multiple source code fragments to be encrypted can be determined from software installation bag to be encrypted, then, The plurality of source code fragment to be encrypted can be encrypted based on the AES in default AES pond.
Wherein it is possible to after each source code fragment to be encrypted is determined from software installation bag to be encrypted, to the determination Source code fragment to be encrypted be encrypted;All sources to be encrypted can also be being determined from software installation bag to be encrypted After code segment, then the source code fragment to be encrypted to the determination is encrypted respectively, and the present embodiment is without limitation.
In one embodiment, when pair source code fragment to be encrypted determined is encrypted, first it can add from default AES is obtained in close algorithm pond, then, then the AES based on acquisition enters to the source code fragment to be encrypted of the determination Row encryption.Wherein, the AES different source code fragments to be encrypted being encrypted be able to can also be differed with identical, The present embodiment is without limitation.
When obtaining AES from default AES pond, it can be obtained based on default acquisition strategy, its In, the default acquisition strategy can include the random acquisition strategy for obtaining AES, the highest encryption of acquisition complexity and calculate Acquisition strategy, the acquisition of method crack acquisition strategy of difficulty highest AES etc., and the present embodiment is without limitation.
In one example, the default acquisition strategy can be the acquisition plan for obtaining complexity highest AES Slightly, then when obtaining AES from default AES pond, it may be determined that each in default AES pond plus The complexity of close algorithm, and obtain complexity highest AES.
In the present embodiment, the number of times that the AES in default AES pond is used can be counted, , can be by the AES when the number of times that the AES in default AES pond is used reaches access times threshold value Removed from default AES pond.Wherein, the corresponding access times threshold value of different AESs can be with identical, can also Differ.
In one example, when obtaining AES from default AES pond, it can be obtained based on default Strategy obtains from default AES pond and cracks difficulty highest AES, if this cracks the encryption calculation of difficulty highest Method has been used 9 times, and access times threshold value corresponding with the AES is 10, then this time can be based on default acquisition plan Slightly the AES is obtained from default AES pond.But, because the AES is after this use, add up quilt Use 10 times, reached corresponding access times threshold value, therefore after this use, can be by the AES from default AES pond in remove.
In the present embodiment, can be based on the AES obtained from default AES pond to source generation to be encrypted Code section is encrypted, wherein it is possible to the AES based on acquisition carries out symmetric cryptography to source code fragment to be encrypted, can also AES based on acquisition carries out asymmetric cryptosystem to source code fragment to be encrypted, and the present embodiment is without limitation.
In step s 103:Multiple encrypted source code fragments are stored into software installation bag to be encrypted.
In the present embodiment, can be by encrypted source code fragment after the encryption to source code fragment to be encrypted is completed Store into software installation bag to be encrypted.Specifically, encrypted source code fragment correspondence can be stored to before its encryption The position in the source code in software installation bag to be encrypted where before the position at place, i.e. its encryption.
In step S104:In software installation bag to be encrypted, calculated based on decryption corresponding with default AES Method generates multiple decryption files.
In the present embodiment, it is necessary to which explanation, step S103 can be before step S104, can also be in step S104 Afterwards, can also simultaneously it be performed with step S104, the present embodiment is without limitation.
In the present embodiment, after code segment to be encrypted is encrypted based on default AES, it can treat In the software installation bag of encryption, corresponding decryption file is generated based on decipherment algorithm corresponding with default AES.
In the present embodiment, the source code fragment that can be generated and be encrypted based on decipherment algorithm corresponding with AES Corresponding decryption file, so that virtual machine can be obtained and handled based on the decryption file in software installation bag to be encrypted Encrypted source code fragment.
The application provides a kind of embodiment of the encryption method of software installation bag, in the present embodiment, can be first to be added Multiple source code fragments to be encrypted are determined in close software installation bag, it is then possible to based at least one default AES, Multiple source code fragments to be encrypted to be encrypted respectively, multiple encrypted source code fragments are obtained, are obtaining encrypted After source code fragment, obtained encrypted source code fragment can be stored into the software installation bag to be encrypted, and treated at this In the software installation bag of encryption, multiple decryption files are generated based on decipherment algorithm corresponding with default AES.
In the present embodiment, can be by multiple source code fragments to be encrypted in software installation bag to be encrypted, dividing It is not encrypted, to realize the encryption to software installation bag to be encrypted, is installed so as to increase malicious attack identification software The difficulty of source code in bag, improves the security of Mobile solution.Meanwhile, the embodiment of the present application can also generate decryption file The decryption to storing the encrypted source code fragment into software installation bag to be encrypted is realized, so that software to be encrypted The source code fragment being encrypted in bag can be read and be handled by normal virtual machine.
Embodiment two
As shown in Fig. 2 the application provides the embodiment of the encryption method of another software installation bag, peace is based on to improve The security of the Mobile solution of tall and erect system.The embodiment of the present application can be by controlling virtual machine needing to perform encrypted source generation During code, just encrypted source code is decrypted, further to increase the source code in malicious attack identification software installation kit Difficulty, improve Mobile solution security.This method specifically includes following steps:
In step s 201:Multiple source code fragments to be encrypted are determined from software installation bag to be encrypted.
In step S202:Based at least one default AES, multiple source code fragments to be encrypted are entered respectively Row encryption, obtains multiple encrypted source code fragments.
In step S203:Multiple encrypted source code fragments are stored into software installation bag to be encrypted.
In step S204:In software installation bag to be encrypted, calculated based on decryption corresponding with default AES Method generates multiple decryption files.
Because step S201 to step S204 content is described in detail in a upper embodiment, therefore the present embodiment is no longer gone to live in the household of one's in-laws on getting married herein State.
In step S205:In software installation bag to be encrypted, generation control routine section;Wherein, control routine section is used When controlling virtual machine performing encrypted source code fragment, based on decryption file corresponding with encrypted source code fragment to quilt The source code fragment of encryption is decrypted, and performs the source code fragment after decryption.
In the present embodiment, can be with after based on decipherment algorithm corresponding with default AES generation decryption file Control routine section is generated in software installation bag to be encrypted, wherein, control routine section can be used for control virtual machine and hold , can be based on decryption file corresponding with encrypted source code fragment to encrypted source code during the source code fragment that row is encrypted Section is decrypted, and performs the source code fragment after decryption.
In one example, virtual machine (for example, Dalvik virtual machine) can obtain the software installation bag to be encrypted, and The source code in the software installation bag is performed, the not encrypted source code fragment gone to when virtual machine in the software installation bag When, can be with successful execution, can be soft based on this when virtual machine goes to source code fragment encrypted in the software installation bag Decrypt corresponding with the source code fragment that this has been encrypted is obtained in the control routine Duan Laicong software installation bags in part installation kit The source code fragment that this has been encrypted is decrypted for file, then, the decryption file based on the acquisition, and performs after decryption Source code fragment.Virtual machine can continue executing with the source generation in the software installation bag after the source code fragment after performing the decryption Code.
In one embodiment, control routine section can control virtual machine when performing encrypted source code fragment, first Obtain the identification information of the source code fragment being encrypted, wherein, the identification information can with unique mark the encrypted source generation Code section, then, the identification information based on acquisition determine decryption file corresponding with encrypted source code fragment, and based on true The source code fragment that this has been encrypted is decrypted fixed decryption file.
It should be noted that the identification information of the source code fragment being encrypted can include the source code being encrypted The title of the corresponding class of section, method or function.
In one example, Dalvik virtual machine can obtain software installation bag to be encrypted, and perform the software installation Source code in bag, when Dalvik virtual machine goes to the not encrypted source code fragment in the software installation bag, Ke Yicheng Work(is performed, and when Dalvik virtual machine goes to source code fragment encrypted in the software installation bag, can first obtain this The title of the corresponding class of encrypted source code fragment, method or function, and the title of the class based on acquisition, method or function is come really Fixed decryption file corresponding with the source code fragment that this has been encrypted, then, Dalvik virtual machine can the solution ciphertext based on determination The source code fragment that this has been encrypted is decrypted part, after successful decryption, and Dalvik virtual machine can perform the successful decryption Source code fragment.After the source code fragment of the successful decryption is performed, Dalvik virtual machine can continue executing with the software installation bag In source code.
The application provides a kind of embodiment of the encryption method of software installation bag, in the present embodiment, can be first to be added Multiple source code fragments to be encrypted are determined in close software installation bag, it is then possible to based at least one default AES, Multiple source code fragments to be encrypted to be encrypted respectively, multiple encrypted source code fragments are obtained, are obtaining encrypted After source code fragment, obtained encrypted source code fragment can be stored into software installation bag to be encrypted, and it is to be added at this In close software installation bag, multiple decryption files are generated based on decipherment algorithm corresponding with default AES.The present embodiment Control routine section can also be generated in the software installation bag to be encrypted, wherein, it is empty that control routine section can be used for control Plan machine is when performing encrypted source code fragment, based on decryption file corresponding with encrypted source code fragment to encrypted source Code segment is decrypted, and performs the source code fragment after decryption.
In the present embodiment, can be by distinguishing multiple source code fragments to be encrypted in software installation bag to be encrypted It is encrypted, and just encrypted source code is decrypted when needing to perform encrypted source code for control virtual machine, To realize the encryption to software installation bag to be encrypted, so as to increase the source code in malicious attack identification software installation kit Difficulty, improve Mobile solution security.Meanwhile, the present embodiment can also generate decryption file to realize to storing to be added The decryption of encrypted source code fragment in close software installation bag, so that the source generation being encrypted in software kit to be encrypted Code section can be read and be handled by normal virtual machine.
Embodiment three
The encryption method of the software installation bag provided above for the embodiment of the present application, based on same thinking, the application is real Apply example and a kind of encryption device of software installation bag is also provided, as shown in Figure 3:
The encryption device of the software installation bag includes:Determining module 310, encrypting module 320, memory module 330 and First generation module 340, wherein:
Determining module 310, for determining multiple source code fragments to be encrypted from software installation bag to be encrypted;
Encrypting module 320, for based at least one default AES, respectively to multiple source generations to be encrypted Code section is encrypted, and obtains multiple encrypted source code fragments;
Memory module 330, for multiple encrypted source code fragments to be stored to the software installation to be encrypted Bao Zhong;
First generation module 340, in the software installation bag to be encrypted, based on being calculated with the default encryption The corresponding decipherment algorithm of method generates multiple decryption files.
In the embodiment of the present application, described device can also include (as shown in Figure 4):
Second generation module 350, in the software installation bag to be encrypted, generating control routine section;Wherein, institute Stating control routine section is used to control virtual machine when performing the encrypted source code fragment, based on the encrypted source generation The encrypted source code fragment is decrypted the corresponding decryption file of code section, and performs the source code fragment after decryption.
In the embodiment of the present application, second generation module 350 can be used for:
In the software installation bag to be encrypted, generation control routine section;Wherein, the control routine section is used to control Virtual machine obtains the identification information of the encrypted source code fragment when performing the encrypted source code fragment;Wherein, institute State the source code fragment being encrypted described in identification information unique mark;
The identification information based on acquisition determines decryption file corresponding with the encrypted source code fragment;
The encrypted source code fragment is decrypted the decryption file based on determination.
In the embodiment of the present application, the identification information can include the corresponding class of the encrypted source code fragment, method Or the title of function.
In the embodiment of the present application, the AES that the different source code fragments to be encrypted is encrypted is identical, or Differ.
The application provides a kind of embodiment of the encryption device of software installation bag, in the present embodiment, can be first to be added Multiple source code fragments to be encrypted are determined in close software installation bag, it is then possible to based at least one default AES, Multiple source code fragments to be encrypted to be encrypted respectively, multiple encrypted source code fragments are obtained, are obtaining encrypted After source code fragment, obtained encrypted source code fragment can be stored into the software installation bag to be encrypted, and treated at this In the software installation bag of encryption, multiple decryption files are generated based on decipherment algorithm corresponding with default AES.
In the present embodiment, can be by multiple source code fragments to be encrypted in software installation bag to be encrypted, dividing It is not encrypted, to realize the encryption to software installation bag to be encrypted, is installed so as to increase malicious attack identification software The difficulty of source code in bag, improves the security of Mobile solution.Meanwhile, the embodiment of the present application can also generate decryption file The decryption to storing the encrypted source code fragment into software installation bag to be encrypted is realized, so that software to be encrypted The source code fragment being encrypted in bag can be read and be handled by normal virtual machine.
Example IV
Based on same thinking, the embodiment of the present application also provides a kind of embodiment of the encryption device of software installation bag, such as Shown in Fig. 5.
The terminal for encryption software installation kit that the encryption device of the software installation bag can provide for above-described embodiment Equipment or server etc..
The encryption device of software installation bag can be produced than larger difference because of configuration or performance difference, can include one Or more than one processor 501 and memory 502, can be stored with memory 502 one or more storage applications Program or data.Wherein, memory 502 can be of short duration storage or persistently storage.The application program for being stored in memory 502 can So that including one or more modules (diagram is not shown), each module can include in the encryption device of software installation bag Series of computation machine executable instruction.Further, processor 501 could be arranged to communicate with memory 502, in software The series of computation machine executable instruction in memory 502 is performed on the encryption device of installation kit.The encryption of software installation bag is set It is standby to include one or more power supplys 503, one or more wired or wireless network interfaces 504, one or More than one input/output interface 505, one or more keyboards 506.
Specifically in the present embodiment, the encryption device of software installation bag includes memory, and one or more Program, one of them or more than one program storage is in memory, and one or more than one program can include One or more modules, and can include can to the series of computation machine in the encryption device of software installation bag for each module Execute instruction, and be configured to by one or more than one computing device this or more than one program bag containing being used for Carry out following computer executable instructions:
Multiple source code fragments to be encrypted are determined from software installation bag to be encrypted;
Based at least one default AES, multiple source code fragments to be encrypted are encrypted respectively, obtained To multiple encrypted source code fragments;
Multiple encrypted source code fragments are stored into the software installation bag to be encrypted;
In the software installation bag to be encrypted, generated based on decipherment algorithm corresponding with the default AES Multiple decryption files.
Alternatively, computer executable instructions when executed, can also make the processor:
In the software installation bag to be encrypted, generation control routine section;Wherein, the control routine section is used to control Virtual machine is when performing the encrypted source code fragment, based on decryption file pair corresponding with the encrypted source code fragment The encrypted source code fragment is decrypted, and performs the source code fragment after decryption.
Optionally, computer executable instructions when executed, can also make the processor:
In the software installation bag to be encrypted, generation control routine section;Wherein, the control routine section is used to control Virtual machine obtains the identification information of the encrypted source code fragment when performing the encrypted source code fragment;Wherein, institute State the source code fragment being encrypted described in identification information unique mark;
The identification information based on acquisition determines decryption file corresponding with the encrypted source code fragment;
The encrypted source code fragment is decrypted the decryption file based on determination.
Optionally, the identification information includes the title of the corresponding class of the encrypted source code fragment, method or function.
Optionally, the AES different source code fragments to be encrypted being encrypted is identical, or differs.
The application provides a kind of embodiment of the encryption device of software installation bag, in the present embodiment, can be first to be added Multiple source code fragments to be encrypted are determined in close software installation bag, it is then possible to based at least one default AES, Multiple source code fragments to be encrypted to be encrypted respectively, multiple encrypted source code fragments are obtained, are obtaining encrypted After source code fragment, obtained encrypted source code fragment can be stored into the software installation bag to be encrypted, and treated at this In the software installation bag of encryption, multiple decryption files are generated based on decipherment algorithm corresponding with default AES.
In the present embodiment, can be by multiple source code fragments to be encrypted in software installation bag to be encrypted, dividing It is not encrypted, to realize the encryption to software installation bag to be encrypted, is installed so as to increase malicious attack identification software The difficulty of source code in bag, improves the security of Mobile solution.Meanwhile, the embodiment of the present application can also generate decryption file The decryption to storing the encrypted source code fragment into software installation bag to be encrypted is realized, so that software to be encrypted The source code fragment being encrypted in bag can be read and be handled by normal virtual machine.
In the 1990s, for a technology improvement can clearly distinguish be on hardware improvement (for example, Improvement to circuit structures such as diode, transistor, switches) or software on improvement (for the improvement of method flow).So And, with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit. Designer nearly all obtains corresponding hardware circuit by the way that improved method flow is programmed into hardware circuit.Cause This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, PLD (Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate Array, FPGA)) it is exactly such a integrated circuit, its logic function is determined by user to device programming.By designer Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, without asking chip maker to design and make Special IC chip.Moreover, nowadays, substitution manually makes IC chip, and this programming is also used instead mostly " patrols Volume compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development, And the source code before compiling also write by handy specific programming language, this is referred to as hardware description language (Hardware Description Language, HDL), and HDL is also not only a kind of, but have many kinds, such as ABEL (Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL (Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language) etc., VHDL (Very-High-Speed are most generally used at present Integrated Circuit Hardware Description Language) and Verilog.Those skilled in the art also should This understands, it is only necessary to slightly programming in logic and be programmed into method flow in integrated circuit with above-mentioned several hardware description languages, The hardware circuit for realizing the logical method flow can be just readily available.
Controller can be implemented in any suitable manner, for example, controller can take such as microprocessor or processing Device and storage can by the computer of the computer readable program code (such as software or firmware) of (micro-) computing device Read medium, gate, switch, application specific integrated circuit (Application Specific Integrated Circuit, ASIC), the form of programmable logic controller (PLC) and embedded microcontroller, the example of controller includes but is not limited to following microcontroller Device:ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, are deposited Memory controller is also implemented as a part for the control logic of memory.It is also known in the art that except with Pure computer readable program code mode is realized beyond controller, can be made completely by the way that method and step is carried out into programming in logic Obtain controller and come real in the form of gate, switch, application specific integrated circuit, programmable logic controller (PLC) and embedded microcontroller etc. Existing identical function.Therefore this controller is considered a kind of hardware component, and various for realizing to including in it The device of function can also be considered as the structure in hardware component.Or even, can be by for realizing that the device of various functions is regarded For that not only can be the software module of implementation method but also can be the structure in hardware component.
System, device, module or unit that above-described embodiment is illustrated, can specifically be realized by computer chip or entity, Or realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used Think personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play It is any in device, navigation equipment, electronic mail equipment, game console, tablet PC, wearable device or these equipment The combination of equipment.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented The function of each unit can be realized in same or multiple softwares and/or hardware during application.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program Product.Therefore, the application can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the application can be used in one or more computers for wherein including computer usable program code The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The application is the flow with reference to method, equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability Comprising so that process, method, commodity or equipment including a series of key elements are not only including those key elements, but also wrap Include other key elements being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described Also there is other identical element in process, method, commodity or the equipment of element.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product. Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code The shape for the computer program product that storage media is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The application can be described in the general context of computer executable instructions, such as program Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these DCEs, by Remote processing devices connected by communication network perform task.In a distributed computing environment, program module can be with Positioned at including in the local and remote computer-readable storage medium including storage device.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.It is real especially for system Apply for example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
Embodiments herein is the foregoing is only, the application is not limited to.For those skilled in the art For, the application can have various modifications and variations.It is all any modifications made within spirit herein and principle, equivalent Replace, improve etc., it should be included within the scope of claims hereof.

Claims (10)

1. a kind of encryption method of software installation bag, it is characterised in that methods described includes:
Multiple source code fragments to be encrypted are determined from software installation bag to be encrypted;
Based at least one default AES, multiple source code fragments to be encrypted are encrypted respectively, obtain many Individual encrypted source code fragment;
Multiple encrypted source code fragments are stored into the software installation bag to be encrypted;
It is multiple based on decipherment algorithm generation corresponding with the default AES in the software installation bag to be encrypted Decrypt file.
2. according to the method described in claim 1, it is characterised in that methods described also includes:
In the software installation bag to be encrypted, generation control routine section;Wherein, the control routine section is used to control virtually Machine is when performing the encrypted source code fragment, based on decryption file corresponding with the encrypted source code fragment to described Encrypted source code fragment is decrypted, and performs the source code fragment after decryption.
3. method according to claim 2, it is characterised in that described based on corresponding with the encrypted source code fragment The encrypted source code fragment is decrypted decryption file, including:
Obtain the identification information of the encrypted source code fragment;Wherein, it is encrypted described in the identification information unique mark Source code fragment;
The identification information based on acquisition determines decryption file corresponding with the encrypted source code fragment;
The encrypted source code fragment is decrypted the decryption file based on determination.
4. method according to claim 3, it is characterised in that the identification information includes the encrypted source code fragment The title of corresponding class, method or function.
5. according to any described method of Claims 1-4, it is characterised in that to the different source code fragments to be encrypted The AES being encrypted is identical, or differs.
6. a kind of encryption device of software installation bag, it is characterised in that described device includes:
Determining module, for determining multiple source code fragments to be encrypted from software installation bag to be encrypted;
Encrypting module, for based at least one default AES, entering respectively to multiple source code fragments to be encrypted Row encryption, obtains multiple encrypted source code fragments;
Memory module, for multiple encrypted source code fragments to be stored into the software installation bag to be encrypted;
First generation module, in the software installation bag to be encrypted, based on corresponding with the default AES Decipherment algorithm generate multiple decryption files.
7. device according to claim 6, it is characterised in that described device also includes:
Second generation module, in the software installation bag to be encrypted, generating control routine section;Wherein, the control Code segment is used to control virtual machine when performing the encrypted source code fragment, based on the encrypted source code fragment pair The encrypted source code fragment is decrypted the decryption file answered, and performs the source code fragment after decryption.
8. device according to claim 7, it is characterised in that second generation module is used for:
In the software installation bag to be encrypted, generation control routine section;Wherein, the control routine section is used to control virtually Machine obtains the identification information of the encrypted source code fragment when performing the encrypted source code fragment;Wherein, the mark Know the source code fragment being encrypted described in information unique mark;
The identification information based on acquisition determines decryption file corresponding with the encrypted source code fragment;
The encrypted source code fragment is decrypted the decryption file based on determination.
9. device according to claim 8, it is characterised in that the identification information includes the encrypted source code fragment The title of corresponding class, method or function.
10. according to any described device of claim 6 to 9, it is characterised in that to the different source code fragments to be encrypted The AES being encrypted is identical, or differs.
CN201710283267.XA 2017-04-26 2017-04-26 The encryption method and device of software installation bag Pending CN107122632A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710283267.XA CN107122632A (en) 2017-04-26 2017-04-26 The encryption method and device of software installation bag

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710283267.XA CN107122632A (en) 2017-04-26 2017-04-26 The encryption method and device of software installation bag

Publications (1)

Publication Number Publication Date
CN107122632A true CN107122632A (en) 2017-09-01

Family

ID=59726191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710283267.XA Pending CN107122632A (en) 2017-04-26 2017-04-26 The encryption method and device of software installation bag

Country Status (1)

Country Link
CN (1) CN107122632A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908931A (en) * 2017-11-16 2018-04-13 四川长虹电器股份有限公司 Digital television software mixing verification encryption method
CN108550043A (en) * 2018-04-16 2018-09-18 北京佳艺徕经贸有限责任公司 The method for anti-counterfeit of commodity sign, the verification method of device and commodity true and false, device
CN108898008A (en) * 2018-04-27 2018-11-27 北京奇艺世纪科技有限公司 The operation method and device of application program
CN110413265A (en) * 2019-08-02 2019-11-05 甘棠软件系统(上海)有限公司 A kind of software configuration code generating method, device and electronic equipment
CN111382447A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 Installation package encryption method, storage medium and computer equipment
CN112100582A (en) * 2020-09-22 2020-12-18 焦点教育科技有限公司 Method for protecting software distribution security by applying strong symmetric encryption

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021321A (en) * 2014-06-17 2014-09-03 北京奇虎科技有限公司 Reinforcing protection method and device for software installation package
CN104392181A (en) * 2014-11-18 2015-03-04 北京奇虎科技有限公司 SO file protection method and device and android installation package reinforcement method and system
CN104680039A (en) * 2013-11-28 2015-06-03 腾讯科技(深圳)有限公司 Data protection method and device of application installation package
CN104834838A (en) * 2015-04-29 2015-08-12 福建天晴数码有限公司 Method and device for preventing unloading storage of DEX file from memory
CN105095771A (en) * 2014-05-08 2015-11-25 北京娜迦信息科技发展有限公司 Method and apparatus for protecting shared target file
CN105426708A (en) * 2016-01-19 2016-03-23 北京鼎源科技有限公司 Reinforcing method of application program of Android system
WO2016078130A1 (en) * 2014-11-18 2016-05-26 刘鹏 Dynamic loading method for preventing reverse of apk file
CN106293852A (en) * 2016-08-19 2017-01-04 北京奇虎科技有限公司 A kind of method and apparatus of the resource file reinforcing installation kit
CN106295255A (en) * 2015-05-27 2017-01-04 腾讯科技(深圳)有限公司 The reinforcement means of application program and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104680039A (en) * 2013-11-28 2015-06-03 腾讯科技(深圳)有限公司 Data protection method and device of application installation package
CN105095771A (en) * 2014-05-08 2015-11-25 北京娜迦信息科技发展有限公司 Method and apparatus for protecting shared target file
CN104021321A (en) * 2014-06-17 2014-09-03 北京奇虎科技有限公司 Reinforcing protection method and device for software installation package
CN104392181A (en) * 2014-11-18 2015-03-04 北京奇虎科技有限公司 SO file protection method and device and android installation package reinforcement method and system
WO2016078130A1 (en) * 2014-11-18 2016-05-26 刘鹏 Dynamic loading method for preventing reverse of apk file
CN104834838A (en) * 2015-04-29 2015-08-12 福建天晴数码有限公司 Method and device for preventing unloading storage of DEX file from memory
CN106295255A (en) * 2015-05-27 2017-01-04 腾讯科技(深圳)有限公司 The reinforcement means of application program and device
CN105426708A (en) * 2016-01-19 2016-03-23 北京鼎源科技有限公司 Reinforcing method of application program of Android system
CN106293852A (en) * 2016-08-19 2017-01-04 北京奇虎科技有限公司 A kind of method and apparatus of the resource file reinforcing installation kit

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107908931A (en) * 2017-11-16 2018-04-13 四川长虹电器股份有限公司 Digital television software mixing verification encryption method
CN107908931B (en) * 2017-11-16 2021-01-26 四川长虹电器股份有限公司 Digital television software mixed check encryption method
CN108550043A (en) * 2018-04-16 2018-09-18 北京佳艺徕经贸有限责任公司 The method for anti-counterfeit of commodity sign, the verification method of device and commodity true and false, device
CN108898008A (en) * 2018-04-27 2018-11-27 北京奇艺世纪科技有限公司 The operation method and device of application program
CN111382447A (en) * 2018-12-28 2020-07-07 广州市百果园信息技术有限公司 Installation package encryption method, storage medium and computer equipment
CN111382447B (en) * 2018-12-28 2023-08-29 广州市百果园信息技术有限公司 Encryption method for installation package, storage medium and computer equipment
CN110413265A (en) * 2019-08-02 2019-11-05 甘棠软件系统(上海)有限公司 A kind of software configuration code generating method, device and electronic equipment
CN110413265B (en) * 2019-08-02 2023-11-03 甘棠软件系统(上海)有限公司 Software configuration code generation method and device and electronic equipment
CN112100582A (en) * 2020-09-22 2020-12-18 焦点教育科技有限公司 Method for protecting software distribution security by applying strong symmetric encryption
CN112100582B (en) * 2020-09-22 2023-06-16 焦点教育科技有限公司 Method for protecting software distribution safety by applying strong symmetric encryption

Similar Documents

Publication Publication Date Title
CN107122632A (en) The encryption method and device of software installation bag
CN107122634A (en) The method for reinforcing and protecting and device of software installation bag
JP6804668B2 (en) Block data validation method and equipment
CN107196989B (en) A kind of processing method and processing device of service request
CN107392040B (en) A kind of method and device of common recognition verifying
CN110162981A (en) Data processing method and device
CN108932297A (en) A kind of data query, data sharing method, device and equipment
US10091000B2 (en) Techniques for distributing secret shares
CN109831298A (en) The method of security update key and node, storage medium in block chain
CN107196900A (en) A kind of method and device for verification of knowing together
CN107370730A (en) A kind of log-on message processing method and equipment
CN108055132A (en) The method, apparatus and equipment of a kind of service authorization
CN109426732A (en) A kind of data processing method and device
CN107430670A (en) Flexible counter system for memory protection
US20150078550A1 (en) Security processing unit with configurable access control
CN109886682A (en) The method and node, storage medium that contract calls are realized in block chain
CN110020855A (en) Method, the node, storage medium of secret protection are realized in block chain
CN110020856A (en) Method, node and the storage medium of three handed deal are realized in block chain
US20220014351A1 (en) Electronic device using homomorphic encryption and encrypted data processing method thereof
CN108537012A (en) Source code based on variable and code execution sequence obscures method and device
CN107196907A (en) A kind of guard method of Android SO files and device
CN110263505A (en) Image processing method and device based on block chain
CN110264193A (en) In conjunction with the receipt storage method and node of user type and type of transaction
CN107025390A (en) The reinforcement means and device of software installation bag
CN109325508A (en) The representation of knowledge, machine learning model training, prediction technique, device and electronic equipment

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
CB02 Change of applicant information

Address after: 100083 Beijing, Haidian District Xueyuan Road 30 days building A 20 floor

Applicant after: Beijing Bang Bang Safety Technology Co. Ltd.

Address before: 100083 Xueyuan Road, Haidian District, Haidian District, Beijing, Haidian District, Beijing

Applicant before: Yangpuweiye Technology Limited

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20170901

RJ01 Rejection of invention patent application after publication