Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #103386
| Path | csiph.com!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Make a unique filesystem path, without creating the file |
| Date | Tue, 23 Feb 2016 11:56:24 +1100 |
| Lines | 36 |
| Message-ID | <mailman.59.1456188988.20994.python-list@python.org> (permalink) |
| References | <85r3gf55k4.fsf@benfinney.id.au> <CAG93HwHjKewu-VHUUc1jL=cU-pDNxVtKxx6ORyr+mdLLSJx2TA@mail.gmail.com> <CAG93HwGRsvcc=9rGgOA=oi6C-3pTk-Kr3g4dxCN0ivvixTVPWw@mail.gmail.com> <85mvr26dij.fsf@benfinney.id.au> <mailman.44.1456164660.20994.python-list@python.org> <slrnncmkag.16b.jon+usenet@wintry.unequivocal.co.uk> <mailman.45.1456165511.20994.python-list@python.org> <slrnncmllh.16b.jon+usenet@wintry.unequivocal.co.uk> <87ziusmvi0.fsf@elektro.pacujo.net> <56cb9bb5$0$1595$c3e8da3$5496439d@news.astraweb.com> <slrnncn8u3.16b.jon+usenet@wintry.unequivocal.co.uk> <mailman.55.1456186740.20994.python-list@python.org> <slrnncn9uc.16b.jon+usenet@wintry.unequivocal.co.uk> <mailman.57.1456187639.20994.python-list@python.org> <slrnncnb1a.16b.jon+usenet@wintry.unequivocal.co.uk> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de 1kGRFsn3V+ojywro+XMb/AOKE6X6TFWRLXl6f2tsOy0Q== |
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.036 |
| X-Spam-Evidence | '*H*': 0.93; '*S*': 0.00; 'filename': 0.07; 'filenames': 0.07; 'subject:file': 0.07; 'cc:addr:python-list': 0.09; 'differently.': 0.09; 'expired': 0.09; 'here?': 0.09; 'oh,': 0.09; '2016': 0.16; '23,': 0.16; 'certainty': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'relevance': 0.16; 'utterly': 0.16; 'wrote:': 0.16; '>>>': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'trying': 0.22; 'am,': 0.23; 'feb': 0.23; 'slightly': 0.23; 'tried': 0.24; 'header:In-Reply-To:1': 0.24; "doesn't": 0.26; 'chris': 0.26; 'message- id:@mail.gmail.com': 0.27; 'see,': 0.27; 'random': 0.29; 'guess': 0.31; 'choosing': 0.33; 'steven': 0.33; 'tue,': 0.34; 'gives': 0.35; 'received:google.com': 0.35; 'so,': 0.35; 'could': 0.35; "isn't": 0.35; 'but': 0.36; 'received:209.85': 0.36; 'apply.': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'received:209.85.213': 0.37; 'doing': 0.38; 'version': 0.38; 'received:209': 0.38; 'mean': 0.38; 'does': 0.39; 'subject:the': 0.39; 'some': 0.40; 'chance': 0.60; 'your': 0.60; 'avoid': 0.61; 'here.': 0.62; 'due': 0.65; '>>>>>': 0.66; 'talking': 0.67; 'guaranteed': 0.67; '100%': 0.72; '50%': 0.79; '11:44': 0.84; 'chrisa': 0.84; 'collision': 0.84; 'collision.': 0.84; 'paradox': 0.84; 'remembering': 0.84; 'to:none': 0.91; 'birthday': 0.91; 'heat': 0.91; 'subject:Make': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=ExXmyavNSjUjCkm5uIEy+Qyo0g0qpudLRcj8dEzFVnA=; b=PZ0FKj2AYq+jdtPahSrx+Aq9/dI2jAFIhhkfbMITCXMnChr+0gGlG+/5VmPj7LFTG5 jMi9WYcP113dB6A+Dm57EMle9Tz9PImodxKQgsrCS2liKT2EGAyR+7oXJsLZqiY7kekj MiSRBjwlRLnz7vjqSFxMOg45uUmKzfhZy9SDySX7/hb0OvUTP3GRiMqGOgLcFKgqMQOt H6+4JDIXNXeIHd+zPNZfIMIh9Y/RUjiCAs1Ki/QM3C9w9kdvj25w9xZrVzVr8pTRN/4a ItVwGRWA36EALJEHACkjxVBNKZUKfrowZm8zThO+NFRy3dZjzNembQOz1YYS743zUPdr Q++Q== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=ExXmyavNSjUjCkm5uIEy+Qyo0g0qpudLRcj8dEzFVnA=; b=PnA8CCToLIcyoDRzSaaI+/nS57ytisbt31YM1hugW2MqOlZFg7vXnXyhFOPViKeg2A LfpfedKbQZlj701rdAjtlSwKIv9h9QNt2gRslD7v2yBFmiXApKkDLI+nRskByhGRaRh7 Y1/ETtof4oEHV4pSOioA2qp6uSBMtoRq8qPGiNgvCTcOKpcmFvdy6NjMNUfUxFKnxEls iGM6CxQ1KaezEn8iZcs+fKom1Xz6MaIBwvtRQq0oxSMgYd3PH+99hMY07cAwZD+bf81J stEe31zDdndZHKOg3Yjugwr51fgNDGQcvtP17pj7YLVNCBJvWcS8svdjU2th7vGObef/ pqtQ== |
| X-Gm-Message-State | AG10YORviwRSx9qqIiSOHQvFg7m/aYT2540I/ZPimpcS1ylZT6dyw4hPITmO59YUQMOqCJEB+bsu7hz7r8MSzg== |
| X-Received | by 10.50.28.105 with SMTP id a9mr15286738igh.94.1456188985288; Mon, 22 Feb 2016 16:56:25 -0800 (PST) |
| In-Reply-To | <slrnncnb1a.16b.jon+usenet@wintry.unequivocal.co.uk> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21rc2 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:103386 |
Show key headers only | View raw
On Tue, Feb 23, 2016 at 11:44 AM, Jon Ribbens <jon+usenet@unequivocal.co.uk> wrote: > On 2016-02-23, Chris Angelico <rosuav@gmail.com> wrote: >> On Tue, Feb 23, 2016 at 11:26 AM, Jon Ribbens >><jon+usenet@unequivocal.co.uk> wrote: >>> On 2016-02-23, Chris Angelico <rosuav@gmail.com> wrote: >>>> On Tue, Feb 23, 2016 at 11:08 AM, Jon Ribbens >>>><jon+usenet@unequivocal.co.uk> wrote: >>>>>> If you generate 2**128 + 1 such numbers, you are *guaranteed* to >>>>> >>>>> ... have expired due to the heat death of the universe. >>>> >>>> Maybe... but by the time you get to 2**64 of them, you have a 50% >>>> chance of a collision. (That's either utterly intuitive or completely >>>> counter-intuitive, depending on who you are.) >>> >>> Um, did you mean to say 2**127? Are you thinking of the >>> birthday paradox or something, which doesn't apply here? >> >> By the time you generate 2**64 of them, you have a 50% chance that >> some pair of them collides. Yes, the birthday paradox does apply here. > > Oh, I see, you're thinking of it differently. I was thinking of it as > Alice is choosing a filename and Mallet is trying to guess it, in which > case the birthday paradox doesn't apply. You're thinking of it as Alice > is generating many random filenames and, even though she could avoid > collisions with 100% certainty by remembering what she's already had, > isn't doing so, and must avoid colliding with herself. I don't think > your version makes has much relevance as an attack model. Ah. Steven was talking about collisions; once you have 2**128+1 of them, you're guaranteed a collision (pigeonhole principle). What you're talking about gives certainty slightly sooner - specifically, once you've tried 2**128 of them, you're guaranteed to have hit it :) ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Make a unique filesystem path, without creating the file Ethan Furman <ethan@stoneleaf.us> - 2016-02-22 10:11 -0800
Re: Make a unique filesystem path, without creating the file Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-02-22 18:17 +0000
Re: Make a unique filesystem path, without creating the file Chris Angelico <rosuav@gmail.com> - 2016-02-23 05:25 +1100
Re: Make a unique filesystem path, without creating the file Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-02-22 18:39 +0000
Re: Make a unique filesystem path, without creating the file Marko Rauhamaa <marko@pacujo.net> - 2016-02-22 20:48 +0200
Re: Make a unique filesystem path, without creating the file Steven D'Aprano <steve@pearwood.info> - 2016-02-23 10:37 +1100
Re: Make a unique filesystem path, without creating the file Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-02-23 00:08 +0000
Re: Make a unique filesystem path, without creating the file Chris Angelico <rosuav@gmail.com> - 2016-02-23 11:18 +1100
Re: Make a unique filesystem path, without creating the file Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-02-23 00:26 +0000
Re: Make a unique filesystem path, without creating the file Chris Angelico <rosuav@gmail.com> - 2016-02-23 11:33 +1100
Re: Make a unique filesystem path, without creating the file Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-02-23 00:44 +0000
Re: Make a unique filesystem path, without creating the file Chris Angelico <rosuav@gmail.com> - 2016-02-23 11:56 +1100
Re: Make a unique filesystem path, without creating the file Chris Angelico <rosuav@gmail.com> - 2016-02-23 06:04 +1100
Re: Make a unique filesystem path, without creating the file Paul Rubin <no.email@nospam.invalid> - 2016-02-22 11:22 -0800
Re: Make a unique filesystem path, without creating the file Steven D'Aprano <steve@pearwood.info> - 2016-02-23 10:45 +1100
Re: Make a unique filesystem path, without creating the file Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-02-22 19:22 +0000
Re: Make a unique filesystem path, without creating the file Marko Rauhamaa <marko@pacujo.net> - 2016-02-22 21:32 +0200
Re: Make a unique filesystem path, without creating the file Random832 <random832@fastmail.com> - 2016-02-22 14:41 -0500
Re: Make a unique filesystem path, without creating the file Marko Rauhamaa <marko@pacujo.net> - 2016-02-22 22:41 +0200
Re: Make a unique filesystem path, without creating the file Paul Rubin <no.email@nospam.invalid> - 2016-02-22 13:05 -0800
Re: Make a unique filesystem path, without creating the file Marko Rauhamaa <marko@pacujo.net> - 2016-02-22 23:22 +0200
Re: Make a unique filesystem path, without creating the file Paul Rubin <no.email@nospam.invalid> - 2016-02-22 15:26 -0800
Re: Make a unique filesystem path, without creating the file Steven D'Aprano <steve@pearwood.info> - 2016-02-23 11:33 +1100
Re: Make a unique filesystem path, without creating the file Marko Rauhamaa <marko@pacujo.net> - 2016-02-23 08:54 +0200
Re: Make a unique filesystem path, without creating the file Paul Rubin <no.email@nospam.invalid> - 2016-02-22 23:18 -0800
Re: Make a unique filesystem path, without creating the file Marko Rauhamaa <marko@pacujo.net> - 2016-02-23 21:04 +0200
Re: Make a unique filesystem path, without creating the file Steven D'Aprano <steve@pearwood.info> - 2016-02-24 12:40 +1100
Re: Make a unique filesystem path, without creating the file Marko Rauhamaa <marko@pacujo.net> - 2016-02-24 09:20 +0200
Re: Make a unique filesystem path, without creating the file Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-02-25 16:38 +1100
Re: Make a unique filesystem path, without creating the file Marko Rauhamaa <marko@pacujo.net> - 2016-02-25 08:54 +0200
Re: Make a unique filesystem path, without creating the file Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-02-25 19:21 +1100
Re: Make a unique filesystem path, without creating the file Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-02-25 10:05 +0000
Re: Make a unique filesystem path, without creating the file Chris Angelico <rosuav@gmail.com> - 2016-02-23 06:37 +1100
Re: Make a unique filesystem path, without creating the file Steven D'Aprano <steve@pearwood.info> - 2016-02-23 11:03 +1100
Re: Make a unique filesystem path, without creating the file Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-02-23 00:11 +0000
Re: Make a unique filesystem path, without creating the file Paul Rubin <no.email@nospam.invalid> - 2016-02-22 18:27 -0800
Re: Make a unique filesystem path, without creating the file Chris Angelico <rosuav@gmail.com> - 2016-02-23 13:53 +1100
Re: Make a unique filesystem path, without creating the file Paul Rubin <no.email@nospam.invalid> - 2016-02-22 19:26 -0800
Re: Make a unique filesystem path, without creating the file Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-02-23 08:09 +0000
Re: Make a unique filesystem path, without creating the file Paul Rubin <no.email@nospam.invalid> - 2016-02-23 00:22 -0800
Re: Make a unique filesystem path, without creating the file Peter Otten <__peter__@web.de> - 2016-02-23 09:40 +0100
Re: Make a unique filesystem path, without creating the file Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-02-23 09:00 +0000
Re: Make a unique filesystem path, without creating the file Grant Edwards <invalid@invalid.invalid> - 2016-02-23 15:14 +0000
Re: Make a unique filesystem path, without creating the file Steven D'Aprano <steve@pearwood.info> - 2016-02-25 11:41 +1100
Re: Make a unique filesystem path, without creating the file Random832 <random832@fastmail.com> - 2016-02-25 10:03 -0500
Re: Make a unique filesystem path, without creating the file Steven D'Aprano <steve@pearwood.info> - 2016-02-23 11:18 +1100
csiph-web