Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.041 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'subject:Python': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'underlying': 0.09; 'generator.': 0.16; 'kern': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.16; 'library': 0.20; '(or': 0.21; '(by': 0.22; 'interpret': 0.22; 'bigger': 0.23; "python's": 0.23; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'not,': 0.27; 'rest': 0.28; "i'm": 0.29; 'values': 0.30; 'maybe': 0.31; 'possibly': 0.32; "d'aprano": 0.33; 'steven': 0.33; 'to:addr :python-list': 0.35; 'attempt': 0.35; 'robert': 0.35; 'something': 0.35; 'but': 0.36; 'too': 0.36; 'subject:: ': 0.37; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'some': 0.40; 'secure': 0.61; 'world': 0.64; 'our': 0.64; 'subject:Data': 0.66; 'believe': 0.67; '100': 0.79; 'eco': 0.84; 'ever.': 0.84; 'terrible': 0.84; 'not:': 0.93; 'received:86': 0.93; 'safe.': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Robert Kern Subject: Re: Pure Python Data Mangling or Encrypting Date: Sat, 27 Jun 2015 09:07:21 +0100 References: <558b7e85$0$1648$c3e8da3$5496439d@news.astraweb.com> <558bc912$0$2899$c3e8da3$76491128@news.astraweb.com> <558c1a7e$0$1668$c3e8da3$5496439d@news.astraweb.com> <558d86b0$0$1659$c3e8da3$5496439d@news.astraweb.com> <558e1ac6$0$1675$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: cpc5-cmbg17-2-0-cust789.5-4.cable.virginm.net User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1435392450 news.xs4all.nl 2968 [2001:888:2000:d::a6]:38105 X-Complaints-To: abuse@xs4all.nl Path: csiph.com!usenet.pasdenom.info!news.stben.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Xref: csiph.com comp.lang.python:93228 On 2015-06-27 08:58, Robert Kern wrote: > On 2015-06-27 04:38, Steven D'Aprano wrote: > >> Maybe you use Python's standard library and the Mersenne Twister. The period >> of that is huge, possibly bigger than 256! (or not, I forget, and I'm too >> lazy to look it up). So you think that's safe. But it's not: Mersenne >> Twister is not a cryptographically secure pseudorandom number generator. If >> I can get some small number of values from the Twister (by memory, >> something of the order of 100 such values) then I can predict the rest for >> ever. > > 634. Bah! 624. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco