Re: encrypt a string
From: Jagadeesh VN (jagadeeshvn_at_hotmail.com)
Date: 02/18/04
- Next message: Susanne: "Re: Access from a worker thread to a CWnd"
- Previous message: Balboos: "Re: encrypt a string"
- In reply to: Balboos: "Re: encrypt a string"
- Next in thread: Tim: "Re: encrypt a string"
- Reply: Tim: "Re: encrypt a string"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 18 Feb 2004 18:11:40 +0530
You can also generate a CRC for your executable and append it to your
application by using some "Resouce Hacker" tools, and then calculate the CRC
of your application at startup, and then compare this value with what is
stored in your recource. This helps you to perform a self - integrity check.
Cheers
Jagadeesh
"Balboos" <balboos@masonicbrother.com.No.Spam> wrote in message
news:OUIYb.3285$kj.2318411@news4.srv.hcvlny.cv.net...
> Tons of 'good enough' methods to keep nearly any normal user from using
> an unauthorized copy of your software!
>
> You can stamp the registry (in some obscure place) with a key/string
> pair that you enable.
>
> My preferred way is a few steps, but pretty easy.
>
> Get the current data-time from the system, and represent it as a string
> of hex digits - this is your registry key. Unique every time used.
>
> XOR the actual value of your date-time, cast as an unsigned type, with a
> unique string of chars of matching length.
>
> Store the result as the value of the registry key.
>
> Now, using bool operations, you can compare the key to the value, with
> your string at runtime: no key/value or failed 'decrypt' and you don't
> let it run.
>
> To simplify implementation, you should create a union of the types so
> that the operations you choose are done easily.
>
> typedef union {
> COleDateTime tm; // length of a double
> long lval[2]; // Boolean operation target
> unsigned char cval[8]; // etc., types for your personal touch
> } REG_CRYPT_KEY;
>
> This is not a super secure method - but more than adequate. Also, it
> allows you to create a remote enable method. User runs the enable
> utility you create, tells you the text string on the phone (for
> example), and you tell them a key string you generate. The key value is
> only good for that particular execution. No worries about them sharing
it.
>
> Balboos
>
>
> Holger Kreißl wrote:
> > "Anders Eriksson" wrote
> >
> >>On Tue, 17 Feb 2004 10:59:00 +0100, Holger Kreißl wrote:
> >>
> >>
> >>>Hi,
> >>>
> >>>i want to entcrypt a string. Are there any known possibilities to do
> >
> > this
> >
> >>>with MFC or SDK functions or do I have to implement my own encoder /
> >>>decoder?
> >>
> >>You could use MS Crypto API (CAPI) but I really would recommend that you
> >>use a 3.rd party library instead.
> >>
> >>Mr. Wei Dai has created a very nice C++ library with a number of
different
> >>cryptos. You can find it here:
> >>http://www.cryptopp.com.
> >>
> >>If this is anything but a trivial application I would recommend that you
> >>use AES (Rijndael) as you crypto.
> >
> >
> >
> >
> > Thanks for all tips!
> > I want to protect an application by a code, so that e.g. the app is only
> > running on the specified IP or MAC adress... Maybe there are easier
> > solutions to do something like that ?
> >
> > Holger
> >
> >
>
- Next message: Susanne: "Re: Access from a worker thread to a CWnd"
- Previous message: Balboos: "Re: encrypt a string"
- In reply to: Balboos: "Re: encrypt a string"
- Next in thread: Tim: "Re: encrypt a string"
- Reply: Tim: "Re: encrypt a string"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|