Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compact Framework: where's the SIP?

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri Mar 17, 2006 3:12 pm    Post subject: Compact Framework: where's the SIP? Reply with quote

Using the "demonstration" version on Compact Framework 1.0 SP3, the toolbar and SIP do not show up with the LicenseInstallForm. This makes it impossible to enter a key without either a keyboard attached to the device, or using something like Remote Desktop Display.

I'm using the example code provided (although I'm not sure if the example code is Compact Framework specific):

LicenseInstallForm licenseForm = new LicenseInstallForm() ;
license = licenseForm.ShowDialog(applicationName, LICENSE_FILE);


Adding the following line between the above two lines enables the SIP to be displayed:
licenseForm.Menu = new System.Windows.Forms.MainMenu() ;
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Mar 19, 2006 6:39 am    Post subject: Reply with quote

Thanks - we'll look at modifying the sample code.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Mon Mar 20, 2006 12:19 am    Post subject: Thanks! and First User Reactions Reply with quote

I appreciate it! I'm getting my first comments on the licensing system as I've implemented it. My Product Info contains 10 characters plus the Licensee name (often 10-15 characters). I end up with keys around 80 hex characters long (plus hyphens).

The first reaction of one tester was "You aren't serious with that registration key, are you? No way would I want to try entering that monster... I mean, sure for testing I'll do it, but wow... 20 groups of 4???" After another tester took a screen shot, I mentioned that they might not want to show that because of the key, they "joked" that "it's okay because thats only 25 characters of the 8000 that are in the key. It won't help them much." The other handful of testers have not commented yet.

After I listed the advantages (taken liberally from your website, there are 3 user advantages--the other advantages you list are developer advantages), and the fact that they do not have to enter the key again even after a program update (due to the way I am doing the updates), I think they were more accepting. But the first reactions spoke volumes, I think.

One thing that would help is if there were a way to copy/paste into the Pocket PC text box that is used or even if you could have a "read from file" option.

Comments? Suggestions?
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Mar 20, 2006 12:29 am    Post subject: Reply with quote

If your application requires the user to enter the key manually (as opposed to copy and pasting) then license keys of 80 characters are certainly far too long. To reduce the size of the key you need to reduce the size of the product info you include in the key.

Probably the best way to do this is to allow the user to enter certain details (such as the Licensee name) as normal (clear) text and include a checksum of this data (using the EncryptedLicense.Checksum function) in the ProductInfo. When you read the license you check the Checksum of the entered data matches that in the license ProductInfo. See the Custom Licensed Application sample for an example of this approach. It is much easier for the user to enter clear text then a long encrypted key.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Mon Mar 20, 2006 1:08 am    Post subject: Reply with quote

Thanks. I'll look at that example. I had originally thought that the "checksum" implied a checksum of the Device ID/User ID. I had not thought of allowing a separate entry for the Licensee name that could be different from the User ID entered into the device. Apparently using a modified entry Form.

The separate entry for Licensee name retains the ability to hand out 1 key per organization. Thanks.

I've done some additional playing around to find the right key size, and I hadn't seen it mentioned elsewhere the exact relationship between Product Info size and Key size.

Keys are 16 bytes long (32 hex digits long) and every 8 bytes of Product Info yields 16 additional hex characters, and the first 5 Product Info codes are "free".

So if your Product Info is 0-5 characters long, your Keys are 32 hex digits = 16 bytes. Like this:

Product Info characters => Hex digits = bytes
0-5 => 32 hex digits = 16 bytes
6-13 => 48 hex digits = 24 bytes
14-21 => 64 hex digits = 32 bytes
etc...

So now I'm trying to "encode" the expire date (including "never") plus 2 characters (one for license version, one for program edition--one choice in 5) plus Licensee checksum into 5 characters, if possible! And if not, then the next step up allows 13 characters because there's no difference in key size from 6 Product Info characters to 13.
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Mar 20, 2006 1:16 am    Post subject: Reply with quote

Quote:
Keys are 16 bytes long (32 hex digits long) and every 8 bytes of Product Info yields 16 additional hex characters, and the first 5 Product Info codes are "free".

So if your Product Info is 0-5 characters long, your Keys are 32 hex digits = 16 bytes. Like this:

