CN117131485B - Authorization method for software service - Google Patents
Authorization method for software service Download PDFInfo
- Publication number
- CN117131485B CN117131485B CN202311234764.2A CN202311234764A CN117131485B CN 117131485 B CN117131485 B CN 117131485B CN 202311234764 A CN202311234764 A CN 202311234764A CN 117131485 B CN117131485 B CN 117131485B
- Authority
- CN
- China
- Prior art keywords
- hash value
- character
- address
- character string
- software service
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/31—User authentication
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses an authorization method of software service, comprising the following steps: sorting the MAC address, the IP address, the CPU information and the hard disk sequence code information of the local network card to obtain a character string; acquiring ASCII codes of each character in the character string, and sequencing to obtain an ASCII code character string; HASH coding is carried out on the ASCII code character strings to obtain a first HASH value with a fixed length; generating confusion characters with preset length, and carrying out weighting treatment on each character of the character string according to the corresponding number size and the confusion characters; carrying out HASH coding on the weighted character strings to obtain a second HASH value with a fixed length; and encrypting the generated first hash value, second hash value or fusion hash value of the first hash value and the second hash value by using RSA, and generating a final encryption result of the sequence code. The invention can improve the safety of software protection.
Description
Technical Field
The invention relates to the technical field of service authorization, in particular to a software service authorization method.
Background
At present, most commercial software and shared software adopt a registration code authorization mode to ensure that the software is not stolen so as to ensure the benefit of the software. Although some versions of many commonly used software systems have been cracked, the manner in which registration codes are authorized remains an effective means of protecting the software system itself for the software industry.
Generally, the following registration code authorization methods are available:
1. method for installing serial number
The serial number installation mode is the most common mode, and products provided by Microsoft (such as Windows series products, office series products and the like) adopt the mode; the installation serial number is generated through a complex algorithm, and in the installation process, the installation program verifies the installation serial number input by a user to verify whether the system is legal or not, so that authorization is completed.
2. User name and serial number adding mode
The user name and serial number adding mode is that the provider of the software system provides the user with effective user name and serial number, the user inputs effective user name and serial number in the installation process or starting process, and the system completes the software authorization after the algorithm verification.
3. On-line registration mode
After the user installs the system, registration authorization is performed through the network. The provider of the software system has registered user information in advance, and when the user registers online, the registration system of the provider verifies the user information. When the user identity is valid, the registration system generates credential information, and the software system completes authorization according to the credential information.
4. Activation code mode
After the user installs the system, the software system generates a registration certificate (also called a registration code) according to key information (such as a MAC address, a CPU serial number, a hard disk serial number and the like) of the user machine, the user sends the registration certificate to a software provider, and the provider generates an activation code through the registration certificate; the user enters the activation code and the software system completes the authorization.
However, in any of the above ways, the authorization can be theoretically broken. Any protection mechanism will appear as black as long as the cracker finds the software authorization mechanism and principle. Therefore, the cracking difficulty of a cracker can be increased only by selecting a complex algorithm and mechanism, so that the software is ensured not to be stolen in a certain time.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention provides a software service authorization method.
The invention discloses an authorization method of software service, comprising the following steps:
step 1, acquiring an MAC address and an IP address of a local network card;
step 2, obtaining CPU information of a computer;
step 3, acquiring sequence code information of a computer hard disk;
step 4, sorting the MAC address, the IP address, the CPU information and the hard disk sequence code information to obtain a character string;
step 5, acquiring ASCII codes of each character in the character string, and sequencing to obtain an ASCII code character string;
step 6, carrying out HASH coding on the ASCII code character strings to obtain a first HASH value with a fixed length;
step 7, generating confusion characters with preset lengths, and carrying out weighting processing on each character of the character string according to the corresponding number size and the confusion characters;
step 8, carrying out HASH coding on the weighted character strings to obtain a second HASH value with a fixed length;
and 9, encrypting the generated first hash value, second hash value or fusion hash value of the first hash value and the second hash value by using RSA, and generating a final encryption result of the sequence code.
As a further improvement of the present invention, the acquiring the MAC address and the IP address of the local network card includes:
and acquiring the MAC address and the IP address of the local network card through a network interface provided by the operating system.
As a further improvement of the present invention, the acquiring CPU information of the computer includes:
and acquiring CPU information of the computer through system call or a third party library.
As a further improvement of the present invention, the acquiring the sequence code information of the computer hard disk includes:
and acquiring the sequence code information of the computer hard disk through system call or a third party library.
As a further improvement of the invention, the MAC address, the IP address, the CPU information and the hard disk sequence code information are sequenced to obtain a character string; comprising the following steps:
and sequencing the MAC address, the IP address, the CPU information and the hard disk sequence code information according to the alphabetical order to obtain a character string.
As a further improvement of the invention, the ASCII code of each character in the character string is obtained and sequenced to obtain an ASCII code character string; comprising the following steps:
traversing the sequenced character strings, and converting each character in the character strings into corresponding ASCII codes;
and sequencing the ASCII codes of each character according to the ascending order to obtain an ASCII code character string arranged according to the character sequence.
As a further improvement of the present invention, the fusion method of the fused hash value of the first hash value and the second hash value is as follows:
and carrying out weighted fusion on the first hash value and the second hash value according to a preset weighting coefficient corresponding to each type of data so as to obtain a fusion hash value.
As a further refinement of the invention, the first hash value corresponds to the length of the second hash value.
Compared with the prior art, the invention has the beneficial effects that:
the invention can improve the safety of software protection.
Drawings
Fig. 1 is a flowchart of an authorization method for a software service disclosed in the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention is described in further detail below with reference to the attached drawing figures:
as shown in fig. 1, the present invention provides a method for authorizing a software service, comprising:
step 1, acquiring an MAC address and an IP address of a local network card;
the specific implementation method comprises the following steps:
acquiring an MAC address and an IP address of a local network card through a network interface provided by an operating system; wherein the MAC address is a unique identifier of the network interface for identifying the network device in the local area network; the IP address is a unique identifier of the network device in the network for network communication.
Step 2, obtaining CPU information of a computer;
the specific implementation method comprises the following steps:
acquiring CPU information of a computer through system call or a third party library; among these, a CPU (central processing unit) is a core component of a computer, which is responsible for executing instructions and processing computing tasks.
Step 3, acquiring sequence code information of a computer hard disk;
the specific implementation method comprises the following steps:
acquiring the sequence code information of a computer hard disk through system call or a third party library; the serial code information of the hard disk is a unique identifier of the hard disk and is used for identifying and distinguishing different hard disk devices.
Step 4, sorting the MAC address, the IP address, the CPU information and the hard disk sequence code information to obtain a character string;
the specific implementation method comprises the following steps:
sequencing the MAC address, the IP address, the CPU information and the hard disk sequence code information according to the alphabetical order to obtain a character string; the operation can ensure that the generated sequence codes have consistency on different devices, and the finally obtained character strings are the same no matter the acquisition order of the information.
Step 5, acquiring ASCII codes of each character in the character string, and sequencing to obtain an ASCII code character string;
the specific implementation method comprises the following steps:
traversing the sequenced character strings, and converting each character in the character strings into corresponding ASCII codes; and sequencing the ASCII codes of each character according to the ascending order to obtain an ASCII code character string arranged according to the character sequence.
Step 6, carrying out HASH coding on the ASCII code character strings to obtain a first HASH value with a fixed length;
specific:
HASH256 coding is carried out on the ordered ASCII code strings: HASH calculation is carried out on the ordered ASCII code character strings by using a HASH256 algorithm, and a HASH value with the length of 256 bits is generated. HASH256 is an encryption algorithm that can convert input data into a unique fixed-length HASH value, and has high security and collision resistance.
Step 7, generating confusion characters with preset lengths, and carrying out weighting processing on each character of the character string according to the corresponding number size and the confusion characters;
specific:
generating confusion characters with preset lengths: randomly generating a set of digit strings of length 11 from digits 1 through 9, e.g., the generated confusing character is "38452617923";
assuming that the ordered character string is AABBCCDDEE;
weighting the sequenced character strings: traversing the sequenced character strings, and carrying out weighting treatment on each character according to the corresponding number size and the confusion character; the method comprises the following specific steps:
sequencing the confusing characters according to the size of the digits to obtain a new sequence index; for example, from the confusing character "38452617923", the ordered index is "94783526132";
the ordered indexes are in one-to-one correspondence with the ordered strings, namely "A" corresponds to index 9, "B" corresponds to index 4, "C" corresponds to index 7, and so on.
And according to the corresponding relation, each character in the ordered character strings is replaced by the corresponding index number. For example, the character string after replacement is "94783526132".
Step 8, carrying out HASH coding on the weighted character strings to obtain a second HASH value with a fixed length; wherein, the HASH coding adopts the same method as the step 6;
step 9, encrypting the generated first hash value, second hash value or fusion hash value of the first hash value and the second hash value by using RSA, and generating a final encryption result of the sequence code; wherein,
the fusion method of the fusion hash value of the first hash value and the second hash value comprises the following steps: according to a preset weighting coefficient corresponding to each type of data, carrying out weighted fusion on the first hash value and the second hash value to obtain a fusion hash value;
and encrypting the generated first hash value, second hash value or fusion hash value of the first hash value and the second hash value by using an RSA2048 algorithm and a corresponding key to generate a final encryption result of the sequence code.
The invention has the advantages that:
the invention can improve the safety of software protection.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (8)
1. A method for authorizing a software service, comprising:
step 1, acquiring an MAC address and an IP address of a local network card;
step 2, obtaining CPU information of a computer;
step 3, acquiring sequence code information of a computer hard disk;
step 4, sorting the MAC address, the IP address, the CPU information and the hard disk sequence code information to obtain a character string;
step 5, acquiring ASCII codes of each character in the character string, and sequencing to obtain an ASCII code character string;
step 6, carrying out HASH coding on the ASCII code character strings to obtain a first HASH value with a fixed length;
step 7, generating confusion characters with preset lengths, and carrying out weighting processing on each character of the character string according to the corresponding number size and the confusion characters;
step 8, carrying out HASH coding on the weighted character strings to obtain a second HASH value with a fixed length;
and 9, encrypting the generated first hash value, second hash value or fusion hash value of the first hash value and the second hash value by using RSA, and generating a final encryption result of the sequence code.
2. The method for authorizing a software service according to claim 1, wherein the obtaining the MAC address and the IP address of the local network card comprises:
and acquiring the MAC address and the IP address of the local network card through a network interface provided by the operating system.
3. The method for authorizing a software service according to claim 1, wherein the obtaining CPU information of the computer comprises:
and acquiring CPU information of the computer through system call or a third party library.
4. The method for authorizing a software service according to claim 1, wherein the obtaining the sequence code information of the computer hard disk comprises:
and acquiring the sequence code information of the computer hard disk through system call or a third party library.
5. The method for authorizing a software service according to claim 1, wherein the ordering of the MAC address, the IP address, the CPU information, and the hard disk sequence code information results in a string; comprising the following steps:
and sequencing the MAC address, the IP address, the CPU information and the hard disk sequence code information according to the alphabetical order to obtain a character string.
6. The method for authorizing a software service according to claim 1, wherein the obtaining the ASCII code of each character in the string and ordering the ASCII code strings to obtain ASCII code strings; comprising the following steps:
traversing the sequenced character strings, and converting each character in the character strings into corresponding ASCII codes;
and sequencing the ASCII codes of each character according to the ascending order to obtain an ASCII code character string arranged according to the character sequence.
7. The method for authorizing a software service according to claim 1, wherein the method for fusing the first hash value with the second hash value is:
and carrying out weighted fusion on the first hash value and the second hash value according to a preset weighting coefficient corresponding to each type of data so as to obtain a fusion hash value.
8. The method of authorizing a software service according to claim 7, wherein the first hash value is consistent with a length of the second hash value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311234764.2A CN117131485B (en) | 2023-09-22 | 2023-09-22 | Authorization method for software service |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311234764.2A CN117131485B (en) | 2023-09-22 | 2023-09-22 | Authorization method for software service |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117131485A CN117131485A (en) | 2023-11-28 |
CN117131485B true CN117131485B (en) | 2024-02-20 |
Family
ID=88856503
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311234764.2A Active CN117131485B (en) | 2023-09-22 | 2023-09-22 | Authorization method for software service |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117131485B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2002010962A1 (en) * | 2000-07-28 | 2002-02-07 | Storymail, Inc. | System, method and computer program product for device, operating system, and network transport neutral secure interactive multi-media messaging |
GB201103172D0 (en) * | 2011-02-24 | 2011-04-06 | Bevilacqua Leal Carlos E | A cryptography system |
CN109657469A (en) * | 2018-12-07 | 2019-04-19 | 腾讯科技(深圳)有限公司 | A kind of script detection method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7672967B2 (en) * | 2005-02-07 | 2010-03-02 | Microsoft Corporation | Method and system for obfuscating data structures by deterministic natural data substitution |
US8341751B2 (en) * | 2007-12-26 | 2012-12-25 | Wilson Kelce S | Software license management |
US11716617B2 (en) * | 2019-05-02 | 2023-08-01 | Ares Technologies, Inc. | Systems and methods for cryptographic authorization of wireless communications |
-
2023
- 2023-09-22 CN CN202311234764.2A patent/CN117131485B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2002010962A1 (en) * | 2000-07-28 | 2002-02-07 | Storymail, Inc. | System, method and computer program product for device, operating system, and network transport neutral secure interactive multi-media messaging |
GB201103172D0 (en) * | 2011-02-24 | 2011-04-06 | Bevilacqua Leal Carlos E | A cryptography system |
CN109657469A (en) * | 2018-12-07 | 2019-04-19 | 腾讯科技(深圳)有限公司 | A kind of script detection method and device |
Non-Patent Citations (2)
Title |
---|
V.Swaminathan ; S.Mitra.A partial encryption scheme for AVC video.2012 IEEE International Conference on Emerging Signal Processing Applications.2012,1-4. * |
车牌识别系统的算法研究与实现;龙巧云;信息科技;20140615(第6期);30-50 * |
Also Published As
Publication number | Publication date |
---|---|
CN117131485A (en) | 2023-11-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101601045B (en) | Secure serial number | |
CN111770057B (en) | Identity verification system and identity verification method | |
US5454000A (en) | Method and system for authenticating files | |
CN110149328B (en) | Interface authentication method, device, equipment and computer readable storage medium | |
CN112528257A (en) | Security debugging method and device, electronic equipment and storage medium | |
CN108075888B (en) | Dynamic URL generation method and device, storage medium and electronic equipment | |
CN112953978B (en) | Multi-signature authentication method, device, equipment and medium | |
CN108062461A (en) | Software authorization method, device and system | |
CN111917783A (en) | Method, device and storage medium for verifying general message | |
CN117131485B (en) | Authorization method for software service | |
CN113890743A (en) | Block chain retrieval private key generation and asset retrieval method, equipment and storage medium | |
CN108924104B (en) | E-government affair encryption and decryption method | |
CN104519073A (en) | AAA multi-factor security-enhanced authentication method | |
CN113938320B (en) | Method and system for identifying trusted users based on unified gateway | |
CN114584314B (en) | Registration method, device, equipment and medium | |
CN119363361B (en) | APaaS platform-based multi-tenant authority management method and system | |
CN113162764B (en) | Encrypted network handshake method | |
CN119903492B (en) | A registration code generation and verification method and system based on elliptic curve short signature | |
CN118395479B (en) | Data protection method and device for online mall system, electronic equipment and medium | |
CN112486500B (en) | System authorization deployment method | |
CN119577702A (en) | A binary-based software authorization protection method | |
CN110443081B (en) | Keyboard system for protecting input information safety | |
CN116760585A (en) | Information verification method, device, server and medium based on characteristic information | |
CN114417265A (en) | Data processing method and device for OPC authorization of mechanical equipment | |
CN117336086A (en) | Data transmission method and device of network device and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |