A kind of implementation method for the code protection system that business model support is provided
Technical field
The present invention relates to protecting computer software field, and specifically, the invention can enter to the executable code after the part of software or compiling
Row encryption, and code protection will be provided and support to be combined with providing business model, it is most suitable soft so as to be that user provides under different business scenarios
Part protection is supported.
Background technology
For translation type language (language of intermediate code is used including java .net etc.) and regulation engine or workflow, software is held
Row code is exactly software code or intermediate code, and this partial code by decompiling or can be directly exposed in face of user and other staff.As long as it is obtained
Actuating code is obtained, then system does not just have secret to say.
In order to protect system code, people use the mode of Code obfuscation, localization or code encryption.But these methods are only to specific soft
Part system is useful, cannot meet the code after different system software cryptography can also synthetic operation demand, the business model of user can not be supported.
A kind of new code protection system is inventors herein proposed, the system will be integrated into code protection mistake to the Control Technique of business model
Cheng Zhong so that software developer easily can be sold the software developed in a different business model, it is also possible that different developers open
The module of hair is protected respectively in same system program, and carries out seamless cooperation.
The content of the invention
The system is made up of the core code after common code, encryption, key, code protection container, licensed software, certificate.Common
Code is exactly the executable code without encryption, and the core code after encryption is exactly by the code of system protection, and key is exactly that can perform before and after encrypting
The conversion bridge of code;Code protection container obtains certificate, using secret key decryption code and performs, common code is exactly based on code protection container
Call core code;Licensed software is Generated Certificate, and core code is encrypted by certificate.
The system authorization software can choose whether to specify its useful life, whether verify using catalogue, whether self-defined key, whether refer to
Surely machine is run, if it is, what its useful life, operation catalogue, self-defined key, operation machine be.System may further specify that
The state of software, calls corresponding interface to change state, and the state change value that then system is specified can change.
Specific implementation step is as follows:
A. licensed software Generates Certificate according to acquired target machine information;
B. licensed software is according to certificate, core code to be protected needed for encryption;
C. the code protection of the core code after the certificate of generation, encryption, the software systems other parts of exploitation, system of the present invention is held
Device is deployed to target machine operation;
D. component can according to demand be deployed under different paths and run after different encryptions, and system can configure its environment, and make it that it is used different
Key and AES.
Brief description of the drawings
The software of the interpreter languages such as java/.NET is encrypted using traditional mode for accompanying drawing 1, and system can only be carried out once to whole system
Encryption, inversely can not call and cooperate.1. protective layer;2 whole system softwares;The actuating code of 3 unencryptions.
Accompanying drawing 2 using the present invention mode the software of the interpreter languages such as java/.NET is encrypted, system can accommodate it is each for encryption or
Component cooperation after encryption.Actuating code after the encryption of 4 protective containers 5.
Embodiment
The present invention uses but is not limited to following technological means and application scenario:
Secret unit has used the system made by interpreter language, due to worrying that actuating code is obtained by people, distorted, database sensitive information quilt
Leakage, because if dangerous comprising the actuating code to sensitive information Processing Algorithm, then how to be encrypted to sensitive information all dangerous;And if made
With system of the present invention, because the actuating code of actuating code or core is encrypted, therefore other people can not obtain and distort, and sensitive information only need to be
Slightly encryption during code accesses information, the algorithm to sensitive information processing is safe, and sensitive information is also safe.
Middle unit development company A wishes that the middleware of its exploitation is generally sold to different clients, and its technology is not stolen again, then by it
After code encryption other developers are sold to together with code protection container.B Products have used A middleware, while he also uses this hair
Bright described system carries out the part of code encryption B companies oneself exploitation.Liang Ge companies all protect the rights and interests of oneself, while seamlessly cooperate with work
Make.
Software company can use its software of invented system encryption, can also decontrol code completely.Its product open source code of customer requirement,
In order to system maintenance, it is contemplated that technology may be exposed after open source code, client may be also without all events fund be paid, in order to control these
The risk of aspect, then software company's selection only encrypt its core code, will belong to the code opening of product maintenance part to client.So he only needs
To be that user issues different certificates, or condition conversion is carried out to software using corresponding interface.