Product Info characters => Hex digits = bytes
0-5 => 32 hex digits = 16 bytes
6-13 => 48 hex digits = 24 bytes
14-21 => 64 hex digits = 32 bytes


This is correct. To encode one byte in hex format takes two characters. The reason for the steps is that the underlying encryption algorithms encode in blocks of 8 bytes.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Wed Mar 22, 2006 8:57 am    Post subject: Checksum; custom Key Generator and Tracker integration Reply with quote

Infralution wrote:
Probably the best way to do this is to allow the user to enter certain details (such as the Licensee name) as normal (clear) text and include a checksum of this data (using the EncryptedLicense.Checksum function) in the ProductInfo. When you read the license you check the Checksum of the entered data matches that in the license ProductInfo. See the Custom Licensed Application sample for an example of this approach. It is much easier for the user to enter clear text then a long encrypted key.

Great! Thanks. I've now reduced the size of the required key to 5 characters (instead of 20+), and still have all the information I want in it including: license version, license type, expiration date, and Licensee checksum (which I've increased from 0-999 to 0-4096) for slightly better coverage. I've created a method and program to allow me to graphically select the parameters, and it will display the 5-character code.

I've noticed that your Checksum algorithm is "% 1000" but mentions in the comments "four characters". Unless I am mistaken, "% 1000" is only three characters (0-999). Modifying this to "% 10000" will give you (up to !) 4 characters.

The next step is for me to review the Custom Licensed Application sample to see how to integrate it into the License Form.

I can use my program to generate the Product Info, then use the License Key Generator to generate a valid key. Is there a way of integrating my custom calculation into 1) the License Key Generator and 2) the License Tracker? At this point, I have only purchased the ILS license and source code, not the Tracker source code.
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Mar 22, 2006 9:47 pm    Post subject: Reply with quote

Quote:
I can use my program to generate the Product Info, then use the License Key Generator to generate a valid key. Is there a way of integrating my custom calculation into 1) the License Key Generator and 2) the License Tracker?


Yes - take a look a the sample Custom Generator project which illustrates how to build a custom Key Generator that can be called from License Tracker.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Wed Mar 29, 2006 2:32 pm    Post subject: Reply with quote

This is great! I have my custom generator now and it pre-populates the Licensee using customer name first+" "+last. Is the license tracker unicode capable? If I enter non-ASCII characters, will this propagate all the way through the Licensee checksum to the Compact Framework?

It looks like there is some opportunity to improve the License Tracker:

1) An Exception in the Custom Form causes the License Track to display a debugging error message then crash. You may want to surround the call with try/catch and display a full debugging error message without crashing.

2) There seem to be a lot of clicks necessary to enter a new license. Most licenses (I think) will be for new customers. I'll need to soon enter about 50 licenses each to a different customer. It seems to me that I'll have to enter each customer name and/or email (which is all I require), click ok, enter a new sale, click generate, then enter license details on my custom form (more clicks!).

I have expire date and program type encoded in Product Info. While I can issue a wide variety of licenses, I have 2 most common license types: "Professional" which is unlimited time, and "Evaluation" which is generally 30 days (ProductInfo carries the type as well as the date of expiration). I'm thinking I can prepopulate either situation based on the Sale "Reference" field (maybe based on the first character).

It seems like this is going to be a lot of clicks per license. Is there a more efficent way?

It seems like an option should be to add custom fields (I would need "Drop Down text selection" including arbitrary name->number mapping, and I would need a DateTime field) the tracker that would then send those fields to a custom generator using one button. Or the Tracker would call the form (just like now) for more custom actions.

Thinking about this, it is a lot of work. But it sure would make USING the License Tracker easier, I think (hope?).
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Mar 29, 2006 10:02 pm    Post subject: Reply with quote

Quote:
1) An Exception in the Custom Form causes the License Track to display a debugging error message then crash. You may want to surround the call with try/catch and display a full debugging error message without crashing

Thanks for the suggestion we will look at doing this.

Quote:
It seems like this is going to be a lot of clicks per license. Is there a more efficent way?

The OK button on this forms should be set up as the default button - which means that you can simply hit enter when done. We can also look at providing keyboard shortcuts for things like New Sale. In practice however most customers however don't use the License Tracker to enter customer and sales data. Instead they use the very flexible XML/CSV Import mechanism to import data from their distributor or website.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group