CN116383775A - Plug-in development authorization method - Google Patents
Plug-in development authorization method Download PDFInfo
- Publication number
- CN116383775A CN116383775A CN202310048169.3A CN202310048169A CN116383775A CN 116383775 A CN116383775 A CN 116383775A CN 202310048169 A CN202310048169 A CN 202310048169A CN 116383775 A CN116383775 A CN 116383775A
- Authority
- CN
- China
- Prior art keywords
- plug
- authorization
- user information
- codes
- server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000013475 authorization Methods 0.000 title claims abstract description 53
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000011161 development Methods 0.000 title claims abstract description 20
- 230000006870 function Effects 0.000 claims abstract description 6
- 238000009434 installation Methods 0.000 claims abstract description 4
- 238000004806 packaging method and process Methods 0.000 claims abstract description 4
- 230000004913 activation Effects 0.000 claims description 10
- 238000012545 processing Methods 0.000 claims description 6
- 230000006855 networking Effects 0.000 abstract description 5
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/10—Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
- G06F21/105—Arrangements for software license management or administration, e.g. for managing licenses at corporate level
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/20—Software design
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/31—Programming languages or programming paradigms
- G06F8/315—Object-oriented languages
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Technology Law (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Stored Programmes (AREA)
Abstract
The plug-in development authorization method is characterized by comprising the following steps of: generating an asymmetric key pair at a server, storing a private key at the server, and developing a plug-in by using a public key; generating a C++ addons dynamic library; developing plug-in function codes by using js or ts language, and confusing the generated codes and compiling the codes into byte codes through byte codes; and packaging the obtained public key, the generated C++ addons dynamic library and the obtained byte codes together into a plug-in for installation and use by a user. The invention can lead the user to be contacted with the server to obtain authorization under the condition of networking or off-line, and simultaneously, the method combines a plurality of encryption methods, encapsulates the core algorithm into a dynamic library through C++ addon, and realizes double-layer encryption by confusing and recompiling the plug-in code into the byte code, thereby effectively ensuring the encryption and authorization problems of the plug-in code.
Description
Technical Field
The invention relates to the technical field of plug-in development, in particular to a development and authorization method of an IDE plug-in.
Background
Electron provides a rich API, mac, windows, and Linux compatible, enabling users to create cross-platform desktop applications using JavaScript, HTML and CSS. Currently, a number of cross-platform world-wide applications have been developed based on electronics, such as VS Code, atom, skype, whatsApp and national WeChat and Payment instruments.
VScode is an integrated development environment developed based on electronics. The VS Code adopts a plug-in architecture, and a user can customize proper development functions by installing different plug-ins. Of course, the user may develop his own plug-in as desired. However, javaScript, HTML and CSS are both interpreted languages, and the written code need not be compiled into binary. Thus, security for users when writing VS Code plug-in Code using JavaScript, HTML and CSS is a challenge for developers.
In terms of plug-in authorization, the VScode plug-in takes roughly three ways. Firstly, the plug-in code adopts an unencrypted open source mode, and users use the plug-in code freely in the corresponding open source protocol range; secondly, plug-in codes are subjected to simple confusion processing, so that a user cannot easily see code logic, and an open source mode is still adopted; thirdly, the plug-in adopts a closed source mode, and the user is authorized to use the plug-in through an authorization mode.
The current authorization mode generally adopts a user authorization method, the method requires a user to register a user in a networking way, the user is logged in for payment authorization, and authorization information of the method is stored on a cloud server. In addition, there are offline methods that use offline authorization methods that do not require registration authorization, basically encrypt the code by obfuscating or making a c++ addons dynamic library, and the plug-in encryption information is completely local.
Disclosure of Invention
In order to solve the defects existing in the prior art, the invention provides a plug-in development authorization method, which comprises the following steps:
step S1: generating an asymmetric key pair at a server, storing a private key at the server, and developing a plug-in by using a public key;
step S2: generating a C++ addons dynamic library;
step S3: developing plug-in function codes by using js or ts language, and confusing the generated codes and compiling the codes into byte codes through byte codes;
step S4: and (3) packaging the public key acquired in the step S1, the C++ addons dynamic library generated in the step S2 and the byte codes acquired in the step S3 together into a plug-in unit for installation and use by a user.
In the step S2, the user information, the client core encryption algorithm and the offline activation method are packaged in the c++ addons language to generate a c++ addons dynamic library.
After installing the generated plug-in, the client acquires user information and a public key packaged in the plug-in, and encrypts the user information by using the public key, wherein the acquired user information comprises a user main board identifier, a cpu identifier, a mac address and a hard disk identifier.
After the client installs the generated plug-in, the authorization of the plug-in is obtained through the following steps:
step S5: checking whether the client is networked: if the network is connected, the encrypted user information is sent to a server; if the user information is not networked, generating a two-dimensional code or file from the encrypted user information, exporting the two-dimensional code or file, and sending the two-dimensional code or file to a server to request authorization;
step S6: the server receives the authorization request of the client, decrypts the user information by using the private key, performs algorithm processing, generates a serial number and sends the serial number to the client;
step S7: and the client activates the plug-in by using the user information and the serial number, the plug-in authorization is successful if the activation is successful, and the plug-in authorization is failed if the activation is failed.
The plug-in development authorization method provided by the invention can enable a user to be connected with a server to obtain authorization under the condition of networking or off-line, and simultaneously the method combines a plurality of encryption methods, encapsulates a core algorithm into a dynamic library through C++ addon, and realizes double-layer encryption by confusing and recompiling plug-in codes into byte codes, thereby effectively ensuring the encryption and authorization problems of the plug-in codes.
Drawings
Fig. 1: the invention relates to a plug-in development authorization method and an implementation flow chart of plug-in development.
Fig. 2: in the plug-in development authorization method, a client authorization request implementation flow chart is provided.
Fig. 3: the invention relates to a flow chart for generating a serial number by a server side in a plug-in development authorization method.
Detailed Description
In order to further understand the technical scheme and beneficial effects of the present invention, the technical scheme and beneficial effects thereof will be described in detail with reference to the accompanying drawings.
The invention aims to provide an IDE plug-in authorization method which enables a developer to authorize an IDE plug-in even if a user machine is offline. Meanwhile, the code security is improved by confusing, byte and binarization of plug-in codes, so that the code of a developer is protected, and the scheme that the developer authorizes more users is met.
The general idea of the invention is as follows: generating an asymmetric key pair at a server, reserving a private key by the server, issuing the public key together with a plug-in, generating a user identifier according to user machine information after a user installs the plug-in, encrypting and transmitting the user identifier information to the server through a network public key if the user is in a networking condition, determining to authorize the user machine by the server, decrypting through the key by the server, processing and generating a serial number according to a related algorithm, providing the serial number to the user machine, and judging whether the authorization is successful or not by the user machine through a local encryption algorithm; if the user is in an offline condition, encrypting the user identification information through a network public key, generating a two-dimensional code or an encrypted file, providing the two-dimensional code or the encrypted file for the server, determining authorization of the user machine by the server, decrypting through the key, processing the generated serial number according to a related algorithm by the server, providing the serial number for the user machine, and judging whether the authorization is successful or not by the user machine through a local encryption algorithm.
Fig. 1 is a flowchart of implementation of plug-in development in the plug-in development authorization method of the present invention, as shown in fig. 1, the specific steps are as follows:
1. generating an asymmetric key pair at a server, storing a private key at the server, and releasing a public key along with a plug-in;
2. the user information, a client core encryption algorithm and an offline activation method are packaged through a C++ addons language to generate a C++ addons dynamic library; the user information comprises a user main board identifier, a cpu identifier, a mac address or a hard disk identifier and the like;
3. developing plug-in function codes by js or ts language, confusing the generated codes, compiling the codes into byte codes by byte codes, and realizing double-layer encryption;
4. and packaging the public key, the C++ addons dynamic library and the byte codes together into a plug-in for installation and use by a user.
Fig. 2 and fig. 3 are a flowchart of implementing a client authorization request and a flowchart of generating a serial number by a server in the plug-in development authorization method according to the present invention, where, as shown in fig. 2 and fig. 3, the client plug-in authorization steps include:
1. installing an insert;
2. the trigger cause (corresponding to the "active plug-in" under the "install plug-in" in fig. 2) is specified by activation events;
3. the execution algorithm obtains user information such as a user mainboard identifier, a cpu identifier, a mac address, a hard disk identifier and the like from the plug-in unit, obtains a public key in the plug-in unit, and encrypts the user information by using the public key;
4. checking whether the client is networked: if the network is connected, the encrypted user information is sent to a server; if the user information is not networked, generating a two-dimensional code or file from the encrypted user information, exporting the two-dimensional code or file, and sending the two-dimensional code or file to a server to request authorization;
5. the server receives the authorization request of the client, decrypts the user information by using the private key, performs algorithm processing, generates a serial number and sends the serial number to the client;
6. and the client activates the plug-in by using the user information and the serial number, the plug-in authorization is successful if the activation is successful, and the plug-in authorization is failed if the activation is failed.
The developed plugin integrates js code confusion and byte encryption methods and C++ addons methods, encapsulates a user encryption and decryption algorithm in C++ addons, combines and encrypts plugin function codes through the confusion and byte methods to realize double-layer encryption, and meanwhile, an authorization verification algorithm is stored in a client, and the client only needs to network encrypted user information or send the encrypted user information to a server in a two-dimensional code or encryption file mode, so that the user can request authorization on-line or off-line.
In summary, the IDE plug-in authorization method provided by the invention can enable a user to be connected with a server to obtain authorization under the condition of networking or off-line, and simultaneously the method can package a core algorithm into a dynamic library through C++ addon by combining a plurality of encryption methods, and realize double-layer encryption by confusing and recompiling plug-in codes into byte codes, thereby effectively ensuring the encryption and authorization problems of the plug-in codes.
Although the present invention has been described with reference to the above preferred embodiments, it should be understood that the present invention is not limited to the above embodiments, and that various changes and modifications can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (4)
1. The plug-in development authorization method is characterized by comprising the following steps of:
step S1: generating an asymmetric key pair at a server, storing a private key at the server, and developing a plug-in by using a public key;
step S2: generating a C++ addons dynamic library;
step S3: developing plug-in function codes by using js or ts language, and confusing the generated codes and compiling the codes into byte codes through byte codes;
step S4: and (3) packaging the public key acquired in the step S1, the C++ addons dynamic library generated in the step S2 and the byte codes acquired in the step S3 together into a plug-in unit for installation and use by a user.
2. The plug-in development authorization method according to claim 1, wherein in the step S2, the user information, the client core encryption algorithm, and the offline activation method are packaged in the c++ addons language to generate the c++ addons dynamic library.
3. The plug-in development authorization method of claim 2, wherein after the client installs the generated plug-in, the client obtains user information and a public key packaged in the plug-in, and encrypts the user information by using the public key, the obtained user information including a user motherboard identifier, a cpu identifier, a mac address, and a hard disk identifier.
4. The plug-in development authorization method of claim 3, wherein the client obtains authorization for the plug-in after installing the generated plug-in by:
step S5: checking whether the client is networked: if the network is connected, the encrypted user information is sent to a server; if the user information is not networked, generating a two-dimensional code or file from the encrypted user information, exporting the two-dimensional code or file, and sending the two-dimensional code or file to a server to request authorization;
step S6: the server receives the authorization request of the client, decrypts the user information by using the private key, performs algorithm processing, generates a serial number and sends the serial number to the client;
step S7: and the client activates the plug-in by using the user information and the serial number, the plug-in authorization is successful if the activation is successful, and the plug-in authorization is failed if the activation is failed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310048169.3A CN116383775A (en) | 2023-01-31 | 2023-01-31 | Plug-in development authorization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310048169.3A CN116383775A (en) | 2023-01-31 | 2023-01-31 | Plug-in development authorization method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116383775A true CN116383775A (en) | 2023-07-04 |
Family
ID=86971919
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310048169.3A Pending CN116383775A (en) | 2023-01-31 | 2023-01-31 | Plug-in development authorization method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116383775A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118643484A (en) * | 2024-08-14 | 2024-09-13 | 北京云驰未来科技有限公司 | A method for activating vehicle computer debugging authority |
-
2023
- 2023-01-31 CN CN202310048169.3A patent/CN116383775A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118643484A (en) * | 2024-08-14 | 2024-09-13 | 北京云驰未来科技有限公司 | A method for activating vehicle computer debugging authority |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Kostiainen et al. | On-board credentials with open provisioning | |
US7320076B2 (en) | Method and apparatus for a transaction-based secure storage file system | |
US20030037237A1 (en) | Systems and methods for computer device authentication | |
CN113014444B (en) | Internet of things equipment production test system and safety protection method | |
CN111131278A (en) | Data processing method and device, computer storage medium and electronic equipment | |
CN102576391A (en) | Software license embedded in shell code | |
JPH10301772A (en) | Information processor and method therefor and recording medium | |
CN111600948B (en) | Cloud platform application and data security processing method, system, storage medium and program based on identification password | |
CN105657699B (en) | Data safe transmission method | |
CN111865869B (en) | Registration and authentication method and device based on random mapping, medium and electronic equipment | |
CN110414248A (en) | Method for debugging microprocessor and microprocessor | |
US7552092B2 (en) | Program distribution method and system | |
CN111814166B (en) | Data encryption method and device and electronic equipment | |
US8745375B2 (en) | Handling of the usage of software in a disconnected computing environment | |
CN109446752A (en) | Rights file management method, system, equipment and storage medium | |
CN116383775A (en) | Plug-in development authorization method | |
CN109711178B (en) | Key value pair storage method, device, equipment and storage medium | |
JP2007515723A (en) | Software execution protection using active entities | |
CN112597453A (en) | Program code encryption and decryption method and device | |
KR20190115489A (en) | IOT equipment certification system utilizing security technology | |
CN116545614A (en) | Private key generation method, signature method and signature verification method | |
CN114726539A (en) | Trusted Cryptography Module (TCM) -based offline upgrading method | |
KR100883442B1 (en) | How to Pass Proof Secret Keys Directly to a Device Using an Online Service | |
CN112597449B (en) | Software encryption method, device, device and storage medium | |
CN113821805B (en) | Data encryption method and device |
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 |