Encrypted text string?

Discussion in 'AutoCAD' started by liftedaxis, Sep 12, 2004.

  1. liftedaxis

    liftedaxis Guest

    looking for a way to have an encrypted text string in a file -- the Lisp program could read it in, and then decrypt it to validate the user's installation. I suppose it could be a registry setting instead. Just some rather simple encryption, so that the user could not easily change it.
    any thoughts?

    --Jeremiah
     
    liftedaxis, Sep 12, 2004
    #1
  2. liftedaxis

    John Uhden Guest

    What I do is take things like serial numbers and program ID's and run them
    through my own mathematical MixMaster and then convert them to hexadecimal
    strings which I then provide to the client in their personal license file. The
    base program reads the file and converts the hex back to numbers to validate the
    license and determine which program IDs are licensed. It's not rocket science,
    but I'm betting that my system is confusing enough to prevent most from
    successfully unmixing.




    program could read it in, and then decrypt it to validate the user's
    installation. I suppose it could be a registry setting instead. Just some
    rather simple encryption, so that the user could not easily change it.
     
    John Uhden, Sep 12, 2004
    #2
  3. liftedaxis

    liftedaxis Guest

    yeah, that's pretty much what I'm looking for. was hoping there's either an existing code library out there, or something easy translatable.
    my dream choice, would be an AutoLISP version of the TEA encryption (http://www.simonshepherd.supanet.com/tea.htm) -- I just don't want to spend a good 20 hours on translating it myself.

    --Jeremiah
     
    liftedaxis, Sep 12, 2004
    #3
  4. liftedaxis

    John Uhden Guest

    That's the way it goes. I'm sure I spent a lot more than 20 hours developing my
    encryption system.




    existing code library out there, or something easy translatable.
    (http://www.simonshepherd.supanet.com/tea.htm) -- I just don't want to spend a
    good 20 hours on translating it myself.
     
    John Uhden, Sep 12, 2004
    #4
  5. DOSlib by Robert McNeel & Assoc. has a routine called dos_encrypt that does
    this.

    program could read it in, and then decrypt it to validate the user's
    installation. I suppose it could be a registry setting instead. Just some
    rather simple encryption, so that the user could not easily change it.
     
    Alan Henderson @ A'cad Solutions, Sep 12, 2004
    #5
  6. Hi,

    It's a fairly good idea to include the MAC address of the computer in the
    mix if you want to use it for locking the program to a computer.
    MAC addresses are unique to the network card. I hash it with a program
    number and strip out portions of the result such that the licence code
    issued to the user cannot be used to devise the algorithm. This part of the
    code only took about 20 minutes

    The system is not break proof - nothing is, but for the time investment and
    the likelihood of software attracting the attention of someone with the
    skills to break it, the result is fairly secure.

    Getting the MAC address proved to be quite difficult for and I ended up
    writing the output of the MS command "IPConfig /All" to a temporary file and
    reading the data from there. This took about 10 hours, by the time I tried
    all sorts of code and shareware DLLs, but with this idea should take about
    an hour.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au

    program could read it in, and then decrypt it to validate the user's
    installation. I suppose it could be a registry setting instead. Just some
    rather simple encryption, so that the user could not easily change it.
     
    Laurie Comerford, Sep 12, 2004
    #6
  7. liftedaxis

    liftedaxis Guest

    the MAC address is fine, but as you mention, it's incredibly difficult to get at. One would also have to be careful with users who have a laptop with a wired and wireless NIC, thus two MAC addresses.
    I'm just grabbing the computer name, I can use a vl-registry function to read in HKLM\system\currentcontrolset\control\computername\computername .
    So I've got each user's computername, now I just need a vague encryption of the software package / license count, so I can verify if that user can use that feature.
    I've gone and translated the TEA encryption into AutoLISP (attached), but that does not want to work, as AutoLISP just can't deal with the size of numbers involved. Also too much work for the helper functions to prep everything into binary data.

    How do you hash your MAC address? Something like that could be helpful. We already have a unique 12-character product install code. I would love to just find a bone simple encryption algorithm.

    Even the stuff from WWII is far more than is necessary for our uses. At this point, I'm thinking more along John's lines, I'll just make a very big number out of pi, convert to a string, mix the characters around, and have something vaguely encrypted.

    --J
     
    liftedaxis, Sep 13, 2004
    #7
  8. Hi,

    Fortunately I can't remember what I did, so I'm unlikely to reveal my
    algorithm but it is something along the lines of:

    Break the MAC address into its 8 characters

    Multiple 1st by a primary number 4 to 8 digits
    Multiple 2nd by a primary number 4 to 8 digits
    Multiple 3rd by a primary number 4 to 8 digits
    Multiple 4th by a primary number 4 to 8 digits
    Multiple 5th by a primary number 4 to 8 digits
    Multiple 6th by a primary number 4 to 8 digits
    Multiple 7th by a primary number 4 to 8 digits
    Multiple 8th by a primary number 4 to 8 digits

    Add them all up
    Strip a couple of digits of the end, multiply by the program code
    Strip a couple of digits of the start and end and append a sub string of the
    program code which helps me recognise the validity of the code for that
    program.
    All this is done in a DLL which returns a variety of strings which are then
    processed in a CASE statement to determine whether the program is fully
    licenced or partially licenced.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au

    get at. One would also have to be careful with users who have a laptop with
    a wired and wireless NIC, thus two MAC addresses.
    read in HKLM\system\currentcontrolset\control\computername\computername .
    of the software package / license count, so I can verify if that user can
    use that feature.
    that does not want to work, as AutoLISP just can't deal with the size of
    numbers involved. Also too much work for the helper functions to prep
    everything into binary data.
    We already have a unique 12-character product install code. I would love to
    just find a bone simple encryption algorithm.
    this point, I'm thinking more along John's lines, I'll just make a very big
    number out of pi, convert to a string, mix the characters around, and have
    something vaguely encrypted.
     
    Laurie Comerford, Sep 13, 2004
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.