Plugin Development Licensing Method

By employing asymmetric key pairs and encapsulating encryption algorithms in C++ addons dynamic libraries within the IDE plugin, double-layer encryption is implemented. This solves the security and authorization issues of the plugin code in both online and offline scenarios, ensuring the security and legitimate use of the plugin code.

CN116383775BActive Publication Date: 2026-11-10KYLIN CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310048169.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-31
Publication Date
2026-11-10
Estimated Expiration
2043-01-31

AI Technical Summary

Technical Problem

Existing IDE plugin licensing methods have insufficient security, especially when users are offline, making it difficult to effectively protect the integrity of plugin code and its legitimate use.

Method used

It employs an asymmetric key pair generation method, generating a private key and publishing a public key on the server side. It combines a C++ addons dynamic library to encapsulate the encryption algorithm, achieving double-layer encryption through obfuscation and bytecode compilation. On the client side, it performs user information encryption and authorization verification, supporting both online and offline authorization.

Benefits of technology

It effectively protects the security and legitimate use of plugin code in both online and offline environments, improving the security and licensing flexibility of plugin code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116383775B_ABST
    Figure CN116383775B_ABST
Patent Text Reader

Abstract

A plugin development authorization method, characterized by the following steps: generating an asymmetric key pair on the server side, storing the private key on the server side, and using the public key for plugin development; generating a C++ addons dynamic library; developing plugin functional code using JavaScript or TypeScript, obfuscating the generated code, and compiling it into bytecode using a bytenode; packaging the obtained public key, the generated C++ addons dynamic library, and the obtained bytecode together into a plugin for user installation and use. This invention allows users to obtain authorization from the server whether online or offline. Furthermore, this method combines multiple encryption methods, encapsulating the core algorithm into a dynamic library using C++ addons, and implementing double-layer encryption by obfuscating and recompiling the plugin code into bytecode, effectively ensuring the encryption and authorization of the plugin code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of plugin development technology, specifically to a method for developing and licensing IDE plugins. Background Technology

[0002] Electron offers a rich API, compatible with Mac, Windows, and Linux, enabling users to create cross-platform desktop applications using JavaScript, HTML, and CSS. Currently, many world-class cross-platform applications have been developed based on Electron, such as VS Code, Atom, Skype, WhatsApp, and in China, WeChat and Alipay.

[0003] VS Code is an integrated development environment (IDE) built on Electron. VS Code employs a plugin architecture, allowing users to customize development functionality by installing various plugins. Users can also develop their own plugins as needed. However, JavaScript, HTML, and CSS are interpreted languages, meaning the code written in them does not need to be compiled into binary code. Therefore, security when users write VS Code plugin code using JavaScript, HTML, and CSS becomes a significant challenge for developers.

[0004] Regarding plugin licensing, VS Code plugins generally employ three methods. First, the plugin code is unencrypted and open-source, allowing users to use it for free within the scope of the corresponding open-source license. Second, the plugin code undergoes simple obfuscation, making the code logic less discernible to users, but still maintains an open-source approach. Third, the plugin adopts a closed-source approach, authorizing users to use it through a licensing model.

[0005] Currently, the common licensing model uses a user-based licensing method. This method requires users to register online, log in, and then pay for the license. The licensing information is stored on a cloud server. Alternatively, there is an offline licensing method. This method does not require registration or licensing and typically uses obfuscation or the creation of C++ addons dynamic libraries to encrypt the code. The plugin encryption information is stored locally. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a plugin development licensing method, comprising the following steps:

[0007] Step S1: Generate an asymmetric key pair on the server side. The private key is stored on the server side, and the public key is used for plugin development.

[0008] Step S2: Generate a C++ addons dynamic library;

[0009] Step S3: Develop plugin functionality code using JS or TypeScript, obfuscate the generated code, and compile it into bytecode using a bytenode.

