Re: Chance of equal checksum and changing blocks

2009-01-27 Thread David de Lama
Here's an example. Suppose the block size is 900 bytes (i.e., you either specified --block-size=900 or saw blength=900 in the output). Then you could use the following command to overwrite blocks 40 through 45 of the file (counting from 0) with zeros: dd bs=900 if=/dev/zero of=/home/test.xyz

Re: Chance of equal checksum and changing blocks

2009-01-27 Thread Paul Slootman
On Tue 27 Jan 2009, David de Lama wrote: Then I wanted to overwrite 25 blocks: dd bs=1M if=/dev/urandom of=/home/test.xyz seek=50 count=25 But when I look at the file, its size is now 76.8MB! So all the Blocks after block 75 are deleted! :( Need help, please! Try the dd manpage, which

Re: Chance of equal checksum and changing blocks

2009-01-27 Thread David de Lama
-Ursprüngliche Nachricht- Von: Paul Slootman paul+rs...@wurtel.net Gesendet: 27.01.09 11:25:31 An: rsync@lists.samba.org Betreff: Re: Chance of equal checksum and changing blocks On Tue 27 Jan 2009, David de Lama wrote: Then I wanted to overwrite 25 blocks: dd bs=1M if=/dev/urandom

Re: Chance of equal checksum and changing blocks

2009-01-23 Thread Matthias Schniedermeyer
On 22.01.2009 10:43, David de Lama wrote: Hi @all! I have two questions: - First, am I right that the chance of getting the same 32-bit rolling checksum is 1/2^16 and to get the same 128-bit MD5 Hash is 1/2^127? No. The chance of accidental collision with MD5 is: 1/2^64 The other half of

Re: Chance of equal checksum and changing blocks

2009-01-23 Thread Matt McCutchen
David, please CC rsync@lists.samba.org in your replies so that others can help you and your messages are archived for others' future benefit. On Fri, 2009-01-23 at 09:02 +0100, David de Lama wrote: - Finally I want two know if it is possible to change an amount of blocks manually? e.g. I

Chance of equal checksum and changing blocks

2009-01-22 Thread David de Lama
Hi @all! I have two questions: - First, am I right that the chance of getting the same 32-bit rolling checksum is 1/2^16 and to get the same 128-bit MD5 Hash is 1/2^127? - Finally I want two know if it is possible to change an amount of blocks manually? e.g. I made a 100 MB file with dd

Re: Chance of equal checksum and changing blocks

2009-01-22 Thread Matt McCutchen
On Thu, 2009-01-22 at 10:43 +0100, David de Lama wrote: - First, am I right that the chance of getting the same 32-bit rolling checksum is 1/2^16 and to get the same 128-bit MD5 Hash is 1/2^127? You might know something I don't, but I would expect the collision probability to be 1/2^32 for 32

Re: Chance of equal checksum and changing blocks

2009-01-22 Thread lewis butler
On 22-Jan-2009, at 02:43, David de Lama wrote: Hi @all! I have two questions: - First, am I right that the chance of getting the same 32-bit rolling checksum is 1/2^16 Depends on the algorithm. Most 32bit algorithms are not really 1: (2^16)-1 and to get the same 128-bit MD5 Hash is