CN112182514A - Method, apparatus, device and computer readable medium for authorization verification - Google Patents

Method, apparatus, device and computer readable medium for authorization verification Download PDF

Info

Publication number
CN112182514A
CN112182514A CN202011003200.4A CN202011003200A CN112182514A CN 112182514 A CN112182514 A CN 112182514A CN 202011003200 A CN202011003200 A CN 202011003200A CN 112182514 A CN112182514 A CN 112182514A
Authority
CN
China
Prior art keywords
authorization code
user
authorization
days
software
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
CN202011003200.4A
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202011003200.4A priority Critical patent/CN112182514A/en
Publication of CN112182514A publication Critical patent/CN112182514A/en
Pending legal-status Critical Current

Links

Images

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
    • 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/105Arrangements for software license management or administration, e.g. for managing licenses at corporate level
    • 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 invention discloses a method, a device, equipment and a computer readable medium for authorization verification, and relates to the technical field of computers. One embodiment of the method comprises: decrypting the user authorization code by using the public key to obtain an encrypted authorization code; decrypting an original authorization code in the encrypted authorization code based on a user secret key obtained from the encrypted authorization code to obtain a user identifier, an authorization code validity period and an authorization use number of days; and if the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code, updating the actual use days of the software according to the authorization use days. This embodiment can restrict illegal use of software.

Description

