From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:3d43:: with SMTP id n64-v6mr8586684jan.51.1531788043504; Mon, 16 Jul 2018 17:40:43 -0700 (PDT) X-Received: by 2002:aca:de07:: with SMTP id v7-v6mr4366151oig.5.1531788043207; Mon, 16 Jul 2018 17:40:43 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!g2-v6no5756085itf.0!news-out.google.com!l67-v6ni221itl.0!nntp.google.com!d7-v6no5762005itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 16 Jul 2018 17:40:42 -0700 (PDT) In-Reply-To: <5a66cd8a-e11d-4a59-bce1-8cc693b4160a@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=47.185.195.62; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.195.62 References: <5a66cd8a-e11d-4a59-bce1-8cc693b4160a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <466edd9d-a865-43d9-8a36-e5a9920d2ca5@googlegroups.com> Subject: Re: Simple hash or pseudo-random function From: "Dan'l Miller" Injection-Date: Tue, 17 Jul 2018 00:40:43 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2732 X-Received-Body-CRC: 1468216174 Xref: reader02.eternal-september.org comp.lang.ada:53855 Date: 2018-07-16T17:40:42-07:00 List-Id: On Monday, July 16, 2018 at 3:20:28 AM UTC-5, gautier...@hotmail.com wrote: > Hello, > Does someone have a function that would take an integer (range 0 .. 2**63= ), not uniformily distributed > (it's a code with some meaning) and return a number that is pseudo-random= , uniformily distributed > (could be a floating-point number or an integer in a range of minimum len= gth 365) ? Do you mean, e.g., a modular-arithmetic integer of length 365 bits? Of ran= ge 0..2**365-1? I ask because bitlength is the customary measurement of =E2=80=9Clength=E2= =80=9C of an integer in cryptography, but the lengths of integers in crypto= tend to be 512, 1024, 2048, and so forth, not 365 per se. Bitlength of an= integer is also the customary measurement of =E2=80=9Clength=E2=80=9D of a= n integer keys for depth-first walks of radix tries* as well (extrapolated = from binary/radix-2 PATRICIA tries*), but the lengths of depth-first walks = of radix tries tends to be word sizes (e.g., 16, 32, 64, or 128 bits) or th= e lengths of depth-first walks of PATRICIA tries tends to be bitwidth-of-ch= aracter multiplied by length of string, not 365 per se. * The more-correct =E2=80=98trie=E2=80=99 is sometimes misspelled =E2=80=98= tree=E2=80=99, despite the O(1) growth of trie search-time as opposed to lo= g(n) growth of tree search-time for trees, as the quantity n of leaves incr= eases arbitrarily large.