CN117131485A - Authorization method for software service - Google Patents

Authorization method for software service Download PDF

Info

Publication number
CN117131485A
CN117131485A CN202311234764.2A CN202311234764A CN117131485A CN 117131485 A CN117131485 A CN 117131485A CN 202311234764 A CN202311234764 A CN 202311234764A CN 117131485 A CN117131485 A CN 117131485A
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.)
Granted
Application number
CN202311234764.2A
Other languages
Chinese (zh)
Other versions
CN117131485B (en
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.)
Hangzhou Rongyu Technology Co ltd
Original Assignee
Hangzhou Rongyu Technology Co ltd
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 Hangzhou Rongyu Technology Co ltd filed Critical Hangzhou Rongyu Technology Co ltd
Priority to CN202311234764.2A priority Critical patent/CN117131485B/en
Publication of CN117131485A publication Critical patent/CN117131485A/en
Application granted granted Critical
Publication of CN117131485B publication Critical patent/CN117131485B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • 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
    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

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

Authorization method for software service
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.
CN202311234764.2A 2023-09-22 2023-09-22 Authorization method for software service Active CN117131485B (en)

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 true CN117131485A (en) 2023-11-28
CN117131485B 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 (6)

* Cited by examiner, † Cited by third party
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
US20060179075A1 (en) * 2005-02-07 2006-08-10 Fay Jonathan E Method and system for obfuscating data structures by deterministic natural data substitution
GB201103172D0 (en) * 2011-02-24 2011-04-06 Bevilacqua Leal Carlos E A cryptography system
US20110167498A1 (en) * 2007-12-26 2011-07-07 Wilson Kelce S Software License Management
CN109657469A (en) * 2018-12-07 2019-04-19 腾讯科技(深圳)有限公司 A kind of script detection method and device
US20200351657A1 (en) * 2019-05-02 2020-11-05 Ares Technologies, Inc. Systems and methods for cryptographic authorization of wireless communications

Patent Citations (6)

* Cited by examiner, † Cited by third party
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
US20060179075A1 (en) * 2005-02-07 2006-08-10 Fay Jonathan E Method and system for obfuscating data structures by deterministic natural data substitution
US20110167498A1 (en) * 2007-12-26 2011-07-07 Wilson Kelce S Software License Management
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
US20200351657A1 (en) * 2019-05-02 2020-11-05 Ares Technologies, Inc. Systems and methods for cryptographic authorization of wireless communications

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
V.SWAMINATHAN;S.MITRA: "A partial encryption scheme for AVC video", 2012 IEEE INTERNATIONAL CONFERENCE ON EMERGING SIGNAL PROCESSING APPLICATIONS, 14 January 2012 (2012-01-14), pages 1 - 4, XP032116182, DOI: 10.1109/ESPA.2012.6152430 *
龙巧云: "车牌识别系统的算法研究与实现", 信息科技, no. 6, 15 June 2014 (2014-06-15), pages 30 - 50 *

Also Published As

Publication number Publication date
CN117131485B (en) 2024-02-20

Similar Documents

Publication Publication Date Title
US5454000A (en) Method and system for authenticating files
CN107423632B (en) Customizable sensitive data desensitization method and system
CN110149328B (en) Interface authentication method, device, equipment and computer readable storage medium
CN102567685B (en) Software copyright protection method based on asymmetric public key password system
CN111770057B (en) Identity verification system and identity verification method
CN101601045A (en) Secure serial number
CN112528257A (en) Security debugging method and device, electronic equipment and storage medium
CN112187702A (en) Method and device for verifying client
CN112953978B (en) Multi-signature authentication method, device, equipment and medium
CN111756750A (en) Secure access method, device, equipment and storage medium
CN115333803A (en) User password encryption processing method, device, equipment and storage medium
CN117131485B (en) Authorization method for software service
CN107133499B (en) Software copyright protection method, client, server and system
CN111917783A (en) Method, device and storage medium for verifying general message
KR20130085492A (en) Authentication system and method by use of non-fixed user id
CN111756749B (en) Secure access method, device, equipment and storage medium
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
EP3341880B1 (en) Verification with error tolerance for secure product identifiers
CN113938320B (en) Method and system for identifying trusted users based on unified gateway
CN113162764B (en) Encrypted network handshake method
CN112486500B (en) System authorization deployment method
CN117313165A (en) Method for generating software machine code
WO2010128356A2 (en) Remote user authentication and apparatus verification

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