Method, apparatus, device and computer readable medium for authorization verification
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer-readable medium for authorization verification.
Background
The concept of software protection is from the perspective of developers, and emphasizes that the software is protected from being cracked by using a technical means mainly based on encryption, and is protected from being illegally or excessively used by customers. In theory, all software protection techniques can be broken as long as there are enough resources and time. However, if the security strength of a protection technique is such that a cracker is charged with a higher cost than purchasing software, the protection technique is successful and worthy of use.
The rights and interests of software developers are protected, the software is prevented from being copied, stolen or illegally used without authentication, the software is generally authenticated and activated in a software authorization mode, and only the authenticated and activated software can be normally used, so that users can use various functions and services provided by the software.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: the authorization information is generated based on the characteristics of the server, and the illegal use of the software cannot be limited.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a computer-readable medium for authorization verification, which can limit illegal use of software.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an authorization verification method including:
decrypting the user authorization code by using the public key to obtain an encrypted authorization code;
decrypting an original authorization code in the encrypted authorization code based on a user secret key obtained from the encrypted authorization code to obtain a user identifier, an authorization code validity period and an authorization use number of days;
and if the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code, updating the actual use days of the software according to the authorization use days.
The decrypting of the original authorization code in the encrypted authorization code based on the user key obtained from the encrypted authorization code to obtain the user identifier, the validity period of the authorization code, and the number of authorized use days includes:
acquiring the user secret key and the original authorization code from the encrypted authorization code through preset characters in the encrypted authorization code;
and based on the user secret key, decrypting the original authorization code in the encrypted authorization code to obtain the user identification, the validity period of the authorization code and the number of authorized use days.
Decrypting the original authorization code in the encrypted authorization code to obtain the user identifier, the validity period of the authorization code and the number of authorized use days, wherein the method comprises the following steps:
decrypting the original authorization code in the encrypted authorization codes to obtain a splicing authorization code;
and segmenting the splicing authorization code according to preset characters in the splicing authorization code to obtain the user identification, the authorization code validity period and the authorized use days.
If the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code, updating the actual number of days of use of the software according to the number of days of use of authorization, including:
decrypting the configuration file by using the public key to obtain the actual user identification and the service life of the software;
and if the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code, adding the authorization use days to the actual use days of the software.
The user authorization code is user input.
The method further comprises the following steps:
the actual usage days of the software are updated at least once a day.
The method further comprises the following steps:
and stopping the service of the software when the actual using days of the software are equal to zero.
The method further comprises the following steps:
and if the actual use days of the software are less than or equal to the reminding days, sending a reminding message.
The method further comprises the following steps:
the server side encrypts the user identification, the validity period of the authorization code and the authorization use days by using the user secret key to obtain the original authorization code;
the server side constructs the encryption authorization code according to the original authorization code and the user secret key;
and the server side encrypts the encrypted authorization code through a public key to obtain the user authorization code.
The server side encrypts the user identifier, the validity period of the authorization code and the number of authorized use days by using the user secret key to obtain the original authorization code, and the method comprises the following steps:
splicing the user identification, the validity period of the authorization code and the authorized use days according to the preset characters to obtain a splicing authorization code;
and encrypting the splicing authorization code by using a user secret key to obtain the original authorization code.
The server side constructs the encryption authorization code according to the original authorization code and the user secret key, and the method comprises the following steps:
and the server side splices the original authorization code and the user secret key by using preset characters to obtain the encrypted authorization code.
The preset characters comprise preset special characters.
The server side comprises a user information table, and the user information table comprises the user identification and the user secret key.
The method further comprises the following steps:
and if the user identifier obtained by decryption is inconsistent with the actual user identifier, displaying that the decryption fails.
The method further comprises the following steps:
and if the decrypted user identifier is consistent with the actual user identifier and the current date exceeds the validity period of the authorization code, displaying the decryption expiry date.
The method is applied to the software.
The public key is preset in the software.
According to a second aspect of the embodiments of the present invention, there is provided an apparatus for authorization verification, including:
the first decryption module is used for decrypting the user authorization code by using the public key to obtain an encrypted authorization code;
the second decryption module is used for decrypting the original authorization code in the encrypted authorization code based on the user secret key obtained from the encrypted authorization code to obtain a user identifier, an authorization code validity period and an authorization use number of days;
and the authorization module is used for updating the actual use days of the software according to the authorized use days if the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code.
According to a third aspect of the embodiments of the present invention, there is provided an electronic device for authorization verification, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method as described above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method as described above.
One embodiment of the above invention has the following advantages or benefits: decrypting the user authorization code by using the public key to obtain an encrypted authorization code; decrypting an original authorization code in the encrypted authorization code based on a user secret key obtained from the encrypted authorization code to obtain a user identifier, an authorization code validity period and an authorization use number of days; and if the decrypted user identification is consistent with the actual user identification and the validity period of the authorization code does not exceed the current date, updating the actual use days of the software by the authorization use days. The user identification can be verified, and the validity verification can be performed by means of the validity period of the authorization code, so that the illegal use of the software can be limited.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a prior art server-based feature authorization verification process;
FIG. 2 is a schematic diagram of the main flow of a method of authorization verification according to an embodiment of the invention;
FIG. 3 is a diagram illustrating a usage scenario of a method for application authorization verification according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of decrypting a user authorization code, according to an embodiment of the invention;
FIG. 5 is a flow diagram illustrating decryption of an original authorization code according to an embodiment of the invention;
FIG. 6 is a diagram of decrypting an original authorization code, according to an embodiment of the invention;
FIG. 7 is a flowchart illustrating decryption of an original authorization code according to an embodiment of the invention;
FIG. 8 is a flow diagram illustrating updating the lifetime of software according to an embodiment of the present invention;
FIG. 9 is a flowchart illustrating the construction of a user authorization code according to an embodiment of the invention;
fig. 10 is a flow chart illustrating the establishment of a primitive authorization code according to an embodiment of the present invention;
FIG. 11 is a diagram illustrating obtaining a primitive authorization code, according to an embodiment of the invention;
FIG. 12 is a schematic diagram of obtaining a user authorization code, according to an embodiment of the invention;
fig. 13 is a schematic diagram of the main structure of an apparatus for authorization verification according to an embodiment of the present invention;
FIG. 14 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 15 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The software can provide two deployment schemes of cloud and localization, so that the software authorization can be divided into online authorization and offline authorization. Cloud-deployed services generally provide online authorization. Whereas for locally deployed software, offline authorization is typically provided.
Software with intellectual property generally takes the form of software protection, which requires some means to activate the software before it can be used. The software activation essence is to compare the ciphertext data, which is generally generated by the software developer through encryption according to the feature data of the target machine. The activation process is done on the authentication server or the target machine.
Currently, the mainstream offline authorization scheme basically generates an MD5 value based on the characteristics of the server, and encrypts the MD5 value again to obtain authorization information. The software is activated offline using the authorization information. The characteristics of the server may include one or more of a Mac address, a hard disk serial number, and a cpu serial number.
The MD5 value is a parameter obtained by an MD5 algorithm. The MD5 Algorithm is the MD5 Messag e-Digest Algorithm message Digest Algorithm, a widely used cryptographic hash function. The Media Access Control (Mac) Address is the physical Address of the device. The MAC address is used to uniquely identify a network card in the network, and if one or more network cards exist in a device, each network card needs to have a unique MAC address.
Referring to fig. 1, fig. 1 is a schematic diagram of a process of server-based feature authorization verification in the prior art, which is illustrated by taking a machine feature as a Mac address and an encryption algorithm as a DES feature, and specifically includes:
s101, a Mac address of the server is obtained, and an MD5 value is generated according to the obtained Mac address.
S102, the MD5 value is encrypted, and an authorization code or an authorization file presence.
And S103, sending authorization information to the client, and inputting an authorization code in software or uploading an authorization file presence.
And S104, the software analyzes the authorization code or the authorization file, and the MD5 value is obtained after decryption.
S105, comparing the MD5 values.
And the software acquires the Mac address of the current running server and generates an MD5 value. And comparing the MD5 values of S104 and S105, and if the MD5 values are consistent, successfully activating the software system. Otherwise, it fails.
Among them, the Data Encryption Standard (DES) is a block algorithm using key Encryption.
In the solution of fig. 1, the following problems exist: the software can be used all the time after one-time authorization, and the use time of the software cannot be limited; the authorization information may be multiplexed. Such as: by modifying the mac addresses of other servers to existing mac addresses, software on multiple servers can be activated with one copy of authorization information.
It can be seen that the authorization information is generated based on the characteristics of the server, and the illegal use of the software cannot be limited.
In order to solve the technical problem that the illegal use of the software cannot be limited, the following technical scheme in the embodiment of the invention can be adopted.
Referring to fig. 2, fig. 2 is a schematic diagram of a main flow of an authorization verification method according to an embodiment of the present invention, in which a user is verified through a user identifier in a user authorization code, and a valid date is verified through an authorization code validity period in the user authorization code, so as to limit illegal use of software. As shown in fig. 2, the method specifically includes the following steps:
s201, decrypting the user authorization code by using the public key to obtain an encrypted authorization code.
In the embodiment of the invention, two ends, namely a server end and a client end, are involved. The server can be arranged in a server for developing software, and the client is arranged in a server for using software.
Referring to fig. 3, fig. 3 is a schematic view of a usage scenario of a method for verifying application authorization according to an embodiment of the present invention, specifically including a server and two clients.
The server is used for generating a user authorization password aiming at the user. The server side can send the generated user authorization password to the user. As an example, the server sends the user authorization code to the user through an e-mail or the like. After receiving the user authorization code, the user can input the user authorization code at the client. If the user authorization password is successfully verified, the software can be continuously used; if the user authorization password fails to be verified, the software cannot be used continuously after the actual use days.
It is understood that the execution subject of each step in fig. 2 is a client.
In order to avoid revealing the authorization information, the user authorization code is data encrypted by the server. The client needs to decrypt the user authorization code to obtain the authorization information.
In the embodiment of the invention, the user authorization code is decrypted in two steps. The first step is decryption with a public key and the second step is decryption with a user key. The public key is preset in the software, and the user secret key is preset in the user authorization code.
Referring to fig. 4, fig. 4 is a schematic diagram of decrypting the user authorization code according to the embodiment of the present invention, where the client, upon receiving the user authorization code, may decrypt the user authorization code by using the public key and the DES to obtain the encrypted authorization code. In one embodiment of the invention, the user authorization code may be user-entered.
That is, a public key is preset in software, and a user of the public key decrypts the user authorization code to obtain the encrypted authorization code.
S202, based on the user secret key obtained from the encrypted authorization code, the original authorization code in the encrypted authorization code is decrypted, and the user identifier, the validity period of the authorization code and the number of authorized use days are obtained.
The encrypted authorization code includes a user key and an original authorization code, and the original authorization code can be decrypted by using the user key.
Referring to fig. 5, fig. 5 is a schematic flowchart of decrypting an original authorization code according to an embodiment of the present invention, which specifically includes:
s501, acquiring a user secret key and an original authorization code from the encrypted authorization code through preset characters in the encrypted authorization code.
In the encrypted authorization code, the user key and the original authorization code are divided into predetermined characters. Then, by identifying the preset characters in the encrypted authorization code, the user key and the original authorization code can be obtained from the encrypted authorization code.
In the embodiment of the present invention, in order to quickly obtain the user key and the original authorization code, the preset characters include preset special characters. I.e. the user key and the original authorization are split up with preset special characters. Such as: the preset special characters are: #. Of course, other special characters are possible.
S502, based on the user secret key, the original authorization code in the encrypted authorization code is decrypted to obtain the user identification, the validity period of the authorization code and the number of authorized use days.
According to the user secret key, the original authorization code in the encrypted authorization code is decrypted, and then the user identification, the validity period of the authorization code and the number of authorized use days can be obtained.
Referring to fig. 6, fig. 6 is a schematic diagram of decrypting an original authorization code according to an embodiment of the present invention, which specifically includes: by using the user key, the original authorization code in the encrypted authorization code is decrypted, and the user identifier, the validity period of the authorization code and the number of authorized use days can be obtained.
Referring to fig. 7, fig. 7 is a schematic flowchart of decrypting an original authorization code according to an embodiment of the present invention, which specifically includes the following steps:
s701, decrypting the original authorization code in the encrypted authorization codes to obtain the splicing authorization code.
And decrypting the original authorization code in the encrypted authorization code by combining the user secret key with DEC to obtain the splicing authorization code.
In the embodiment of the invention, the splicing authorization code is formed by splicing the user identification, the validity period of the authorization code and the authorized use days. And the preset characters are divided among the user identification, the validity period of the authorization code and the number of authorized use days.
S702, segmenting the splicing authorization code according to preset characters in the splicing authorization code to obtain the user identification, the authorization code validity period and the authorized use days.
Since the user identifier, the validity period of the authorization code and the number of authorized use days are divided by the preset characters, the splicing authorization code can be divided according to the preset characters in the splicing authorization code, and the user identifier, the validity period of the authorization code and the number of authorized use days are obtained.
In the embodiment of the invention, in order to quickly acquire the user identifier, the validity period of the authorization code and the authorization use days, the preset characters comprise preset special characters. I.e. the user key and the original authorization are split up with preset special characters. Such as: the preset special characters are: #. Of course, other special characters are possible.
As an example, the splice authorization code is: t1# YYYYMMDD # D1. And dividing the splicing authorization code according to the preset character # to obtain T1, YYYYMMDD and D1, a user number T1, an authorization code validity period YYYYYMMDD and an authorized use number of days D1.
In the embodiment of fig. 7, the splicing authorization code includes not only the user identifier, but also an authorization code validity period and an authorization use number of days, and may be segmented according to preset characters in the splicing authorization code.
In the embodiment of fig. 5, the user identifier, the validity period of the authorization code, and the number of authorized use days are obtained by encrypting the authorization code, on one hand, the extractable information is ensured by using the preset characters, and on the other hand, the original authorization code is decrypted by using the user key, so as to ensure the security of the original authorization code.
S203, if the user identifier obtained by decryption is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code, updating the actual use days of the software through the authorization use days.
The client is preset with user identification and actual use days of the software. As an example, in order to secure the user identification and the actual number of days of use of the software, illegal modification of the above information is avoided. The actual user identification and the actual use days of the software are stored in the client after being encrypted by the public key. And in the process of authorization verification, decrypting by using the public key to obtain the actual user identification and the actual use days of the software.
TABLE 2
User identification Number of days of actual use
T1 D=0
Referring to table 2, table 2 is a table in which the client stores the user identification and the actual number of days of use. Table 2 may be encrypted by a public key.
And if the decrypted user identifier is consistent with the actual user identifier, the user authorization code is specific to the user and not specific to other users. And if the user identifier obtained by decryption is not consistent with the actual user identifier, indicating that the user authorization code is specific to other users, and displaying that decryption fails.
If the current date does not exceed the validity period of the authorization code, the user authorization code is valid; if the current date exceeds the validity period of the authorization code, the user authorization code is invalid, and the decryption is over-term.
As an example, the current date is 4 days 2/2020, the authorization code validity period is 8 days 2/2020, the current date does not exceed the authorization code validity period, and the user authorization code is valid.
As another example, the current date is 9/2/2020, the authorization code validity period is 8/2/2020, the current date exceeds the authorization code validity period, the user authorization code expires, and the decryption expiration period is displayed.
Referring to fig. 8, fig. 8 is a schematic flowchart of a lifetime of updated software according to an embodiment of the present invention, which specifically includes:
s801, the configuration file is decrypted by using the public key to obtain the actual user identification and the service life of the software.
In order to avoid illegal modification of the user identification and the actual number of days of use of the software, the user identification and the actual number of days of use of the software may be stored in a configuration file and encrypted with a public key. As one example, the configuration file may be table 2 above.
When the service life of the software needs to be updated, the configuration file can be decrypted by using the public key to obtain the actual user identification and the service life of the software.
S802, if the user identification obtained by decryption is consistent with the actual user identification and the current date does not exceed the validity period of the authorization code, the number of authorized use days is increased on the actual use days of the software.
And if the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code, the user authorization code is valid, and the number of authorization use days is increased in the actual number of use days of the software.
As an example, the actual usage days of the software is 2 days, the user authorization code is valid, the authorized usage days are 30 days, and the actual usage days of the updated software is 32 days.
In the embodiment of fig. 8, the actual number of days of use of the software may be updated by the number of days of authorized use in the event that the user authorization code is valid.
In one embodiment of the invention, the actual number of days of use of the software is updated over time. As one example, the actual number of days of use of the software is updated at least once per day. Such as: and automatically updating the actual use days D in the configuration file at 24 points every day, executing D-1, and storing by adopting public key encryption.
In one embodiment of the invention, the number of actual usage days of the software is extended in order to remind the user to obtain the user authorization code again. And when the actual use days of the software are less than or equal to the reminding days, sending a reminding message.
As an example, if the number of days of reminder is 20 and the number of actual use days of the software is 19, a reminder message is sent to the user.
In one embodiment of the invention, if the number of actual use days of the software is equal to zero, the service of the software is stopped, and the user authorization code is waited to be input.
The above is the actual number of days of the user who receives the user authorization code from the client to update the software, and illustrates the technical scheme in the embodiment of the present invention.
The following describes a specific technical scheme for establishing the user authorization code from the perspective of the server.
In an embodiment of the present invention, a user authorization code may be established at the server. Referring to fig. 9, fig. 9 is a schematic flowchart of constructing a user authorization code according to an embodiment of the present invention, which specifically includes:
s901, the server encrypts the user identifier, the validity period of the authorization code and the authorization use days by using the user secret key to obtain an original authorization code.
A user information table is stored in the server, specifically referring to table 3. The user identifier and the user key are maintained in the user information table. That is, for each user identity there is a corresponding user key.
TABLE 3
User name User identification User key
Uname1 T1 S1
Uname2 T2 S2
Referring to fig. 10, fig. 10 is a schematic flowchart of establishing an original authorization code according to an embodiment of the present invention, which specifically includes:
s1001, splicing the user identification, the validity period of the authorization code and the authorized use days according to preset characters to obtain a splicing authorization code.
The user identification, the validity period of the authorization code and the authorized use days can be spliced in sequence according to the preset characters to obtain the spliced authorization code. The preset characters comprise preset special characters.
As an example, the preset character is #, the user identifier T1, the validity period yyyyy MMDD of the authorization code, and the number of days of authorized use D1, the concatenation authorization code T1# yyyyymmdd # D1 is obtained.
S1002, encrypting the splicing authorization code by using the user secret key to obtain an original authorization code.
Referring to fig. 11, fig. 11 is a schematic diagram of obtaining an original authorization code according to an embodiment of the present invention. And encrypting the splicing authorization code by using the user secret key to obtain an original authorization code, wherein each user identifier has a corresponding user secret key.
In the embodiment of fig. 10, the original authorization code is obtained by using the predetermined character concatenation and encrypting with the user key.
S902, the server side constructs an encryption authorization code according to the original authorization code and the user secret key.
The user key is not stored at the client, and the client can conveniently decrypt the original authorization code in order to send the user key to the client. And the server side splices the original authorization code and the user secret key by using the preset characters to obtain an encrypted authorization code. The preset characters comprise preset special characters.
S903, the server encrypts the encrypted authorization code through the public key to obtain the user authorization code.
Referring to fig. 12, fig. 12 is a schematic diagram of obtaining a user authorization code according to an embodiment of the present invention. After the server side obtains the encryption authorization code, the server side can encrypt the encryption authorization code through the public key, and further obtain the user authorization code.
In the embodiment of fig. 9, the server combines the user key to construct the encrypted authorization code based on the original authorization code, so as to generate the user authorization code. The client side can conveniently obtain the user secret key to decrypt the original authorization code.
In the embodiment of the present invention, the public key is used to decrypt the user authorization code, so as to obtain the encrypted authorization code; decrypting an original authorization code in the encrypted authorization code based on a user secret key obtained from the encrypted authorization code to obtain a user identifier, an authorization code validity period and an authorization use number of days; and if the decrypted user identification is consistent with the actual user identification and the current date does not exceed the validity period of the authorization code, updating the actual use days of the software by the authorization use days. The user identification can be verified, and the validity verification can be performed by means of the validity period of the authorization code, so that the illegal use of the software can be limited.
Because the encryption is not carried out according to the characteristic data of the server any more and the encryption is not generated by depending on the authentication server, the user authorization code can be independently generated through a complete and strict technical scheme, and the off-line activation of the authentication software is realized at the client.
Referring to fig. 13, fig. 13 is a schematic diagram of a main structure of an authorization verification apparatus according to an embodiment of the present invention, where the authorization verification apparatus can implement an authorization verification method, and as shown in fig. 13, the authorization verification apparatus specifically includes:
the first decryption module 1301 is configured to decrypt the user authorization code with the public key to obtain the encrypted authorization code.
A second decryption module 1302, configured to decrypt an original authorization code in the encrypted authorization code based on the user key obtained from the encrypted authorization code, so as to obtain a user identifier, an authorization code validity period, and an authorization usage number of days.
And the authorization module 1303 is configured to update the actual number of days of use of the software according to the number of days of use of the authorization code if the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code.
In an embodiment of the present invention, the second decryption module 1302 is specifically configured to obtain the user key and the original authorization code from the encrypted authorization code through a preset character in the encrypted authorization code;
and based on the user secret key, decrypting the original authorization code in the encrypted authorization code to obtain the user identification, the validity period of the authorization code and the number of authorized use days.
In an embodiment of the present invention, the second decryption module 1302 is specifically configured to decrypt an original authorization code in the encrypted authorization codes to obtain a splicing authorization code;
and segmenting the splicing authorization code according to preset characters in the splicing authorization code to obtain the user identification, the authorization code validity period and the authorized use days.
In an embodiment of the present invention, the authorization module 1303 is specifically configured to decrypt the configuration file by using the public key to obtain the actual user identifier and the service life of the software;
and if the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code, adding the authorization use days to the actual use days of the software.
In one embodiment of the invention, the user authorization code is user input.
In an embodiment of the present invention, the authorization module 1303 is specifically configured to update the actual usage days of the software at least once a day.
In an embodiment of the present invention, the authorization module 1303, in particular for the number of actual days of use of the software is equal to zero, stops the service of the software.
In an embodiment of the present invention, the authorization module 1303 is specifically configured to send a reminding message when the number of actual usage days of the software is less than or equal to the number of reminding days.
In an embodiment of the present invention, the authorization module 1303 is further configured to control the server to encrypt the user identifier, the validity period of the authorization code, and the number of authorized use days by using the user key, so as to obtain the original authorization code;
the control server side constructs the encryption authorization code according to the original authorization code and the user secret key;
and the control server encrypts the encrypted authorization code through a public key to obtain the user authorization code.
In an embodiment of the present invention, the authorization module 1303 is further configured to control to splice the user identifier, the validity period of the authorization code, and the number of authorized use days according to preset characters to obtain a spliced authorization code;
and encrypting the splicing authorization code by using a user secret key to obtain the original authorization code.
In an embodiment of the present invention, the authorization module 1303 is further configured to control the server to splice the original authorization code and the user key by using a preset character, so as to obtain the encrypted authorization code.
In one embodiment of the present invention, the preset character includes a preset special character.
In an embodiment of the present invention, the server includes a user information table, and the user information table includes the user identifier and the user key.
In an embodiment of the present invention, the authorization module 1303 is further configured to display that decryption has failed if the decrypted user identifier is not consistent with the actual user identifier.
In an embodiment of the present invention, the authorization module 1303 is further configured to display a decryption expiration date if the decrypted user identifier is identical to the actual user identifier and the current date exceeds the validity period of the authorization code.
In one embodiment of the invention, the method is applied in the software.
In one embodiment of the invention, the public key is preset in the software.
Fig. 14 shows an exemplary system architecture 1400 to which the method of authorization verification or the apparatus of authorization verification of an embodiment of the invention may be applied.
As shown in fig. 14, the system architecture 1400 may include terminal devices 1401, 1402, 1403, a network 1404, and a server 1405. The network 1404 serves to provide a medium for communication links between the terminal devices 1401, 1402, 1403 and the server 1405. The network 1404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may use terminal devices 1401, 1402, 1403 to interact with a server 1405 via a network 1404, to receive or send messages or the like. The terminal devices 1401, 1402, 1403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 1401, 1402, 1403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 1405 may be a server providing various services, such as a backend management server (for example only) providing support for shopping websites browsed by users using the terminal devices 1401, 1402, 1403. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for authorization verification provided by the embodiment of the present invention is generally performed by the server 1405, and accordingly, the device for authorization verification is generally disposed in the server 1405.
It should be understood that the number of terminal devices, networks, and servers in fig. 14 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 15, shown is a block diagram of a computer system 1500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 15 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 15, the computer system 1500 includes a Central Processing Unit (CPU)1501 which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)1502 or a program loaded from a storage section 1508 into a Random Access Memory (RAM) 1503. In the RAM 1503, various programs and data necessary for the operation of the system 1500 are also stored. The CPU 1501, the ROM 1502, and the RAM 1503 are connected to each other by a bus 1504. An input/output (I/O) interface 1505 is also connected to bus 1504.
The following components are connected to the I/O interface 1505: an input portion 1506 including a keyboard, a mouse, and the like; an output portion 1507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 1508 including a hard disk and the like; and a communication section 1509 including a network interface card such as a LAN card, a modem, or the like. The communication section 1509 performs communication processing via a network such as the internet. A drive 1510 is also connected to the I/O interface 1505 as needed. A removable medium 1511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1510 as necessary, so that a computer program read out therefrom is mounted into the storage section 1508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 1509, and/or installed from the removable medium 1511. The computer program executes the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 1501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a transmitting unit, an obtaining unit, a determining unit, and a first processing unit. The names of these units do not in some cases constitute a limitation to the unit itself, and for example, the sending unit may also be described as a "unit sending a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
decrypting the user authorization code by using the public key to obtain an encrypted authorization code;
decrypting an original authorization code in the encrypted authorization code based on a user secret key obtained from the encrypted authorization code to obtain a user identifier, an authorization code validity period and an authorization use number of days;
and if the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code, updating the actual use days of the software according to the authorization use days.
According to the technical scheme of the embodiment of the invention, the public key is used for decrypting the user authorization code to obtain the encrypted authorization code; decrypting an original authorization code in the encrypted authorization code based on a user secret key obtained from the encrypted authorization code to obtain a user identifier, an authorization code validity period and an authorization use number of days; and if the decrypted user identification is consistent with the actual user identification and the validity period of the authorization code does not exceed the current date, updating the actual use days of the software by the authorization use days. The user identification can be verified, and the validity verification can be performed by means of the validity period of the authorization code, so that the illegal use of the software can be limited.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (20)

1. A method of authorization verification, comprising:
decrypting the user authorization code by using the public key to obtain an encrypted authorization code;
decrypting an original authorization code in the encrypted authorization code based on a user secret key obtained from the encrypted authorization code to obtain a user identifier, an authorization code validity period and an authorization use number of days;
and if the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code, updating the actual use days of the software according to the authorization use days.
2. The method of claim 1, wherein decrypting the original authorization code in the encrypted authorization code based on the user key obtained from the encrypted authorization code to obtain a user identifier, an authorization code validity period, and a number of authorized usage days comprises:
acquiring the user secret key and the original authorization code from the encrypted authorization code through preset characters in the encrypted authorization code;
and based on the user secret key, decrypting the original authorization code in the encrypted authorization code to obtain the user identification, the validity period of the authorization code and the number of authorized use days.
3. The method of claim 1 or 2, wherein decrypting the original authorization code in the encrypted authorization code to obtain the user identifier, the validity period of the authorization code, and the number of days of authorized use comprises:
decrypting the original authorization code in the encrypted authorization codes to obtain a splicing authorization code;
and segmenting the splicing authorization code according to preset characters in the splicing authorization code to obtain the user identification, the authorization code validity period and the authorized use days.
4. The method for authorization verification according to claim 1, wherein the decrypted user identifier is consistent with an actual user identifier, and the current date does not exceed the authorization code validity period, the actual number of days of use of the software is updated by the number of days of authorization use, and the method comprises:
decrypting the configuration file by using the public key to obtain the actual user identification and the service life of the software;
and if the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code, adding the authorization use days to the actual use days of the software.
5. The method of claim 1, wherein the user authorization code is user-entered.
6. The method of authorization verification according to claim 1, characterized in that the method further comprises:
the actual usage days of the software are updated at least once a day.
7. The method of authorization verification according to claim 1, characterized in that the method further comprises:
and stopping the service of the software when the actual using days of the software are equal to zero.
8. The method of authorization verification according to claim 1, characterized in that the method further comprises:
and if the actual use days of the software are less than or equal to the reminding days, sending a reminding message.
9. The method of authorization verification according to claim 1, characterized in that the method further comprises:
the server side encrypts the user identification, the validity period of the authorization code and the authorization use days by using the user secret key to obtain the original authorization code;
the server side constructs the encryption authorization code according to the original authorization code and the user secret key;
and the server side encrypts the encrypted authorization code through a public key to obtain the user authorization code.
10. The method of claim 9, wherein the server encrypts the user identifier, the validity period of the authorization code, and the number of authorized usage days by using a user key to obtain the original authorization code, and comprises:
splicing the user identification, the validity period of the authorization code and the authorized use days according to the preset characters to obtain a splicing authorization code;
and encrypting the splicing authorization code by using a user secret key to obtain the original authorization code.
11. The method of claim 9, wherein the server side constructs the encrypted authorization code according to the original authorization code and the user key, and comprises:
and the server side splices the original authorization code and the user secret key by using preset characters to obtain the encrypted authorization code.
12. The method of claim 2, 3, 10 or 11, wherein the predetermined character comprises a predetermined special character.
13. The method of claim 10, wherein the server includes a user information table, and wherein the user information table includes the user identifier and the user key.
14. The method of authorization verification according to claim 1, characterized in that the method further comprises:
and if the user identifier obtained by decryption is inconsistent with the actual user identifier, displaying that the decryption fails.
15. The method of authorization verification according to claim 1, characterized in that the method further comprises:
and if the decrypted user identifier is consistent with the actual user identifier and the current date exceeds the validity period of the authorization code, displaying the decryption expiry date.
16. The method for authorization verification according to claim 1, wherein the method is applied in the software.
17. The method of claim 1, wherein the public key is pre-set in the software.
18. An apparatus for authorization verification, comprising:
the first decryption module is used for decrypting the user authorization code by using the public key to obtain an encrypted authorization code;
the second decryption module is used for decrypting the original authorization code in the encrypted authorization code based on the user secret key obtained from the encrypted authorization code to obtain a user identifier, an authorization code validity period and an authorization use number of days;
and the authorization module is used for updating the actual use days of the software according to the authorized use days if the decrypted user identifier is consistent with the actual user identifier and the current date does not exceed the validity period of the authorization code.
19. An electronic device for authorization verification, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-17.
20. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-17.
CN202011003200.4A 2020-09-22 2020-09-22 Method, apparatus, device and computer readable medium for authorization verification Pending CN112182514A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011003200.4A CN112182514A (en) 2020-09-22 2020-09-22 Method, apparatus, device and computer readable medium for authorization verification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011003200.4A CN112182514A (en) 2020-09-22 2020-09-22 Method, apparatus, device and computer readable medium for authorization verification

