Re: Clever ways to hide a compare
- From: Robert Redelmeier <redelm@xxxxxxxxxxxxxxx>
- Date: Sun, 25 Sep 2005 00:41:46 +0000 (UTC)
jonathon <spamtrap@xxxxxxxxxx> wrote:
> Suppose you are writing a protection scheme, and need
> to compare 2 values. Is there a clever way to do this
> without an outright 'cmp' instruction? Of course it's always
> possible to use the value in a calculation that is needed for
> correct functionality of the program, but I was wondering
> if there is a way to have 2 values compared in a sneaky
> way where it is not immediately evident what is happening.
Well, a `cmp` is nothing but a `sub` with the resultant
thrown away. So you could us that.
But if I were of a mind to write a software licencing/
protection scheme (and I'm not, but I don't think such things
are automatically evil), then I'd proceed very differently:
I'd provide users with a longish (40 char) serial number
that hashed down to the same ~32 bits. These bits would be
a crypto key to correctly decrypt and decompress a critical
code section. This can be defeated by some techniques,
and there are further countermeasures.
-- Robert
.
- References:
- Clever ways to hide a compare
- From: jonathon
- Clever ways to hide a compare
- Prev by Date: Clever ways to hide a compare
- Next by Date: Re: opening and reading a character from a file with emu8086 assembler
- Previous by thread: Clever ways to hide a compare
- Next by thread: Re: Clever ways to hide a compare
- Index(es):
Relevant Pages
|