PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Owner Name Registration

I was just about to start coding my registration keys, but I'm a bit fuzzy on the details. I mean I'm OK to do the actual coding but I need to know more about the process.

Let's say I want to sell through Handango. They offer these registration models:

https://www.handango.com/RegistrationMo ... p?siteId=1

So it sounds like the "author user id required" model is the one that will send me an email with their owner name so I can send them back a registration key. However, I inquired and Pocket PC isn't supported, only Palm.

So how do you get the owner name to generate a key, using Handango?

Oddly, their "dynamic" model provides this but then you have to use their DLLs and stuff. I'm worried that a crack exists for any programs that use that system.

So how do I go about this? Please walk me through how the customer orders my game and receives the registration key, from me, keyed to their owner name.
From what I've seen, there's no generic crack for Handango's system. That's the only help I can provide though.
I was completely confused by the registration part too. In the end I developed my own reg key generation app that outputs batches (eg. of 50 keys). I am (just today actually) going to use the Pool approach to start with. So far I have put 50 keys into the pool on Handango, and have the same 50 keys loaded into my website for when payed users register for the additional features. My game still isn't active yet though, so can't give any feedback on how it's gone just yet. If that ends up being too hard to manage I might try something else. At least with this method I am in control ... I hope.
Oh ... in terms of the model where you have to send them back their reg key - I didn't want to use that because there is nothing worse than when you purchase a bit of software, but then have to wait to use it, and that model just seems a little prone to errors. I saw a post where someone had configured an auto email responder and provided a key based on the email handango sent them, but I feel much more comfortable with the Pool model where the key is provided immediately to them. I guess it's not as secure having a pool of keys compared to keys tied down to a user's device id etc though but in my case I am relying on them wanting to make use of the additional features on the website where the registration key is linked to their login. It's all theory at the moment though.
Yes, I was thinking if I went with keys tied to owner name, I' d automate my mail to send a key as soon as I get the email from Handango.

But I can only do that if they actually send me the owner name.

I'm almost thinking that the support person who replied to me is wrong, Handango must send it out. It would be so useless and stupid not to.
Yeah I remember that topic the first time around, but I'm still not clear on whether the owner name is in the purchase notification email you receive from Handango if you choose the "author ID required" registration model.
Yes the owner name is included in Handango's purchase notification for every order but some customers confuse this info w/ others like email, complete name, etc.
OK thanks everybody. I believe I've settled on a system to implement, I'll start working on the detailed design tomorrow and hopefully there won't be too many problems.
I suppose an owner name could be as few as 1 character.

What if the user hasn't entered an owner name on their device?

Is there anything on the device that could be used to generate a key, in addition to the owner name? Something guaranteed to always be there, and relatively different per device?
Don't all PPC2K2 and up devices have an ESN?
Yes. Another way to look at it is that all ARM devices with the exception of the @migo have ESN.

Dan East
Can you please point me to a good page that tells me more about what an ESN is?

Is this the "device ID" 128-bit unique identifier?

I was trying to load the device ID using code as detailed here:

http://www.pocketpcdn.com/articles/seri ... r2002.html

It seems to work but I get a device ID

28000000-14000000-0a000000-20000000

and I get this on MORE THAN ONE device. What am I doing wrong? I think I'm using the wrong offsets into the structure returned and I'll post back here in a bit.

Another thing is I've read about troubles getting this device ID on some Toshiba and Dell computers. Is this still an issue?
Yeah the offsets were off. So that's OK.

Out of curiousity though, the code in that article doesn't format the serial number in a string that matches what the control panel tells you and what is printed on the back of your Pocket PC 2002 device. Does anyone know how to format it so it is exactly the same?
This works for me:

Code:

typedef struct _DEVICE_ID {
DWORD dwSize;
DWORD dwPresetIDOffset;
DWORD dwPresetIDBytes;
DWORD dwPlatformIDOffset;
DWORD dwPlatformIDBytes;
} DEVICE_ID, *PDEVICE_ID;

#define IOCTL_HAL_GET_DEVICEID 0x1010054

PDEVICE_ID pDeviceID;
unsigned char buffer[1024];
DWORD Len;

// Indicate the size.
pDeviceID = (PDEVICE_ID)buffer;
pDeviceID->dwSize = sizeof(buffer);
Len = sizeof(buffer);

if (KernelIoControl (IOCTL_HAL_GET_DEVICEID,NULL,0,pDeviceID,Len,&Len;)) {
//we got the ESN
}
Yeah that's what I was doing, it's just that I was printing out results from 0 not 20. That's what I mean by having the offsets wrong.
For reference, these forums postings detail the problems getting the serial number from Toshiba and Dell devices.

