license key validation - encryption/decryption

Scott Yang syang at xplantechnology.com
Wed Dec 5 01:24:52 EST 2001


Rock VZ <rockvz at yahoo.com> wrote in message news:<mailman.1007443566.2648.python-list at python.org>...
> Hi,
> 
> I have a requirement to write a license file in XML.
> The xml file will typically consist of a feature name
> a "license key" to enable/disable the feature.
> 
> How do i generate this "encrypted license key" for
> different features for different customers?
> 
> How do i validate it at the customer site that the
> "key" installed is valid?
> 
> For example:
> i can have 10 features for the product and each
> feature has a encrypted key to enable the feature.
> 
> (I would be using python for coding the above.)
> 
> thanks
> Rock

Hi.

My situation is very similar to yours. The product that my company is
developing also uses an XML based license file with the number of
licenses, available packages and expiry date encoded in. I've been
investigating ways to do public key cryptography in Python for a
while, but with little success. I know there are modules that
integrate with OpenSSL, but that's still difficult to do on Windows,
which is our primary platform.

In the end, we just sign the licenses using GnuPG. At the client side,
the application also invokes GnuPG using pipes with status going to
the standard error. It then verifies whether the signature has the
right finger print before it parses the XML data...

Cheers,

--
Scott Yang <syang at xplantechnology.com> PGP: 0xF9DCFA8C
  Xplan Technology Pty Ltd. <http://www.xplantechnology.com>
  Software Architect.



More information about the Python-list mailing list