Re: Embedding hash value in data
- From: "David T. Ashley" <dta@xxxxxxxx>
- Date: Wed, 31 Jan 2007 17:05:40 -0500
"Draco" <draco_merest@xxxxxxxxxxxxxxx> wrote in message
news:u8u1s2t3l049ucvl65nslfu35qijc5n742@xxxxxxxxxx
On Wed, 31 Jan 2007 15:06:23 -0500, "David T. Ashley" <dta@xxxxxxxx>
wrote:
I had considered various text editors and their differing approches to
formatting for a few moments until I realized no one is going to hand
enter any embedded hash code. Rather, a small untility would calcualte
and insert the value. But if I need to brute force it then I think I
will go with your suggestion of skipping over the value when computing
the overall hash.
There is one part I forgot to mention. The approach I gave you doesn't
really "tamper-proof" the file, because the algorithm is public and anyone
can put another file in place of the original or modify the original and use
the same algorithm to generate and embed a [different] hash that matches the
rest of the file contents.
To "tamper-proof" the file in the sense you intend, the typical approach is
to use a "key" (a text string with maybe 2048 bits of entropy is fine), and
the hash is formed as the SHA1 of the concatenation of the key + the text.
Without the key, a potential attacker can't forge a matching hash.
The trouble I believe would be in securing the key. If you distribute (for
example) a utility to check whether a given file has a matching hash, the
utility has to have embedded in it the key (because it re-calculates the
hash to verify). Someone clever may be able disassemble the executable or
use other tactics to get the embedded key.
This question might best be posed in a cryptography list. I'm out of my
depth. I understand your problem, but there may be a better family of
solutions.
--
David T. Ashley (dta@xxxxxxxx)
http://www.e3ft.com (Consulting Home Page)
http://www.dtashley.com (Personal Home Page)
http://gpl.e3ft.com (GPL Publications and Projects)
.
- References:
- Embedding hash value in data
- From: Draco
- Re: Embedding hash value in data
- From: David T. Ashley
- Re: Embedding hash value in data
- From: Draco
- Embedding hash value in data
- Prev by Date: Re: More primality testing (was: Elementary group theory: Proof of Fermat-Maas ...)
- Next by Date: Re: A card game probability
- Previous by thread: Re: Embedding hash value in data
- Next by thread: compact hypotesis
- Index(es):
Relevant Pages
|