Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.crypt > #257364

Re: Manually generating a key with dice

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups sci.crypt
Subject Re: Manually generating a key with dice
Date 2024-03-04 21:45 +0000
Organization A noiseless patient Spider
Message-ID <87o7btk6xm.fsf@bsb.me.uk> (permalink)
References <us2g2i$lhs0$1@i2pn2.org> <us2h2k$lont$1@i2pn2.org> <us2jrb$lscu$1@i2pn2.org> <us2kh8$2lo5q$2@dont-email.me> <us2n83$m0d8$1@i2pn2.org>

Show all headers | View raw


Stefan Claas <pollux@tilde.club> writes:

> Rich wrote:
>
>> Stefan Claas <pollux@tilde.club> wrote:
>> > Chax Plore wrote:
>> > 
>> >> Hi,
>> >> 
>> >> My suggestion, which is probably "information-theoretically
>> >> correct" is to simply base-convert the "base 6" sequence of dice
>> >> digits to base required (base 10 or base 26 or any other base) and
>> >> then delete the first sign of result (which will be biased,
>> >> because first sign of output base - the "zero" of given base -
>> >> will never appear on first place).
>> >> 
>> >> It is easy to adapt this arbitrary base converter to "dice base"
>> >> of digits 1-6 and then get all output bases needed:
>> >> 
>> >> https://github.com/zamicol/BaseConverter
>> > 
>> > Hi thanks for your suggestion! 
>> > 
>> > I must admit I do not fully understand, language barrier, but will
>> > translate your steps and see how it works, i.e. if the procedure is
>> > to time consuming; compared to my wooden tiles procedure, or any
>> > other solution, which may come up here.
>> 
>> A six sided die provdes numerals 1 to 6.
>> 
>> This can also be viewed as a "base-6" numeral (0 to 5), scaled by 
>> adding one.
>> 
>> So each dice roll produces one digit of a base-6 numeral.  If you
>> want a four digit base-6 numeral, roll one die four times in a row, 
>> recording each (adjusted by -1 for each roll to aquire numerals 0-5, 
>> made up values below, I did not actually roll a die):
>> 
>> 3520 (base-6)
>> 
>> Then, convert to your "base of choice" (6^0 left on for symmetry, 
>> parens added to make the precedence explicit below):
>> 
>> 3*(6^3) + 5*(6^2) + 2*(6^1) + 0*(6^0) = 840 (base 10)
>
> Ah, ok! Now I understand. Thanks for explaining, much appreciated.

Just a quick side note...  Just two dice (or two rolls of one die) gives
you 36 different outcomes.  That's neat if you want to generate English
letters and digits.  You don't need to do the base conversion if you
just agree on a grid:

    | 1 2 3 4 5 6
  --+------------
  1 | A B C D E F
  2 | G H I J K L
  3 | M N O P Q R
  4 | S T U V W X
  5 | Y Z 0 1 2 3
  6 | 4 5 6 7 8 9

First roll picks the row, second roll picks the column.

-- 
Ben.

Back to sci.crypt | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Manually generating a key with dice Stefan Claas <pollux@tilde.club> - 2024-03-03 19:38 +0100
  Re: Manually generating a key with dice Chax Plore <ftilojim@tznvy.pbz> - 2024-03-03 19:55 +0100
    Re: Manually generating a key with dice Stefan Claas <pollux@tilde.club> - 2024-03-03 20:42 +0100
      Re: Manually generating a key with dice Rich <rich@example.invalid> - 2024-03-03 19:54 +0000
        Re: Manually generating a key with dice Stefan Claas <pollux@tilde.club> - 2024-03-03 21:40 +0100
          Re: Manually generating a key with dice Ben Bacarisse <ben.usenet@bsb.me.uk> - 2024-03-04 21:45 +0000
            Re: Manually generating a key with dice Stefan Claas <pollux@tilde.club> - 2024-03-05 10:31 +0100
  Re: Manually generating a key with dice Rich <rich@example.invalid> - 2024-03-03 19:57 +0000
    Re: Manually generating a key with dice Stefan Claas <pollux@tilde.club> - 2024-03-03 21:47 +0100
  Re: Manually generating a key with dice "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-03 13:56 -0800
    Re: Manually generating a key with dice Stefan Claas <pollux@tilde.club> - 2024-03-04 17:41 +0100
      Re: Manually generating a key with dice Rich <rich@example.invalid> - 2024-03-04 20:48 +0000
        Re: Manually generating a key with dice Stefan Claas <pollux@tilde.club> - 2024-03-05 10:34 +0100
        Re: Manually generating a key with dice "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2024-03-21 19:16 -0700

csiph-web