Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: How to generate a UUID? (was possible data format...Re:Re: dbms3.r 0

From: joel:neely:fedex at: 17-Jan-2002 6:03

Hi, Brett, Brett Handley wrote:
> I had thought of using checksum/secure as an ID some time back. > But the synonym possibility made be nervous. Why? > (1) Such a chance is greater than zero > (2) I believe that Murphy's law is understated. > (3) I've programming so long I'm automatically suspicious of > possibilities :) >
I agree on all counts.
> > Needless to say, none of this implies that synonyms fail to exist > > (see previous note), but simply that it should be infeasibly hard > > to construct a synonym for a given input. > > Apply that quote to the idea of using checksum/secure as an ID and > it sounds comforting to me. > I wonder if it is "infeasibly hard" over a lifetime? >
Well, "infeasibly hard" means the probability that a random message would have the same checksum should be about 6.84227765783589E-49 and you shouldn't be able to do better crafting one yourself. The issue is not that synonyms won't happen, but that they're unlikely and you can't predict WHEN they'll happen. Therefore they are "safe" for indicating whether a message has been tampered with. -jn- -- ; sub REBOL {}; sub head ($) {@_[0]} REBOL [] # despam: func [e] [replace replace/all e ":" "." "#" "@"] ; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"} print head reverse despam "moc:xedef#yleen:leoj" ;