Serial Number Generate

Can you tell us more? Is there any special format to the serial numbers you want? Are they digits or a letters or a combination of both?
The random number generator (the RAND() or RANDBETWEEN() function) will generate a random number but the number will change every time you make a change to a cell or open your file.
You can have a cell that generates a random number using the RAND() function as part of the formula. You can copy and 'paste values' that random number to another cell to 'lock in' that number.
You can create a column of cells that generate random numbers. You can copy one of them and 'paste values' back into the cell to lock that particular one in.
You can format these cells so all digits (including any leading zeros) are displayed and so that there are dashes or other punctuation between every so many digits, etc.

Mar 16, 2010 6:06 PM

Jun 24, 2015 - generate serial number library. Npm i generate-serial-number. Weekly downloads. How to Auto generate Serial numbers on a Production order for a serial tracked item. This article describes the setup that is needed to get serial numbers auto generated prior to the report as finished on a production order. There are three setup options on the serial number group that allow this to happen. And would have a. Because with a serial number you can have a unique identity to each entry of your data. But the sad news is, adding them manually is a pain. It’s really hard to add a number in every row one after another. The good news is, there are some ways which we can use to automatically add serial numbers in a column.

First and foremost, this is not a question about generating a serial number for other products. I am not looking to 'hack' other products.

Here are my requirements:

  • I would like to generate a standard looking serial number: AILU7-ABCDE-54321-1234-AFCK-17UDF
  • I need some process that validates whether or not that serial number is 'valid' - This portion does not have to be extremely complex. ie, if all the numbers sum up to a value greater than X - I'd be okay with that, but if there are solutions out there that handle this complexity for me, I'd be happy to use them.
  • The process that validates the serial number can not be server side. ie, I can not make a request out to an external web server to verify that the serial number is valid.
  • I need some way to pull out metadata from the serial number. ie, after I have validated that the serial number is correct, i need to be able to read out some values from it: 'user limit', 'expiration date', etc ...
  • The verification of the serial number will be done via a ASP.NET MVC 3 application. The generation of the serial number does not have to be done that way though.

I'm not looking for a silver bullet that will accomplish all these requirements, but more or less some links to documentation or existing libraries that will help me get started. The only library that I have seen is the XHEO DeployLX library; which is just entirely too much for my needs.

Generate

Could you please provide me with any information that could point me in the right direction?

Bryan Ray
Bryan RayBryan Ray

3 Answers

Did you check out Brandon Staggs article on this very matter?

In Delphi, but theory holds whatever language.

Viktor ElofssonViktor Elofsson
8891 gold badge10 silver badges18 bronze badges

Plenty of libraries out there, one would be http://skgl.codeplex.com/ & http://softwareprotector.codeplex.com/ and comes with a nuget package as well.

Ilya KozhevnikovIlya Kozhevnikov
7,8533 gold badges30 silver badges60 bronze badges

With serial keys you need to consider a few things.

I have seen links during my hunts that point to using a simple Guid.NewGuid(); approach and then doing some transformations on the string to make a custom styled Serial key. This is easy to do, but puts the onus on you the product owner to keep track of serial keys in a database and at the end of the day there is potential for someone to randomly find serials that work via using Guid.NewGuid(); themselves. If everyone on the planet started generating Guids at the same time, collision chances become very likely.

There is a sort of solution that makes collision events less likely by using a more complex algorithm on top of Guid.NewGuid();

Number

For this, I tend to use:

  1. Guid.NewGuid(); (First 16 characters only, minus the - (hyphen)
  2. An ever incrementing or changing value. (Nonce) (an int will work : i++ etc)
  3. A secret salt that you will keep private and secure in your network.
  4. A difficulty factor : borrowing this principle from bitcoin.

Ok, lets imagine I am taking the first 16 digits from a guid.I then combine that with the Nonce and the secret salt,then use SHA256 to derive a hash from the values.I can then use the Difficulty factor to determine if the hash begins with the amount of 0's or other character that I desire.

Eg: If the hash has six 0's prefixing it, then I save all of the data off, as I have just found a reasonably secure Serial key.

When I mean secure, I mean I have found a Serial, that when combined with a Product Key (the Nonce) and then used with the secret Salt, it results in a Hash that meets my production criteria.

Some example code is below - done very rough, because I was bored.

The idea would be that your application could send the product key and serial to an activation server. The server knows the secret salt. It then returns true or false to determine if the hash generated meets the security requirement. If it does not : the Serial is not valid, or not valid for the key provided.If it does have the required 0's : its a valid serial.

GetDiff() is basically just a string : '000000';

Example output from this method looks like this:

You can increase the difficulty by adding more 0's to the prefix.It means that finding serial combinations will take longer, but also makes it more secure.

Obviously you would store these data combinations away somewhere so during activation, you can compare the Serial Code, and the Product Key (Nonce).

Serial Number Generate

In my example: I am using Serial Key (16 digits), Incrementing int, and the word Alpha for the secret salt.

Generate Serial Number In Php

This makes generating serial keys slow and cpu intensive, but makes validating them very fast.

The secret Salt could be a code phrase that maps to different products that you may be developing. This allows you to re-use product keys (Nonce) values across multiple product lines.

BaaleosBaaleos

Serial Number Generation System Software

Not the answer you're looking for? Browse other questions tagged c#asp.net-mvc-3 or ask your own question.