Discussion:
Manually generating a key with dice
(too old to reply)
Stefan Claas
2024-03-03 18:38:09 UTC
Permalink
Hi all,

is there a common practice, all agree on, to generate
pads (numeric or alphabetic), with two six-sided dices?

I saw this here and I like it, but wonder if there is an
agreed standard for rolling two dices, to obtain digits,
from 0-25, or letters from A-Z.

<https://github.com/sa6mwa/krypto431?tab=readme-ov-file#manually-generating-a-key-with-dice>

I ask, because I have now the Diana Cryptosystem in GO
and if users would like to manually generate the pads,
for it. I normally use wooden tiles, for the letters.

Regards
Stefan
--
----Ed25519 Signature----
5799258d0e3bddac29b8191c8a48789b868027e518eab90eef857deafe39231e
02d62f02628d61c3e18ed6e1ef0fa465f740d6497aa33e3a6680b59e7926b106
Chax Plore
2024-03-03 18:55:14 UTC
Permalink
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
Post by Stefan Claas
is there a common practice, all agree on, to generate
pads (numeric or alphabetic), with two six-sided dices?
--
-----BEGIN PGP PUBLIC KEY FINGERPRINT-----
5745 807C 2B82 14D8 AB06 422C 8876 5DFC 2A51 778C
------END PGP PUBLIC KEY FINGERPRINT------
Stefan Claas
2024-03-03 19:42:32 UTC
Permalink
Post by Chax Plore
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
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.

Regards
Stefan
--
----Ed25519 Signature----
2cd286e9aad4060685772c8099b9c7459788eada3f36554e94214bd8ccd6a2e8
a74c2d531492aa760ea5eaa6e0f63605f3c8cc23eebbfc4288f681614f13f808
Rich
2024-03-03 19:54:16 UTC
Permalink
Post by Stefan Claas
Post by Chax Plore
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
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)
Stefan Claas
2024-03-03 20:40:34 UTC
Permalink
Post by Rich
Post by Stefan Claas
Post by Chax Plore
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"
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,
3520 (base-6)
Then, convert to your "base of choice" (6^0 left on for symmetry,
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.

Regards
Stefan
--
----Ed25519 Signature----
f19516ee67b1720bff4aca3ad5f092af9a23b7043a98705ec29995cd6c1476e8
10be0efa846677662f4a3721da72186e887c0d7e126e3a0d02c7220e7d4d9801
Ben Bacarisse
2024-03-04 21:45:09 UTC
Permalink
Post by Stefan Claas
Post by Rich
Post by Stefan Claas
Post by Chax Plore
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"
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,
3520 (base-6)
Then, convert to your "base of choice" (6^0 left on for symmetry,
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.
Stefan Claas
2024-03-05 09:31:42 UTC
Permalink
Post by Ben Bacarisse
Post by Stefan Claas
Post by Rich
Post by Stefan Claas
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
3520 (base-6)
Then, convert to your "base of choice" (6^0 left on for symmetry,
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
| 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.
Thank you! That is a very nice, even if one has only one dice. :-)

Regards
Stefan
--
----Ed25519 Signature----
4a9a7aacce9508d13132e194dd9f9ebe9a46ca63c5bd6f45e8759f1bbb998b18
668e398f7f8fafa3c0eb62faec376e40257ad6d2f123afda3a61dda211384902
Rich
2024-03-03 19:57:25 UTC
Permalink
Post by Stefan Claas
is there a common practice, all agree on, to generate
pads (numeric or alphabetic), with two six-sided dices?
"common" as in most people are aware of and know about, doubtful,
otherwise some of the few of us left lurking here might "know about
it".

The closest that comes to mind is the diceware password generation
system:

https://en.wikipedia.org/wiki/Diceware

However, do note that if you "sum" the numbers from the roll of two
dice, that the result will have a bias peak at seven. Graphing the
"bias" will look a lot like a statistical normal distribution curve,
with the peak of the graph at seven.
Stefan Claas
2024-03-03 20:47:34 UTC
Permalink
Post by Rich
Post by Stefan Claas
is there a common practice, all agree on, to generate
pads (numeric or alphabetic), with two six-sided dices?
"common" as in most people are aware of and know about, doubtful,
otherwise some of the few of us left lurking here might "know about
it".
Well, ok.
Post by Rich
The closest that comes to mind is the diceware password generation
https://en.wikipedia.org/wiki/Diceware
However, do note that if you "sum" the numbers from the roll of two
dice, that the result will have a bias peak at seven. Graphing the
"bias" will look a lot like a statistical normal distribution curve,
with the peak of the graph at seven.
Thanks for the info. I would not "sum" the results, to avoid what you
said, but do in in a way, described in my URL, if nobody can show
another solution, or use my wooden tiles, for letters.

Regards
Stefan
--
----Ed25519 Signature----
6d1223ef9bd2ea495711b031c267a4eac9a5c2ad1b71bf90432b713f3a29c838
296eaceddac960aa1a701898fbaa5308cf5b58bc171060a2af7d6b1b65531d0f
Chris M. Thomasson
2024-03-03 21:56:48 UTC
Permalink
Post by Stefan Claas
Hi all,
is there a common practice, all agree on, to generate
pads (numeric or alphabetic), with two six-sided dices?
I saw this here and I like it, but wonder if there is an
agreed standard for rolling two dices, to obtain digits,
from 0-25, or letters from A-Z.
<https://github.com/sa6mwa/krypto431?tab=readme-ov-file#manually-generating-a-key-with-dice>
I ask, because I have now the Diana Cryptosystem in GO
and if users would like to manually generate the pads,
for it. I normally use wooden tiles, for the letters.
Might as well bust out some D&D die. Hex die is a fun one. Put a lot of
hex die in a box. Shake it up.... Cut a little hole in the box and let
out one die at a time.... ;^)
Stefan Claas
2024-03-04 16:41:31 UTC
Permalink
Post by Chris M. Thomasson
Post by Stefan Claas
Hi all,
is there a common practice, all agree on, to generate
pads (numeric or alphabetic), with two six-sided dices?
I saw this here and I like it, but wonder if there is an
agreed standard for rolling two dices, to obtain digits,
from 0-25, or letters from A-Z.
<https://github.com/sa6mwa/krypto431?tab=readme-ov-file#manually-generating-a-key-with-dice>
I ask, because I have now the Diana Cryptosystem in GO
and if users would like to manually generate the pads,
for it. I normally use wooden tiles, for the letters.
Might as well bust out some D&D die. Hex die is a fun one. Put a lot
of hex die in a box. Shake it up.... Cut a little hole in the box and
let out one die at a time.... ;^)
How does a hex die look like? I have not found any reference, via
Google.

