Re: incremental MD5 ?



"slim" <chinghai@xxxxxxxxx> wrote in message
news:1142661857.379813.193180@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
hi everyone!!
i'm writing some program that backup memory data.

and i'm trying MD5 encryption, the original data is quite big and MD5
encrypted data is added to it..

Problem #1, MD5 is not an encryption algorithm, and you're actually not
using it in an encryption mode (as far as I can tell). MD5 is a hash
function, it'll help you if you think of it as such.

Problem #2, MD5 is considered weak, since you are attempting to use it for
it's direct crypto-hash properties you need to change algorithms. I'd
suggest that for a 32-bit system go with SHA-256, 64-bit system SHA-512, and
either way be prepared to move to Whirlpool is the need arises.

it is like this


----------------------------------------

original data

----------------------------------------

MD5 encrypted data (of original data)

----------------------------------------

and after reboot, it read memory data and encrypt it, and compare it
with previous encrypted one.
if it is different (maybe spoiled, damaged), then find different part
of the current data, and recalculate the part with MD5,
and update MD5 encrypted data on the exact part of it...i mean, update
only exact part of encrypted area...

do you think MD5 can do this method?
do you think the whole data's encrypted data is same as previous
partially updated one?
incremental MD5 is implemented ?

What you're looking for is called a Merkle tree, also called the library
signing algorithm. Conceptually it works like this:

Given a very large library (many floors, hundreds of thousands of books,
etc)
Hash the book to get the book hash
Hash all the book hashes on a shelf to get the shelf hash
Hash all the shelf hashes in a column to get the column hash
Hash all the column hashes in an aisle to get the aisle hash
Hash all the aisle hashes in a section to get the section hash
Hash all the section hashes on a floor to get the floor hash
Hash all the floor hashes in a library to get the library hash
Sign the library hash

You can reduce the number of steps to meet your needs. The benefit for you
is that when you change the value of a "book" (probably memory page) you
need to perform only a few hashes of relatively small values. The downside
is that you'll have to store the entire tree, but given a state and a
library hash (system memory hash) you can verify whether or not the state
and hash match, although without the tree you wont' be able to tell which
part(s) changed.
Joe


.



Relevant Pages

  • Re: C# Equivalent of C++ MD5 Algorith
    ... your original post said you were looking for an MD5 Hash. ... Co-founder, Eggheadcafe.com developer portal: ... The problem is that the C++ encryption generates 110 ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Need strong crypto for sending my password via sockets.
    ... MD5 and Blowfish are indeed free, but MD5 is not an encryption algorithm ... it is a disgest (hash) algorithm. ... Server crypts it's own copy of password ...
    (microsoft.public.vc.mfc)
  • Re: password length
    ... ]>]The short answer is "Different encryption ... ]>based hash, 128 bits in the case of the MD5 based hash. ... ]>Ie, the password algorithms are not encryptions, they are hashes. ...
    (alt.os.linux.suse)
  • Re: what is probability to create two equal hashes for md5 algorithm
    ... Other than that, if the hash is statistically good, the longer the hash, the ... few cases the hashes match. ... md5 and crc32)? ... How much does it cost to compare two hashes? ...
    (sci.crypt)
  • Re: ACCEPT and the SCREEN SECTION.
    ... General-purpose hashes, for hash tables and similar data structures, ... In short, cryptographic hashes like MD5 are used to verify data, ... if a client asks for and receives a chunk ...
    (comp.lang.cobol)