unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>,
	Guix Devel <guix-devel@gnu.org>
Subject: Re: maradns reproducibility fixes and the merits of picking a random number
Date: Wed, 08 Jun 2022 13:23:36 -0700	[thread overview]
Message-ID: <87fskegb07.fsf@contorta> (raw)
In-Reply-To: <8edf50429401e456088d85317f1b43c6ba4859d0.camel@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

On 2022-06-08, Liliana Marie Prikler wrote:
> Am Montag, dem 06.06.2022 um 18:49 -0700 schrieb Vagrant Cascadian:
>> p.s. Obviously, I picked the best random number.
> I beg to differ.
>> +-RandomPrime:  RandomPrime.c
>> +-      $(CC) -O3 -o RandomPrime RandomPrime.c
>> +-
>> +-DwRandPrime.h: RandomPrime
>> +-      if [ -e /dev/urandom ] ; then ./RandomPrime > DwRandPrime.h ;
>> fi
>> ++DwRandPrime.h:
>> ++      echo '#define MUL_CONSTANT 1238145941' > DwRandPrime.h
> This does not satisfy requirement #221: chosen by a fair dice roll. 
> Randomness can therefore not be guaranteed.

I will admit to "Obviously, I picked the best random number." as a
joke. Hard-coding any supposedly random number seems awfully wrong to
me!

This is a not particularly great patch to make it compile reproducibly,
on the *assumption* that number will not actually be used in practice,
because it *supposed* to only be used when /dev/urandom is not
available. I would love to see better patches that make fewer
assumptions!

FWIW, This is effectively the same embedded random number used in the
Debian patch, although the maradns packaging in Debian basically comes
to the same result by copying files around rather than patching them
directly.

live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

      reply	other threads:[~2022-06-08 20:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07  1:49 maradns reproducibility fixes and the merits of picking a random number Vagrant Cascadian
2022-06-07  3:24 ` Felix Lechner
2022-06-07  5:20   ` Julien Lepiller
2022-06-07 12:11     ` Brian Cully via Development of GNU Guix and the GNU System distribution.
2022-06-08 11:48       ` Efraim Flashner
2022-06-08 14:09         ` Tobias Geerinckx-Rice
2022-06-08 11:47     ` Efraim Flashner
2022-06-08 20:33       ` Vagrant Cascadian
2022-06-23  2:05         ` Vagrant Cascadian
2022-06-28  1:31           ` Vagrant Cascadian
2022-06-28  9:30             ` Efraim Flashner
2022-06-28 15:39               ` Jack Hill
2022-06-28 16:04               ` Tobias Geerinckx-Rice
2022-06-28 16:18                 ` Gábor Boskovits
2022-06-28 16:33                   ` Vagrant Cascadian
2022-06-28 19:06                     ` Tobias Geerinckx-Rice
2022-06-28 19:15                       ` Tobias Geerinckx-Rice
2022-07-12  2:36                       ` Vagrant Cascadian
2022-07-12  2:41                         ` Vagrant Cascadian
2022-07-18 11:21                           ` Ludovic Courtès
2022-07-19 13:09                             ` Tobias Geerinckx-Rice
2022-06-07 15:15 ` Ludovic Courtès
2022-06-08 19:28 ` Arun Isaac
2022-06-08 20:25   ` Vagrant Cascadian
2022-06-14 17:16     ` Philip McGrath
2022-06-08 19:43 ` Liliana Marie Prikler
2022-06-08 20:23   ` Vagrant Cascadian [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fskegb07.fsf@contorta \
    --to=vagrant@reproducible-builds.org \
    --cc=guix-devel@gnu.org \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).