www.pocketpcdn.com/forum/viewtopic.php?t=119
Just another update, I got an email from the Handango tech support person saying he was wrong and "author user id required" registration model does in fact send you the info in the purchase email. I'm still not clear whether it is the owner name, the ActiveSync device ID, or something else.
In theory, it's supposed to be the pocket pc owner's name. That said, to error is human and many times people put either their real name or some other bit of info in there. I use the RPN technique, which allows Handango to generate a serial numebr based off a RPN string. I still get the order email which has a csv record at the bottom that includes their "owner name". I do get several support emails claiming that the serial numebr provided by Handango doesn't work and everytime it's becuase they either used the wrong name or misspelled the name. There is no perfect way, but I honestly prefer the RPN method and then I only handle the problematic ones.
what kind of algorithm should be used to generate / check serial numbers ? Since this is the first time I will be generating / checking serials in any program I write, I have no clue where to begin :? I've tried googling but its not much help when I don't know what to search for :(

anyone have any basic tips or a place to start reading up on what the process involves ?
Assuming you want the kind of serial numbers where the installation has some sort of ID unique to the installation which is only unlocked by a single specific key, you're basically talking about a hash function. The key is the hash for the ID.
ah, ok. that makes sense.

so you would have a hash generator on you pc that generates keys based on owner names and the program would validate those when entered.

well, there might be a problem since the program would have to calculate the valid key to check against the entered key, and I would assume that this memory could be read, and the valid key determined, but I suppose there really isn't a way around this...
Um, yeah.

If you want someone to pick up your friend at the airport, you have to describe your friend. So yeah now that other person knows what your friend looks like. Enemies can capture your friend by either capturing you or that other person.
ok,

I've been doing some more research into this, and the best way to generate/verify serials seems to be to use a public / private crypto system. In symmetric systems, both the sender and receiver have the same key, and hence can both generate and verify serials. This is bad because once your binary leaves your hands you have no control over it and it cannot be trusted 100%, and having the key stored inside it is insecure.

In public/private key crypto, the binary would only have enough information to verify the entered serial, and would not be able to generate one.

I'm going to try implementing the RSA algorithim and will post my experience.
Obviously that's preferable, but crackers can still just edit your executable to bypass the key verification entirely.
yuit wrote:In symmetric systems, both the sender and receiver have the same key, and hence can both generate and verify serials. This is bad because once your binary leaves your hands you have no control over it and it cannot be trusted 100%, and having the key stored inside it is insecure.


Just because the encryption is symmetrical doesn't mean it has to have that weakness. It's only if you implement it that way. DEXplor uses symmetrical encryption, and the only crack available still requires a key gen - they could not figure out how to crack the EXE itself.

Assuming your product generates a unique Product ID per device, and the customer has to report this ID when they purchase, then simply encrypt whatever data you want to encrypt using the Product ID as the key. You can also just encrypt the Product ID using the Product ID as the key. To verify if the app should run just decrypt the key using the Product ID, and the result should match the Product ID. I have found no reports of that technique weakening the encryption algorithm.

Dan East
Dan East wrote:
Just because the encryption is symmetrical doesn't mean it has to have that weakness. It's only if you implement it that way. DEXplor uses symmetrical encryption, and the only crack available still requires a key gen - they could not figure out how to crack the EXE itself.


I don't quite understand... Wouldn't the point of using an asymmetrical encription mean that they *couldn't* come up with a key gen (without knowing your private key), and the only resort would be to patch the exe.

I'm assuming that they came up with the key gen by studying the code the app itself uses when verifying the key, which is the weakness in symmetrical systems ?
How is a keygen better than an EXE crack? Keygens are usually much more "respected" when released, and work through upgrades (of course unless the reg scheme changes)
Since DEXplor has been cracked for some time, I guess I can describe a bit more of how its protection works.

The registration key is actually a DLL encrypted with the Product ID. So the key is not just something to unlock features within the EXE, it actually contains missing components of the program required to load plugins, etc.

So it is impossible to crack DEXplor unless the cracker would code entire non-existant routines to gain the functionality found in the registered version. Unfortunately due to time constraints I could not finish the registration system to my satisfaction. As it stood, DEXplor would decrypt the registration key to a temporary file. That temporary file was the unencrypted version of the DLL, which DEXplor would then load. Someone finally (after well over a year) figured that out, and simply modified DEXplor to skip the step of trying to decrypt the DLL, and they distributed the unencrypted DLL (which they would never have had access to if my security system had been "complete") with their KeyGen.

Now if I would have had time to not have to use LoadLibrary to load the DLL and use my own routine that dealt directly with a DLL pre-loaded into memory, then I'm sure DEXplor would still not be cracked to this day.

Even with the unencrypted DLL DEXplor still has checks to make sure the Product ID within the DLL matches the device-specific Product ID. That was not cracked within the EXE, hence the need for a keygen that would place that information within the unencrypted DLL.

I'll refer you to this 3 year old post illustrating the problem I ran into that I did not have time to rectify before I released DEXplor, resulting in the weakness to DEXplor's security.

So Sponge, Registration Keys produced with that KeyGen will not work with the official version of DEXplor. So it is the worst of both worlds. Not only does it require a KeyGen, but it requires a cracked EXE too.

Dan East
Hey that's pretty cool.