Encrypting code with custom serial numbers?

Post here any topics that related to Enigma Protector, its functionality, your misunderstanding, offers to improvements etc etc etc
Post Reply
Rogier
Posts: 7
Joined: Tue Nov 16, 2010 1:41 pm

Encrypting code with custom serial numbers?

Post by Rogier » Tue Nov 16, 2010 2:05 pm

The reg_crypt_begin/end markers seem to be used to encrypt code that is being decrypted in registered mode. I assume the decryption key depends on the serial number, so that without a valid serial number someone can never decrypt the code.

Now, I already have my own serial number scheme, so I can't use Enigma's Registration module. However, is it still possible to encrypt parts of my code, using a custom encryption key which I specify in the Enigma(64)-project?

I can make sure that I can extract some constant key from my serial numbers. Then, if my app is registered, can I somehow pass this constant number (or its md5 hash or whatever) as a key through any of the API functions and then have my registered-only-code be decrypted with that key?

Thanks!


(edit - FYI: I am considering Enigma as an alternative to ASProtect, which does not support x64 and doesn't seem to be actively developed anymore. ASProtect did offer this feature, called 'encrypt with custom key' and within any .aspr project I could just specify some binary file with the encryption key. Then during runtime I had to call an api function with a pointer to the encryption key. If the key in memory (which was extracted from my serial number) is correct, the code is decrypted. Otherwise, I get random garbage code :))

Enigma
Site Admin
Posts: 2526
Joined: Wed Aug 20, 2008 2:24 pm

Re: Encrypting code with custom serial numbers?

Post by Enigma » Wed Nov 17, 2010 9:33 am

Rogier wrote:The reg_crypt_begin/end markers seem to be used to encrypt code that is being decrypted in registered mode. I assume the decryption key depends on the serial number, so that without a valid serial number someone can never decrypt the code.
Yes, there you are right, without valid registration key it is impossible to decrypt markers..
Rogier wrote:I can make sure that I can extract some constant key from my serial numbers. Then, if my app is registered, can I somehow pass this constant number (or its md5 hash or whatever) as a key through any of the API functions and then have my registered-only-code be decrypted with that key?
Hm, looks like this feature maybe helpful. I will think about this..

Just a solution how this can be made with the current Enigma. Imagine you will use Reg_Crypt markers inside your application, but with the own registration scheme. You can generate a registration key in Enigma with the name (for example) "dummy", that will decrypt (for example) sections #2 and #5. You embed the registration name into your application + you embed this registration key for "dummy" in your existing registration scheme.
Now see how this will work:
1. You send your registration key to customer
2. The application checks your registration key with your registration scheme
3. If registration key is valid, your application extracts registration key for Enigma license scheme from your license key
4. You call EP_RegCheckAndSave in your application with name parameter = "dummy", key = the reg key that you've extracted from your license
5. After restart reg_crypt markers will be decrypted

This way you only need to embed reg key for Enigma into your license. Does it make sense?

I already had a request to make such feature, scorillo7 welcome here, you have asked this feature also!

scorillo7
Posts: 90
Joined: Mon May 11, 2009 11:16 am

Re: Encrypting code with custom serial numbers?

Post by scorillo7 » Wed Nov 17, 2010 11:44 am

Yep , me ?, where? What? :shock: :D :? :lol:

Last night i want to answer to Rogier ,now i do...
Rogier welcome into my spooky mind.

Same here(almost) like Rogier.This can be "easely" implemented by Vladimir with a custom marker/APi which decrypt code with a custom key.
To not compicate the 16 section already existing in Enigma,can be 4 custom markers,there is a lot of posibility here for Vladimir.
In my case is not for registering but for activation online of software.
REMEMBER this is just a Enigma user's opinion and is pure unofficial
Your freedom stops where another man freedom begin.

Enigma
Site Admin
Posts: 2526
Joined: Wed Aug 20, 2008 2:24 pm

Re: Encrypting code with custom serial numbers?

Post by Enigma » Thu Nov 18, 2010 9:43 am

scorillo7 - yes, you are :)

Just you also asked me to make such feature (when you may set up custom key for decryption of reg_crypt markers), but I disagreed.

I'm worrying if we implement such feature by request of Rogier, you will be offended that we did not make this by your request... :?

Rogier
Posts: 7
Joined: Tue Nov 16, 2010 1:41 pm

Re: Encrypting code with custom serial numbers?

Post by Rogier » Thu Nov 18, 2010 11:57 am

No worries Vladimir, I'm sure scorillo7 would be happy with it :)

I understand your workaround and yes, it would work fine with me. I thought it had to use an Enigma registration dialog and everything to work with Enigma Registration, but if I can simply call EP_RegCheckAndSave with a key I create in memory (extracted from my own serial nr), requiring no user interaction, then it would work fine.

I didn't realize before that the code would not be decrypted until next time I run the app (if I understand correctly, EP_RegCheckAndSave saves the key somewhere to disk and/or registry, and the next time my app starts, it checks if the key is there and decrypts the code parts, right?). This is a bit of a disadvantage for me, currently if a user enters his serial number he can use the full functionality immediately, but I can live with that (and heck, maybe I can even work around that by putting the protected code in a separate DLL, which I reload after the user enters a serial number...?)

Anyway thanks for the help.
If you still want to consider implementing this DecryptCode( custom hash/key ) functionality, especially if it would also be possible without restarting the app, then please do! :)

scorillo7
Posts: 90
Joined: Mon May 11, 2009 11:16 am

Re: Encrypting code with custom serial numbers?

Post by scorillo7 » Thu Nov 18, 2010 3:41 pm

Enigma wrote: I'm worrying if we implement such feature by request of Rogier, you will be offended that we did not make this by your request... :?
No way Vladimir,i will be happy, man. These worry are non sense , i will be sad if you do not implement this.Just kidding.
These is the second "I told you so" after our discution with VB users.
I will drink for you ,Vladimir(even if i do not regulary do).Cheers mate.
REMEMBER this is just a Enigma user's opinion and is pure unofficial
Your freedom stops where another man freedom begin.

Enigma
Site Admin
Posts: 2526
Joined: Wed Aug 20, 2008 2:24 pm

Re: Encrypting code with custom serial numbers?

Post by Enigma » Fri Nov 19, 2010 7:51 am

Drinks are always welcome scorillo7 :)

Ok guys, I will add this feature in to do list!

Rogier
Posts: 7
Joined: Tue Nov 16, 2010 1:41 pm

Re: Encrypting code with custom serial numbers?

Post by Rogier » Fri Nov 19, 2010 7:57 am

Image

scorillo7
Posts: 90
Joined: Mon May 11, 2009 11:16 am

Re: Encrypting code with custom serial numbers?

Post by scorillo7 » Fri Nov 19, 2010 8:20 am

Image
REMEMBER this is just a Enigma user's opinion and is pure unofficial
Your freedom stops where another man freedom begin.

Post Reply