Publications (1)

Publication Number Publication Date
CN112182514A true CN112182514A (en) 2021-01-05

Family

ID=73955792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011003200.4A Pending CN112182514A (en) 2020-09-22 2020-09-22 Method, apparatus, device and computer readable medium for authorization verification

Country Status (1)

Country Link
CN (1) CN112182514A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887099A (en) * 2021-01-11 2021-06-01 深圳市新国都支付技术有限公司 Data signature method, electronic device and computer readable storage medium
CN112926047A (en) * 2021-03-30 2021-06-08 中国建设银行股份有限公司 Authorization control method and device for localized deployment product, electronic equipment and medium
CN112989426A (en) * 2021-04-30 2021-06-18 腾讯科技(深圳)有限公司 Authorization authentication method and device, and resource access token acquisition method
CN113468489A (en) * 2021-07-27 2021-10-01 浙江欣奕华智能科技有限公司 Equipment authorization method, authorization code generation method and related device
CN113676316A (en) * 2021-07-06 2021-11-19 惠州市德赛西威汽车电子股份有限公司 Method for opening vehicle-mounted device system debugging tool based on website access mode
CN113762936A (en) * 2021-11-09 2021-12-07 湖北省国土测绘院 Internet-based hook reclamation field check management method
CN114282176A (en) * 2022-03-02 2022-04-05 南京安元科技有限公司 Software authorization bidirectional encryption system and encryption method
CN114519360A (en) * 2022-01-29 2022-05-20 金蝶软件(中国)有限公司 Data reading and writing method, login method and device of business system and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304969B1 (en) * 1999-03-16 2001-10-16 Webiv Networks, Inc. Verification of server authorization to provide network resources
CN104573475A (en) * 2014-12-31 2015-04-29 乐视网信息技术(北京)股份有限公司 Method and system for authenticating transcoding service program
CN109684790A (en) * 2018-12-26 2019-04-26 佛山市瑞德物联科技有限公司 Software start-up method, soft ware authorization verification method, equipment and storage medium
CN109858201A (en) * 2018-12-29 2019-06-07 北京奇安信科技有限公司 A kind of security software pattern switching authorization method, client and server-side

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304969B1 (en) * 1999-03-16 2001-10-16 Webiv Networks, Inc. Verification of server authorization to provide network resources
CN104573475A (en) * 2014-12-31 2015-04-29 乐视网信息技术(北京)股份有限公司 Method and system for authenticating transcoding service program
CN109684790A (en) * 2018-12-26 2019-04-26 佛山市瑞德物联科技有限公司 Software start-up method, soft ware authorization verification method, equipment and storage medium
CN109858201A (en) * 2018-12-29 2019-06-07 北京奇安信科技有限公司 A kind of security software pattern switching authorization method, client and server-side

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887099A (en) * 2021-01-11 2021-06-01 深圳市新国都支付技术有限公司 Data signature method, electronic device and computer readable storage medium
CN112887099B (en) * 2021-01-11 2023-05-16 深圳市新国都支付技术有限公司 Data signing method, electronic device and computer readable storage medium
CN112926047A (en) * 2021-03-30 2021-06-08 中国建设银行股份有限公司 Authorization control method and device for localized deployment product, electronic equipment and medium
CN112989426A (en) * 2021-04-30 2021-06-18 腾讯科技(深圳)有限公司 Authorization authentication method and device, and resource access token acquisition method
CN113676316A (en) * 2021-07-06 2021-11-19 惠州市德赛西威汽车电子股份有限公司 Method for opening vehicle-mounted device system debugging tool based on website access mode
CN113676316B (en) * 2021-07-06 2024-03-22 惠州市德赛西威汽车电子股份有限公司 Method for opening debugging tool of vehicle system based on website access mode
CN113468489A (en) * 2021-07-27 2021-10-01 浙江欣奕华智能科技有限公司 Equipment authorization method, authorization code generation method and related device
CN113762936A (en) * 2021-11-09 2021-12-07 湖北省国土测绘院 Internet-based hook reclamation field check management method
CN114519360A (en) * 2022-01-29 2022-05-20 金蝶软件(中国)有限公司 Data reading and writing method, login method and device of business system and computer equipment
CN114519360B (en) * 2022-01-29 2024-03-08 金蝶软件(中国)有限公司 Data read-write method, login method and device of service system and computer equipment
CN114282176A (en) * 2022-03-02 2022-04-05 南京安元科技有限公司 Software authorization bidirectional encryption system and encryption method

