Generating and validating license keys is a common requirement for commercial desktop applications. This article shows a state of the art implementation in 2021. It is simple and cryptographically secure.
Unfortunately, I haven't received any official replies from Save Wizard yet. I called PayPal to see if I could reverse the dispute in hopes that doing so might 'revalidate' my license key from SW but I hesitate to this as PayPal says 'By marking this problem as resolved, you agree that no further problems can be raised for this transaction.' ♦Disclaimer♦Message To Sony, Activision, Treyarch, Infinity Ward, Rockstar Games and other 3rd Party Companies, The Following Applies to You'Copyright Discla.
Scope
When you browse StackOverflow for licensing implementations, you frequently read the following warning:
No license scheme is 100% secure.
It is true. So, given that our task is ultimately impossible, we don't want to think about it for too long. At the same time, we want something that is reasonably safe.
This article is about registration codes that work offline. No phoning home to a license server. Even if you use a server, you likely don't want your app to stop working just because your user doesn't have internet for a brief while. To achieve this, you will need an offline way of validating licenses.
Cracks vs. keygens
There are several ways in which people can work around the copy protection in your software. The most common are cracks. These usually patch your application's executable, to trick it into believing that there is a valid license. Every desktop application can be fooled in this way. Fortunately, cracks usually only work for specific versions of an app (eg. 5.1.2 but not 5.1.3).
The worst case for software vendors are key generators. They can be used to create arbitrarily many valid serial numbers. If a keygen exists for your app, then your licensing algorithm is compromised beyond repair.
Partial key verification
To prevent keygens from working for all versions of your software, a commonly used technique is partial key verification. Under this scheme, you only use some bits to check the validity of a license key. For example, the first version of your app might only check the first character in each group of a product key:
If someone publishes a keygen for your app, then you can release a new version that checks the second character (say) for a different requirement:
This limits the potential damage of a single key generator. But it doesn't prevent other keygens from appearing for your new app version.
Key length
Historically, license keys had to be entered manually. For instance, when you bought Windows XP, you received a CD-ROM and a printed product key that you had to type in upon installation:
To make this workable, license keys had to be short and consist of simple characters such as A - Z and 0 - 9.
Nowadays, hardly anyone types in license keys by hand. When a user purchases your software, you send them an email. They either download the license key, or copy/paste it into your application. Because of this, the length of license keys has little practical relevance today.
Older articles about license verification spend a lot of brainpower on 1) encoding information in the limited-length license key, such as a maximum app version, and 2) on partial key verification. If we drop the requirement that license keys be easy to type, we can get a simpler and more secure solution.
A modern approach
At the end of the day, a license check boils down to code like the following:
Note that this even applies to more exotic solutions. For example, say your app's binary is encrypted and only valid license keys can 'decrypt' it somehow. Then license_key_is_valid()
amounts to asking 'can this key be used to decrypt the binary?'.
We thus need to choose an implementation for license_key_is_valid()
. Fortunately, modern cryptography gives us just the right tool for this: We can use RSA signature verification to sign the licensing data with a private key, then verify the signature with an associated public key.
Below is an example in Python that uses the rsa library. Because RSA is so ubiquitous, you should be able to easily port this to another language if required.
Save Wizard Max License Key Buy
First, create an RSA key pair on your development machine. We use 512 bits here because it leads to shorter signatures. In practice, you probably want 2048 bits or more.
When a user purchases, generate a license key:
This prints the following:
Send this to your user. Then, in your application, check the validity of the license key as follows:
Once execution reaches the last line, you can trust that data
was not tampered with. This lets you include information relevant to licensing in the data, such as a maximum app version to which your user is entitled.
The above code works as-is when you type it into one interactive Python interpreter session. In practice, you will have to ship the public key with your app and decide where the user will put the license key. These are just details however. The important parts of the implementation are all here.
Caveats & Summary
Assuming you use a large enough bit size, the above implementation should be safe from key generators. It is not immune to cracking however – as mentioned above, no desktop app is. If you want to make your app even more secure, you could look at obfuscation. This makes reverse-engineering and thus circumventing your copy protection more difficult.
Michael is the creator of fman, a cross-platform file manager. Frustrated with how difficult it was to create this desktop application, Michael open sourced fman's build system (fbs). It saves you months when creating desktop apps with Python and Qt. A few days of these months come from using fbs's well-integrated licensing implementation.
Real case from the forum: 'How to activate Windows 10? I installed a free version of Windows 10 pro from a tutorial I found on YouTube. Everything worked and I now want to activate windows seeing all of the benefits...'
Sick of the watermark sticking on the bottom right corner of the screen? If you want to activate Windows 10 as in the previous example, we will show you how to activate Windows 10 in 2021 with product key/digital license/CMD.
Save Wizard
1 - How to Activate Windows 10/11 with Product Key
2 - How to Activate Windows 10/11 with a Digital license
3 - How to Activate Windows 10 Pro for Free using CMD
Is Necessary to Activate Windows 10/11
How to Find Your Product Key
1 - How to Activate Windows 10/11 with Product Key
Step 1. Find Product Key when you are installing Windows 10. (If you have not found your product key, you can go to the fifth part of this page. Start installation first and then locate your key.)
If you can find your 25-character product key, you can activate Windows 10 right now.
Step 2. Press Windows icon on the keyboard > Settings >Update & Security >Activation (or you can input Activation on the search box after setting page pop up.)
Step 3. Click the Change product key.
Step 4. Enter your product key > Click Next > Select Activate
2 - How to Activate Windows 10/11 with a Digital License
The digital license is linked to your Microsoft account.
Note: You will first need to check if your Windows 10 is linked to your Microsoft account. Steps: Click Windows icon > Choose Settings > Select Update & Security > Select Activation > Check activation status
Check two common situations you may encounter:
Activate Windows 10 on a new PC
Reactivate Windows 10 after changing hardware
Activate Windows 10 on a new PC - 2 Steps
Step 1. During Windows 10 installation, choose I don't have a product key when a move to activate.
Step 2. Sign in with your Microsoft account and connect to the Internet. Your Windows 10 will be activated.
Reactivate Windows 10 after changing hardware
When it comes to change your hardware, such as the mainboard, the activation process shows a bit of difference. Check the steps below to complete re-activation.
Step 1. Prepare before activation.
Make sure the digital license is linked to Microsoft Account. If the Activation displays as Windows is activated with a digital license, you can apply the below steps to link your account:
Click Settings >Update & Security >Activation > Click Add an account under Add a Microsoft account > Sign in to your Microsoft account
Step 2. Apply Troubleshoot
- Settings > Update & Security > Activation
- Choose Troubleshoot under the Windows part.
- Click I changed hardware on this device recently.
- Select device to activate > Check This is the device I'm using right now > Click Activate button.
3 - How to Activate Windows 10 Pro for Free using CMD
If the above methods are not your first option, you can apply a freeway - activate Windows 10 with CMD.
Step 1. Type CMD in the search box, right-click it, and choose Run as administrator.
Step 2. Enter command line and press Enter. Find your product key.
- slmgr /ipk
- slmgr / skms kms.xspace.in
- Slmgr / ato
Is Necessary to Activate Windows 10/11
What if I don't activate Windows 10? Does any bad thing happen? To be honest, nothing annoying thing happens. But Microsoft has put restriction on two parts:
- Personalization settings (disabled): desktop background, windows colors, lock screen background, and themes.
- Updates (disabled): Install updates recommended by Microsoft and more.
How to Find Your Product Key
Find product key by EaseUS Todo PCTrans (fastest): Gta 5 na mac os.
Step 1. Open the software and choose the 'Product key' option.
Step 2. Click 'Scan' and you can check the product key. Click 'copy' for direct use.
Check more options for free:
Here we provide you with five methods to find Windows 10 product key. Follow the methods if you want to get your Windows product key or license.
FAQ About Windows 10/11 Activation
1. What are the differences between using activated and inactivated Windows 10?
Compared with the activated Windows 10, your monitor will get a watermark in the bottom right corner of the screen. And the personalization settings, critical updates, optional updates, and optional software - include Microsoft apps, downloads, services - will be disabled.
2. Can't activate Windows 10 after hardware change?
If you've changed your hardware (mainboard..), your Windows 10 can not be activated. Fortunately, Microsoft has told us what to do next. Follow the steps below:
Save Wizard License Key Buy Cheap
Digital license:
Step 1. On your PC, log in as administrator.
See Full List On Serials.ws
Step 2. Press Windows icon > choose Settings >Update & Security >Activation >Troubleshoot
Check more details in the article or read the Microsoft guide.
3. How to activate Windows 10 Enterprise for free using Command Prompt?
Step 1. Run command prompt as administrator.
Step 2. Find your Windows Enterprise product key and press Enter.
- Input command line slmgr.vbs / upk and press Enter.
- Find your Windows Enterprise product key and input slmgr / ipk
- slmgr / skms zh.us.to
- slmgr / ato
SAVE WIZARD FOR PS4
4. Is it safe to activate Windows 10 using CMD?
Save Wizard License Key 2020
YES. It is safe to use.
Save Wizard License Key Bypass
The command line calls the built-in Windows 10 component which manages system license.