[0010] Step S4: Package the public key obtained in Step S1, the C++ addons dynamic library generated in Step S2, and the bytecode obtained in Step S3 into a plugin for users to install and use.

[0011] In step S2, user information, client core encryption algorithm, and offline activation method are encapsulated using the C++ addons language to generate a C++ addons dynamic library.

[0012] After the client installs the generated plugin, it obtains user information and the public key packaged in the plugin, and uses the public key to encrypt the user information. The obtained user information includes the user's motherboard identifier, CPU identifier, MAC address, and hard drive identifier.

[0013] After installing the generated plugin, the client obtains authorization for the plugin through the following steps:

[0014] Step S5: Check if the client is connected to the internet: If connected, send the encrypted user information to the server; if not connected, generate a QR code or file from the encrypted user information, export the QR code or file, send it to the server, and request authorization.

[0015] Step S6: The server receives the authorization request from the client, decrypts the user information using the private key, performs algorithm processing, generates a serial number, and sends the serial number to the client;

[0016] Step S7: The client activates the plugin using user information and serial number. If activation is successful, the plugin is authorized successfully; if activation fails, the plugin authorization fails.

[0017] The plugin development authorization method provided by this invention allows users to contact the server to obtain authorization whether they are online or offline. At the same time, this method combines multiple encryption methods, encapsulates the core algorithm into a dynamic library through a C++ addon, and implements double encryption by obfuscating and recompiling the plugin code into bytecode, effectively ensuring the encryption and authorization of the plugin code. Attached Figure Description

[0018] Figure 1 : Flowchart of plugin development implementation in the plugin development authorization method of this invention.

[0019] Figure 2 The following is a flowchart illustrating the client authorization request implementation process in the plugin development authorization method of this invention.

[0020] Figure 3The flowchart of the server-side serial number generation process in the plugin development authorization method of this invention. Detailed Implementation

[0021] To gain a better understanding of the technical solution and beneficial effects of the present invention, the technical solution of the present invention and its beneficial effects are described in detail below with reference to the accompanying drawings.

[0022] The purpose of this invention is to provide an IDE plugin licensing method that allows developers to license IDE plugins even when the user's machine is offline. Simultaneously, it enhances code security by obfuscating and byte-coding and binary-coding the plugin code, thereby protecting the developer's code and enabling developers to license plugins to more users.

[0023] The overall concept of this invention is as follows: An asymmetric key pair is generated on the server side. The server retains the private key and publishes the public key along with the plugin. After the user installs the plugin, a user identifier is generated based on the user's machine information. If the user is connected to the internet, the user identifier information is encrypted using the network public key and sent to the server. If the server decides to authorize the user's machine, it decrypts the key and generates a serial number according to a relevant algorithm, which is then provided to the user's machine. The user's machine uses a local encryption algorithm to determine whether the authorization was successful. If the user is offline, the user identifier information is encrypted using the network public key and a QR code or encrypted file is generated and provided to the server. If the server decides to authorize the user's machine, it decrypts the key and generates a serial number according to a relevant algorithm, which is then provided to the user's machine. The user's machine uses a local encryption algorithm to determine whether the authorization was successful.

[0024] Figure 1 This is a flowchart illustrating the plugin development implementation process in the plugin development licensing method of the present invention, as follows: Figure 1 As shown, the specific steps are as follows:

[0025] 1. Generate an asymmetric key pair on the server side, with the private key stored on the server side and the public key distributed with the plugin;

[0026] 2. By encapsulating user information, client core encryption algorithms, and offline activation methods using the C++ addons language to generate a C++ addons dynamic library; user information includes user motherboard identifier, CPU identifier, MAC address, or hard drive identifier, etc.

[0027] 3. Develop plugin functionality code using JavaScript or TypeScript, obfuscate the generated code, and compile it into bytecode using a bytenode to achieve double-layer encryption;

