tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crazy idea: generate a pseudo-random value for tramp-end-of-output


From: Francis Litterio
Subject: Re: Crazy idea: generate a pseudo-random value for tramp-end-of-output
Date: Fri, 11 Oct 2002 15:03:00 -0400
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-msvc-nt5.0.2195)

Kai wrote:

> Francis Litterio <address@hidden> writes:

>> I hadn't thought of that.  My change makes TRAMP non-deterministic in
>> some small way.  This is often not desirable in software.
>
> But I take it that you and Daniel would like this change anyway?

I will defer to your decision.  This is your project, and I'm a newbie
contributor.  I recommend it -- see my remarks below about (concat "///"
(md5 ...)) being the best of both worlds.

> Note that you are comparing apples and oranges.  MD5 has the property
> that md5(x) and md5(y) will be very different even if x and y are
> similar.  It does not say anything about md5(x) and some other value
> z which is not the result of an MD5 operation.
>
> You could also take any 128 random bits (if MD5 indeed produces 128
> bits).

Good point.  My suggestion uses MD5 essentially as an entropy generator.
The probability of a collision between a random 128-bit value and
128-bits of arbitrary command output is still astronomically low.  And
it's better than using a fixed string such as "/////", which has
practically zero entropy.

> How about using (concat "///" your-value)?

I like that.  It provides the best of both worlds: guaranteed zero
collisions for normal TRAMP commands, and astronomically low probability
of collisions for shell-command output.

> Michael has submitted some rather large changes which he wants me to
> look at.  Could you please remind me to add this after his changes are
> in CVS?  I might forget otherwise, and I'm pretty busy at the moment.

Will do.
--
Francis Litterio
address@hidden
http://world.std.com/~franl/
GPG and PGP public keys available on keyservers.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]