Regards
Stefan
--
----Ed25519 Signature----
08551d9e83af1379228d28c46503f0a630d652a20259957142f21f2d0c416a60
989c6e082d83520575808d76509c766655550be3ef989214528b6dbb88824405
Rich
2024-03-04 20:48:22 UTC
Permalink
Post by Stefan Claas
Post by Stefan Claas
Hi all,
is there a common practice, all agree on, to generate
pads (numeric or alphabetic), with two six-sided dices?
I saw this here and I like it, but wonder if there is an
agreed standard for rolling two dices, to obtain digits,
from 0-25, or letters from A-Z.
<https://github.com/sa6mwa/krypto431?tab=readme-ov-file#manually-generating-a-key-with-dice>
I ask, because I have now the Diana Cryptosystem in GO and if
users would like to manually generate the pads, for it. I
normally use wooden tiles, for the letters.
Might as well bust out some D&D die. Hex die is a fun one. Put a
lot of hex die in a box. Shake it up.... Cut a little hole in the
box and let out one die at a time.... ;^)
How does a hex die look like? I have not found any reference, via
Google.
If Chris means a 16 sided die, hen something approximating these
images:

https://www.diceemporium.com/product-category/16-sided-dice/
Stefan Claas
2024-03-05 09:34:33 UTC
Permalink
Post by Rich
Post by Stefan Claas
Might as well bust out some D&D die. Hex die is a fun one. Put a
lot of hex die in a box. Shake it up.... Cut a little hole in
the box and let out one die at a time.... ;^)
How does a hex die look like? I have not found any reference, via
Google.
If Chris means a 16 sided die, hen something approximating these
https://www.diceemporium.com/product-category/16-sided-dice/
Ah, ok. Thank you!

Regards
Stefan
--
----Ed25519 Signature----
7af21b4a8bbe9e486c53f5cb7c36e22d79bccdb8d98cc16df2083eb0e4bd3b4d
bc49c9b938f664f13d1adc7aa21f6f6b823ee8429e9cb3f08f8c9c2830bf290c
Chris M. Thomasson
2024-03-22 02:16:44 UTC
Permalink
Post by Rich
Post by Stefan Claas
Post by Stefan Claas
Hi all,
is there a common practice, all agree on, to generate
pads (numeric or alphabetic), with two six-sided dices?
I saw this here and I like it, but wonder if there is an
agreed standard for rolling two dices, to obtain digits,
from 0-25, or letters from A-Z.
<https://github.com/sa6mwa/krypto431?tab=readme-ov-file#manually-generating-a-key-with-dice>
I ask, because I have now the Diana Cryptosystem in GO and if
users would like to manually generate the pads, for it. I
normally use wooden tiles, for the letters.
Might as well bust out some D&D die. Hex die is a fun one. Put a
lot of hex die in a box. Shake it up.... Cut a little hole in the
box and let out one die at a time.... ;^)
How does a hex die look like? I have not found any reference, via
Google.
If Chris means a 16 sided die, hen something approximating these
https://www.diceemporium.com/product-category/16-sided-dice/
Ding! You got it.

Loading...