How To Create A Serial Key

  • Excel - Create serial numbers Ask a question Microsoft's office software Excel is a powerful tool to perform day-to-day activities with, like simple arithmetic, sorting, filtering, arranging and summarising data in various formats.
  • How to Create Bank Key in SAP - You can define bank key in SAP using transaction code FI01. Bank key number is optional for country India and mandatory for US. In SAP, bank key consists detailed address information of bank account with account number.
  • Serial Key Generator is application created for software developers who want to protect their applications by serial key registration. Just in a few clicks you are able to generate serial keys for your C#.NET, Visual Basic.NET, Delphi, C++ Builder and Java applications.

As indicated in the official documentation, SERIAL is not a true data type, but is simply shorthand notation that tells Postgres to create a auto incremented, unique identifier for the specified column. Below we’ll create our simple books table with an appropriate SERIAL data type for the primary key.

-->

To sign an assembly with a strong name, you must have a public/private key pair. This public and private cryptographic key pair is used during compilation to create a strong-named assembly. You can create a key pair using the Strong Name tool (Sn.exe). Key pair files usually have an .snk extension.

Movavi screen capture serial key. Note

In Visual Studio, the C# and Visual Basic project property pages include a Signing tab that enables you to select existing key files or to generate new key files without using Sn.exe. In Visual C++, you can specify the location of an existing key file in the Advanced property page in the Linker section of the Configuration Properties section of the Property Pages window. The use of the AssemblyKeyFileAttribute attribute to identify key file pairs has been made obsolete beginning with Visual Studio 2005.

To create a key pair

  1. At the command prompt, type the following command:

    sn –k <file name>

    In this command, file name is the name of the output file containing the key pair.

The following example creates a key pair called sgKey.snk.

If you intend to delay sign an assembly and you control the whole key pair (which is unlikely outside test scenarios), you can use the following commands to generate a key pair and then extract the public key from it into a separate file. First, create the key pair:

Next, extract the public key from the key pair and copy it to a separate file:

Once you create the key pair, you must put the file where the strong name signing tools can find it.

When signing an assembly with a strong name, the Assembly Linker (Al.exe) looks for the key file relative to the current directory and to the output directory. When using command-line compilers, you can simply copy the key to the current directory containing your code modules.

If you are using an earlier version of Visual Studio that does not have a Signing tab in the project properties, the recommended key file location is the project directory with the file attribute specified as follows:

See also

Active7 years, 2 months ago
$begingroup$

We're designing a PIC based system. We would like that users enter a serial key (registration key) like the one commonly found in desktop software. For our system, we will have the user's email address and/or his cellphone number. The system is a standalone device with a keyboard and display. The system will allow the user to pay by punching in a specific registration code that he purchased via SMS. The user will send a SMS to a server. The server would use the provided user's email or/and phone number and generate a unique registration key.Does anyone has clues on how to get started?

Dillion Ecmark
Dillion EcmarkDillion Ecmark
$endgroup$

5 Answers

$begingroup$

I am targeting this answer at what can realistically be achieved on a PIC microprocessor.

I would generate a random number on the PIC, the common way to do this is to use the A2D as a noise generator and repeatedly sample the LSB. Once you have this, append a check digit or two and display it to the user. The check digits will allow you (on the server that receives the text) to guard against billing the user for a miss-typed code.

On the server, take the users code, strip the check digits, run it through a Linear Feedback Shift Register that is pre-loaded with a secret value. Charge the user, if the payment clears, text back the output code.

Your PIC chip needs to know the secret too, and repeats the calculation. You might want to try Microchips CRC Generator hardware eg. AN1148 shows how to use the hardware LSFR. Load in the secret, then clock in the random challenge. Compare this to what the user keys in - a result that matches most likely means a purchase.

I'd have a supervisor mode if this is a kiosk, rather than single device, to allow the re-loading of another secret code, or pattern of LFSR taps, secured by physical access and store this in the NVRAM. This way you can at least change the encoding over time, or in response to a break. Add NVRAM counters to compare local purchases against server approvals to monitor slippage. Watch your wear-levelling though!

This is only as 'secure' as your secret and technique staying private. It would be relatively trivial for anyone who can dump a hex image from your machine to reverse the algorithm from the assembler, although presumably anyone with physical access has simpler techniques to get the product without paying. Similarly anyone willing to guess the technique, buy a code and another for validation could guess the technique and do a brute force search for the secret.

I don't think full public key cryptography is viable on these machines, so this is a compromise. Porting OpenSSL is going to be non trivial and use up a significant portion of your developer time and code space. If it's not a missile launch code, or you need to protect users details, or guarantee votes in an election, public key cryptography is probably more than required for your revenue protection case. Caveat emptor.

