Thread: Product Activation

  1. #1
    Registered User
    Join Date
    Jun 2012
    Posts
    4

    Product Activation

    I am developing software for packaging machinery. Most of my contribution has been to reduce the complexity of the circuitry so all logic and control is handled by a computer, and a pci card on the computer connects to all the pieces of the machine. Before creating this pc-based version of this machine, I made a few plc based versions where the circuitry was so complicated that it was almost impossible to reproduce. The point of the computer version was to make it much easier and faster to build one of these machines so the software handles all the heaving lifting and the hardware is easy to assemble. I am close to finishing the software, but there is another problem.

    I am worried because someone else could copy the circuitry, install the pci card on a computer, copy my code, a .exe and a few text files, and they would basically have copied my whole design.

    I want to put something in the software which will prevent someone else from putting it on another computer. I will be installing all the software myself so if I could create like a master file that allows installation of the software, but once the software is on one computer it would not work on another. This is a fairly large operation, and I could set up a server for product activation if need be, but like I said I should be installing the software myself in person.

    Correct me if I am wrong, but I believe most software installation/activation works by hiding pieces of the code in hard to find places like system directories, etc. If you actually found and copied all the pieces you could replicate the code on another machine.

    This seems like a problem that someone has already come up with a much better solution than I could think of myself, so I'd like to hear what you guys have to say.

  2. #2
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Have your software obtain the computer's MAC address and/or hard drive serial number etc, and confirm that these match the values you are expecting.
    If you find out these in advance, then you can hard code these values into your program before compiling it.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    4,632
    a pci card on the computer connects to all the pieces of the machine.
    Does this pci card have a serial number that is software readable?

    Jim

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    You appear to want an absolute guarantee that nobody can recreate your circuit and software. That is impossible.

    If someone is determined enough, and has enough time, money, and equipment they can replicate your implementation and design completely. Even without documentation or other design information. If you include license agreements that forbid reverse engineering then someone can - if they are determined enough and willing to accept the risk of being legally prosecuted - still replicate your design.

    The only way you can prevent that is to lock your software and circuit in a vault, and not distribute it - which usually defeats the purpose of developing it. And, even then, you need to pray that someone is not determined enough to break into the vault.

    What you can do is increase the difficulty of reverse-engineering your product. Checking things like hardware serial numbers, MAC numbers, etc do increase the difficulty. Even if you use a set of those, you will not have an absolute guarantees. It is possible to intercept such checks in software, spoof MAC numbers, and things like that.

    Bear in mind that, as you make a system more difficult to reverse engineer, you also make it more difficult to maintain. If, for example, your software checks MAC number, then upgrading a network controller will cause your software to fail. That will be inconvenient both for you (having to rebuild and reinstall the software to work with a new NIC) and, probably more importantly, inconvenient to your end-users -- who, if you make things too difficult for them or too costly to maintain, will seek a solution other than yours. Bear in mind that computer systems are routinely updated, due to obsolescence.

    So it comes down to a balance of the various risks.

    Various companies have got this wrong, and gone under as a result. There is no point in preventing someone from inappropriately using or reverse-engineering your product, if end-users resent the constraints on them or if the cost of managing your activation scheme exceeds the profits you make.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  5. #5
    Registered User
    Join Date
    Jun 2012
    Posts
    4
    Grumpy,

    I have been thinking quite a bit about what you said, and I know that whatever I add will make the code more difficult to maintain. Hard coding the serial numbers into the code would require recompilation for each system it is added to. It would also make supplying updates almost impossible which I was planning to do via email. I was thinking about doing something like the following. I would hard-code a cipher into both the software and a special activation software. The activation software would read the serial number, encrypt it with the cipher and add it to the end of the text file. Then I would delete the activation software off the computer so only the main software remains. The main software would decrypt the serial number with the cipher and compare it to the measured serial number. This way I would only have to compile the software once and could still provide updates. Of course like you said if anyone ever needs to change that computer then the activation would fail, and if I sent them the activation software to fix the problem it would ruin the whole point in the first place.

    But I digress, maybe I should explain a little more why I think it is so necessary that this software be protected. The machines I am working on, put labels onto plastic bottles. The label needs to come out at a certain time and move at certain speeds to match the profile of the bottle. Many other machines are out that which try to solve this problem by moving the label and a constant speed and correcting for the inaccuracy with complex systems of brushes to smooth out the label. Most of my work has been to retrofit old broken systems with this new set of logic. All of these machines have the same basic setup, a conveyor with a motor and drive, two labellers with motors and drives, two heads which wind up the paper the label came on and 7 detectors. I have gotten the circuitry down to 12 logical wires, everything else is either power or the connection between a drive and motor. So the only difference between what I have and what is already out there is the computer, pci card, software, and the 12 wires. What I am worried about is that almost anyone I sell this to, either themselves or someone they know has a machine this could be attached to. If they realize that doing this is easy, then they have no reason to buy anything from me. I can't protect the circuitry, or stop someone from buying a computer or the pci card. The software is really the only line of defence and putting some form of protection on it is vital for me to remain competitive.

    I know I am asking a lot. I want an easy solution to a complex problem, but don't we all. The protection doesn't have to be foolproof, it just needs to be able to frustrate someone trying to copy it. If it takes me an hour longer to set up each system because I have to navigate through my own mine field that's better to me than risking losing customers because they like the software, but realize they can have it for free. But of course asking customers to navigate through the mine field is an easy way to lose them too.

  6. #6
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    O_o

    If this is something that important to protect, it is important enough to protect properly.

    Buy a license to a facility that already does these things and does them well.

    Soma

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    So wait - you are saying that retrofitting these machines is a simple task, and you are going to pack it up, sell it as a product for a premium price all the while using "draconian" schemes to stop the companies from understanding how easy it is to do?
    That just seems wrong to me. It just seems as if you are trying to trick them to think they must use your solution, while they could easily for just a little money do it themselves.
    Correct me if I'm wrong, but that's what I gather so far.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Registered User
    Join Date
    Jun 2012
    Posts
    4
    Quote Originally Posted by Elysia View Post
    So wait - you are saying that retrofitting these machines is a simple task, and you are going to pack it up, sell it as a product for a premium price all the while using "draconian" schemes to stop the companies from understanding how easy it is to do?
    That just seems wrong to me. It just seems as if you are trying to trick them to think they must use your solution, while they could easily for just a little money do it themselves.
    Correct me if I'm wrong, but that's what I gather so far.
    I don't really know how to respond to this since in the past I have thought similarly to what you say. I know a few people who have bought software legitimately, but when the authentication didn't work, they used a cracked version instead because it was easier to use.

    My solution is not the only one out there, there are many machines which use hardware to accomplish what I am going to do with software. Retrofitting will be an easy task but only with the right tools, and I'm the one creating the tools. I created a couple of these machines using plcs, but each one takes a few weeks to put together.

    I know there's no point in protecting the plc software. No one would want to copy it for the same reason I don't want to keep building them, and if they could actually figure out how to copy it they probably wouldn't need me in the first place, but it is commonplace to put a password on plcs so that only the person who knows the password can copy the software. The software I am working on is a tool so that I can build the machines much faster, not to mention it should be a little bit more accurate than the plc version. I've already spent more than twice the time on this software that it took for me to create the plc version, and it's still missing quite a few functions and only has a command line interface. I could of course give away the software and the machine design for free, but then I would have to find another job to support myself and would probably never finish this project in the first place. Since all this work has been to reduce the cost of production I'll also be able to sell the machines for cheaper, and is it really such a bad thing if I get paid for that?

    When you buy a machine, its a package deal. You can't just buy the software for a printer for instance. You buy a printer and it comes with whatever it needs to make it work. If I leave the software unprotected then someone else could create the same machine for the same amount of work I would have to do each time to set it up, but they wouldn't have gone through all work to create and test the software and to reduce the number of pieces and the associated cost. All I am looking for is to make it a little bit more difficult for someone else to use my tools than it is for me to use them.

    phantomotap,

    It sounds like you have a specific service in mind, would you care to enlighten me?


    edit: a few grammatical errors
    Last edited by Tonezone; 06-30-2012 at 02:21 PM.

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Tonezone, I know how it is to want to protect your creations, and by all means, you should have the right to. I'm not questioning that.
    But what you are doing sounds to me like the following scenario:

    You have a PC. You have a printer.
    To interface the printer with the PC, you need a cable.
    As such, you design a cable, protect it with some draconian DRM and sell it.
    The printer can, of course, be connected to the PC with a simple USB cable. But your cable is better and you don't want anyone to know it can be connected to the PC via a USB cable because you'd lose sales, so you use DRM to protect your cable.

    OK, so this is a simple example because obviously you've made a product that you think it better in some way and you want to make money from your product. But it illustrates my concerns over what you are trying to do.
    I could be wrong, and I sincerely hope I am. But perhaps you could alleviate my fears?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Registered User
    Join Date
    Jun 2012
    Posts
    4
    Quote Originally Posted by Elysia View Post
    Tonezone, I know how it is to want to protect your creations, and by all means, you should have the right to. I'm not questioning that.
    But what you are doing sounds to me like the following scenario:

    You have a PC. You have a printer.
    To interface the printer with the PC, you need a cable.
    As such, you design a cable, protect it with some draconian DRM and sell it.
    The printer can, of course, be connected to the PC with a simple USB cable. But your cable is better and you don't want anyone to know it can be connected to the PC via a USB cable because you'd lose sales, so you use DRM to protect your cable.

    OK, so this is a simple example because obviously you've made a product that you think it better in some way and you want to make money from your product. But it illustrates my concerns over what you are trying to do.
    I could be wrong, and I sincerely hope I am. But perhaps you could alleviate my fears?
    I guess what I am doing is a little similar to what you are saying, but to complete the analogy there are a few key differences. The usb cable would not be transferring a printing file for the printer to process, the cable would be used to take direct control of the printers motors, inkjets, etc. So all the logic circuitry would be stripped from the printer and the computer would control everything directly over the usb interface, i. e. no processor of any kind would remain in the printer itself. The software would then need to handle everything the printer did before, convert the printing file into a raster scan, move motors to move the paper through the machine and apply charge to for ink to stick, and whatever else a printer does. I guess you could say the cable is part of what I am selling, but not the whole thing. The cable is simply a means to give the software full control of the machine. In this case I guess the cable would consist of the 12 logic wires I mentioned, the pci card and the computer itself. It's not the cable that I am trying to protect its the software itself. Anyone else could make and sell the same cable, I just want make sure they would have to make their own software.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. XP Activation problems.....
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 01-27-2005, 05:43 PM
  2. activation
    By Fruity in forum C++ Programming
    Replies: 4
    Last Post: 12-17-2002, 04:57 PM