Similar Documents

Publication Publication Date Title
CN112182514A (en) Method, apparatus, device and computer readable medium for authorization verification
JP7454564B2 (en) Methods, user devices, management devices, storage media and computer program products for key management
US9137017B2 (en) Key recovery mechanism
CN1985466B (en) Method of delivering direct proof private keys in signed groups to devices using a distribution CD
US11831753B2 (en) Secure distributed key management system
CN110611657A (en) File stream processing method, device and system based on block chain
CN107040520B (en) Cloud computing data sharing system and method
CN109660534B (en) Multi-merchant-based security authentication method and device, electronic equipment and storage medium
CN108923925B (en) Data storage method and device applied to block chain
CN112437044B (en) Instant messaging method and device
CN111130798A (en) Request authentication method and related equipment
CN112765626A (en) Authorization signature method, device and system based on escrow key and storage medium
CN110022207B (en) Method, apparatus, device and computer readable medium for key management and data processing
US20190305940A1 (en) Group shareable credentials
US10621319B2 (en) Digital certificate containing multimedia content
CN112966287B (en) Method, system, device and computer readable medium for acquiring user data
CN110602075A (en) File stream processing method, device and system for encryption access control
CN112966286B (en) Method, system, device and computer readable medium for user login
CN112565156B (en) Information registration method, device and system
CN112528239B (en) Method and device for automatic authorization of software
CN114117404A (en) User authentication method, device, equipment, system and storage medium
CN110166226B (en) Method and device for generating secret key
CN113132115B (en) Certificate switching method, device and system
CN112929325B (en) Information processing method, system, electronic device, and readable storage medium
CN112926076B (en) Data processing method, device and system

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