shuckcshuckc
$endgroup$$begingroup$

Use an MD5 hash. This will create a 128-bit key, so you can represent that as 32 hex characters. A hash never can guarantee uniqueness, but the length will decrease the chances of coinciding hashes. If 32 hex characters is too long you can truncate it to the desired length.

If you need a unique serial key you have to append a unique number, like customer number, to the hashed user data, so that it's not included in the hash calculation.

stevenvhstevenvh
134k16 gold badges426 silver badges637 bronze badges
$endgroup$$begingroup$

If a registration code must work on one and only one device and no other devices, then this could be a good use for public/private key architecture.

It works like this: Your server will have a public key and a private key. The private key is always kept secret. The public key is viewable to anyone who wants to see it (although we won't be needing to do that in this case). If the server encrypts something with its private key, then only its public key can decrypt it. If somebody else encrypts something with its public key, then only the server can decrypt it with its private key.

This accomplishes two things

  1. By having the server encrypt ('sign') something with its privatekey, we can verify that it's really coming from the server bydecrypting it with its public key. We can authenticate the sourceof the message.

  2. If we encrypt something with its public key, then only the servercan ever decrypt it, thus we can send it messages that no one elsebut the server can read.

If we have the device have its own set of public and private keys, and a copy of the server's public key, then we can establish messages between the two that no-one else can read.

How To Create A Serial Keys

So you could have a system that work like this:

Server side, a database schema that maps device serial numbers to their public keys. When someone makes a purchase, they must provide this serial number. When a purchase request comes in via SMS, the server stores the phone number and looks up the device's public key from the provided serial number. When it is found, it will hash, then encrypt the SMS phone number using the device's public key, then that entire cipher would then be encrypted again using the server's private key. It sends this back to the user via SMS.

When the user punches in this hex string, the device will first decrypt using the server's public key - this is to ensure that it actually came from the server. That removes the first layer. Then it decrypts using its own secret private key, this should give you the hashed SMS number. Get the user to enter in their phone number and hash it. If the hashes match, then procede.

If you need to have sessions that expire, include a time stamp along with phone number hash before the encryption on the server side and have the device make the decision of whether or not that key is still fresh.

Here is a primer on public/private key architecture: https://en.wikipedia.org/wiki/Public-key_cryptography Adobe cs6 serial key.

What you would be interested in is:

  1. Choosing a method to generate public/private key pairs
  2. Choosing an encryption method to encrypt data using this keys.
Jon LJon L
3,9281 gold badge18 silver badges33 bronze badges
$endgroup$$begingroup$

If the system will have a serial number that you generate burned into a protected area of the code space, you could simply program each unit with an activation key along with the serial number. This would require you to ensure that you keep track of the issued serial numbers and associated activation codes, but if the codes are generated randomly, you could avoid the risk of someone discovering the algorithm used to generate the keys. If you don't want to worry about keeping track of all the issued keys, you could use an algorithm to generate them, and have some attribute of the algorithm set differently for each batch of devices (you could, for example, encrypt the keys for each batch with a hash of the lottery numbers drawn for the New York State Lotto the Friday before the batch was produced. Even if your own records were destroyed, you would be able to go back and find out what the numbers were, but it's unlikely someone would be able to reverse-engineer the fact that the lottery numbers were the source data for the hash, especially since the number of discrete batches would be small compared to the number of units.

If you will be using a serial number which you are not supplying (e.g. a device serial number burned into a flash chip) then you have two main choices: have the device use the serial number to compute what the key should be, or have software in the factory (outside the device) munge the serial number in a confidential way to yield a key which, when munged a certain way by the device, will yield the serial number. The latter approach has the advantage that even if someone were to reverse-engineer the key-validation code in the device, they would be unable to generate keys that would work for arbitrary serial numbers. It would, however, have the disadvantage that keys would probably have to be a minimum of 128 bytes to have anything resembling security (given today's advances in CPU technology, 256 bytes would be better). Not a problem if your device would be connected to a PC or portable memory device for purposes of activation, but not so great if people are entering a code via thumbwheel.

supercatsupercat
39.1k1 gold badge65 silver badges115 bronze badges
$endgroup$$begingroup$

You could generate a digital signature from the users user's email or/and phone number using the OpenSSL libary that has public key cryptography functions that would be suitable.It might be hard to find space for code for verification in a PIC chip in which casea simpler and much less secure system based on a checksum/hash on the email/phone number may have to suffice- in that case be sure to salt the email/phone number to prevent users from discovering the checksum algorithm by trial and error.

paultpault
$endgroup$

How To Create A Serial Port In Windows 10

Not the answer you're looking for? Browse other questions tagged pic or ask your own question.