[0028] 4. Package the public key, C++ addons dynamic library, and bytecode together into a plugin for users to install and use.

[0029] Figure 2 and Figure 3 The flowcharts are as follows: a client authorization request implementation flowchart and a server-side serial number generation flowchart, respectively, in the plugin development authorization method of this invention. Figure 2 and Figure 3 As shown, the client plugin authorization steps include:

[0030] 1. Install the plugin;

[0031] 2. Specify the triggering reason through activation events (corresponding to...) Figure 2 (Activate plugins below "Install plugins");

[0032] 3. The algorithm is executed to obtain user information such as motherboard identifier, CPU identifier, MAC address and hard drive identifier from the plugin, and the public key in the plugin is obtained and used to encrypt the user information.

[0033] 4. Check if the client is connected to the internet: If connected, send the encrypted user information to the server; if not connected, generate a QR code or file from the encrypted user information, export the QR code or file, send it to the server, and request authorization.

[0034] 5. The server receives the authorization request from the client, decrypts the user information using the private key, performs algorithm processing, generates a serial number, and sends the serial number to the client.

[0035] 6. The client uses user information and serial number to activate the plugin. If the activation is successful, the plugin is authorized successfully; if the activation fails, the plugin authorization fails.

[0036] In other words, the plugin developed in this invention integrates JavaScript code obfuscation and byte-encryption encryption methods with C++ addons methods. The user encryption and decryption algorithm is encapsulated in C++ addons. The plugin's functional code is encrypted by combining obfuscation and byte-encryption methods, achieving double-layer encryption. At the same time, the authorization verification algorithm is stored on the client. The client only needs to send the encrypted user information to the server via the Internet or through a QR code or encrypted file, so that the user can request authorization whether online or offline.

[0037] In summary, the IDE plugin authorization method proposed in this invention allows users to obtain authorization from the server whether online or offline. Furthermore, by combining multiple encryption methods, the core algorithm is encapsulated into a dynamic library using a C++ addon, and the plugin code is obfuscated and recompiled into bytecode to achieve double-layer encryption, effectively ensuring the encryption and authorization of the plugin code.

[0038] Although the present invention has been described using the above preferred embodiments, it is not intended to limit the scope of protection of the present invention. Any changes and modifications made by those skilled in the art to the above embodiments without departing from the spirit and scope of the present invention shall still fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be defined by the claims.

Claims

1. A plugin development licensing method, characterized in that, Includes the following steps: Step S1: Generate an asymmetric key pair on the server side. The private key is stored on the server side, and the public key is used for plugin development. Step S2: Encapsulate user information, the client's core encryption algorithm, and the offline activation method using C++ addons to generate a C++ addons dynamic library; Step S3: Develop plugin functionality code using JS or TypeScript, obfuscate the generated code, and compile it into bytecode using a bytenode. Step S4: Package the public key obtained in Step S1, the C++ addons dynamic library generated in Step S2, and the bytecode obtained in Step S3 together into a plugin for users to install and use. After the client installs the generated plugin, it obtains user information and the public key packaged in the plugin, and uses the public key to encrypt the user information. The obtained user information includes the user's motherboard identifier, CPU identifier, MAC address, and hard drive identifier. After the client installs the generated plugin, it obtains authorization for the plugin by following these steps: Step S5: Check if the client is connected to the internet: If connected, send the encrypted user information to the server; if not connected, generate a QR code or file from the encrypted user information, export the QR code or file, send it to the server, and request authorization. Step S6: The server receives the authorization request from the client, decrypts the user information using the private key, performs algorithm processing, generates a serial number, and sends the serial number to the client; Step S7: The client activates the plugin using user information and serial number. If activation is successful, the plugin is authorized successfully; if activation fails, the plugin authorization fails.

Citation Information

Patent Citations

  • Software encryption method and device, equipment and storage medium

    CN113268715A

  • Java character string confusion method and device based on Android platform

    CN113282294A