Skip to content

Commit 978cf30

Browse files
authored
slight polishes
1 parent 279b20d commit 978cf30

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

Docs/MANUAL.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 🌱 Seedtool
22

3-
**Version 0.8.0**<br/>**September 15, 2020**
3+
**Version 0.8.1**<br/>**September 22, 2020**
44

55
*Copyright © 2020 by Blockchain Commons, LLC*<br/>*Licensed under the "BSD-2-Clause Plus Patent License"*
66

@@ -10,7 +10,7 @@
1010

1111
* [Introduction](#introduction)
1212
* [General Functionality](#general-functionality)
13-
* [Generate Random Seeds](#generate-random-seeds)
13+
* [Generating Random Seeds](#generating-random-seeds)
1414
* [Generating Seeds from Provided Entropy](#generating-seeds-from-provided-entropy)
1515
* [Deterministic Randomness](#deterministic-randomness)
1616
* [Compatibility](#compatibility)
@@ -21,7 +21,7 @@
2121

2222
`seedtool` is a command-line tool for creating and transforming cryptographic seeds of the sort commonly used by blockchain applications.
2323

24-
See [`README.md`](README.md) for installation and credits.
24+
See [`README.md`](../README.md) for installation and credits.
2525

2626
## General Functionality
2727

@@ -52,6 +52,8 @@ $ seedtool --in random --out hex
5252
06799f71d16fad08ec5407d32d670147
5353
```
5454

55+
### Bytewords
56+
5557
The Bytewords format can be used in place of `hex`. Unlike hex, where every possible input is a seed, Bytewords includes error detection.
5658

5759
```
@@ -83,7 +85,7 @@ deli-need-cats-taxi-dice-door-webs-vows-free-zest-legs-wall-half-waxy-trip-oval-
8385
$ seedtool --in hex --out btwm 279b18d0282aefe845fb83e956eed8a6
8486
dindcstidedrwsvsfeztlswlhfwytpolmossrkhl
8587
```
86-
88+
### Outputs & Counts
8789
An output format `--out` and count `--count` may be specified. Count may be in [1-1024] and the default `count` is 16. For the `hex` and Bytewords (`btw`, `btwu`, `btwm`) output formats, the count is the number of bytes generated. For other output formats, `count` is the number of "output units" (e.g., bits, cards, die rolls, etc.)
8890

8991
```
@@ -139,6 +141,7 @@ $ seedtool --out cards --count 5
139141

140142
**✅ NOTE:** Playing cards may be duplicated; it is as if each card is drawn from a freshly shuffled deck.
141143

144+
### Low & High
142145
Sequences of random integers may be generated. By default, `--count` is 16, `--low` is 0, and `--high` is 9.
143146

144147
`low` < `high` < `256`
@@ -159,6 +162,8 @@ $ seedtool --out ints --count 8 --low 1 --high 100
159162
76 15 25 57 99 41 4 95
160163
```
161164

165+
### BIP39
166+
162167
BIP39 can be used as an output format. The default `--count` is 16 bytes (128 bits, 12 words), but may be any multiple of 2 in [12,32].
163168

164169
```
@@ -177,6 +182,8 @@ $ seedtool --out bip39 --count 32
177182
mind knock evoke recycle payment snack pear party mean rubber open work rug trophy federal connect indicate security release three buzz buddy motion game
178183
```
179184

185+
### SSKRs
186+
180187
SSKR can be used as an output format. By default `--count` is 16 bytes (128 bits, 20 words), but may be any multiple of 2 in [16-32]. By default a single 1-of-1 share is generated. This is the same as running `seedtool --out sskr --group-threshold 1 --group 1-of-1`.
181188

182189
```
@@ -240,6 +247,8 @@ tuna acid epic gyro into knob brag cusp aqua slot film each horn cash sets hang
240247

241248
When the `--in` option is used, seedtool takes one or more arguments and uses them to construct the seed. If no arguments are given on the command line, it reads input from stdin and uses what it reads to construct the seed. In the examples below, the end of input to stdin is marked by `^D` on its own line.
242249

250+
### Hex & Bytewords
251+
243252
When the input format is `hex` or Bytewords (`btw`, `btwu`, `btwm`), the construction is the identity function (passthrough.)
244253

245254
```
@@ -262,6 +271,8 @@ dindcstidedrwsvsfeztlswlhfwytpolmossrkhl
262271
279b18d0282aefe845fb83e956eed8a6
263272
```
264273

274+
### Other Inputs
275+
265276
For the other input formats, each "unit" of the input (bit, digit, card, etc.) is converted to a byte and placed in an array. The SHA256 is then taken of the resulting array, yielding a deterministic seed. This seed is then used to generate a cryptographic seed of `count` bytes.
266277

267278
```
@@ -346,6 +357,8 @@ $ seedtool --in ints 71 22 95 6 23 65 27 10 67 16
346357
a38385ba7a67b7f5882b37f75b43c2df
347358
```
348359

360+
### Piping Output & Input
361+
349362
Output of one call to seedtool can be piped into another.
350363

351364
```
@@ -367,6 +380,8 @@ $ cat dice.asc
367380
4435442555226432
368381
```
369382

383+
### Count Options
384+
370385
If a smaller or larger seed is desired, the `--count` option specifies how many bytes it contains.
371386

372387
```
@@ -392,6 +407,8 @@ $ seedtool --in cards --count 20 6c2c3hthacts6d4hkhtd2d7c6c3sqs6h
392407
731e0a4c76189b2b55f4c705ccbb0105d3ee72c0
393408
```
394409

410+
### Inputs for BIP39 & SSKR
411+
395412
`bip39` and `sskr` output formats can be combined with the `random` (default) input format. If the `--count N` option is used with the `hex` or Bytewords (`btw`, `btwu`, `btwm`) input formats, it results in a seed of `N` bytes being generated and used.
396413

397414
```
@@ -613,7 +630,7 @@ $ seedtool --in sskr "tuna acid epic gyro brag aqua able able able hill code dut
613630
5d1c30bbc6f3cfd070067b63c851ffe7
614631
```
615632

616-
Seedtool also provides the `--deterministic S` option, which takes a string `S`, produces the SHA256 hash of that string, and then uses that to seed it's own cryptography-quality random number generator it uses for the rest of its run. This means that seeds generated by seedtool with the same `--deterministic` input will yield the same results.
633+
Seedtool also provides the `--deterministic S` option, which takes a string `S`, produces the SHA256 hash of that string, and then uses that to seed its own cryptography-quality random number generator, which it uses for the rest of its run. This means that seeds generated by seedtool with the same `--deterministic` input will yield the same results.
617634

618635
```
619636
#
@@ -797,7 +814,7 @@ UR:CRYPTO-SEED/OEADGDHHGTPKFXLGHHLBPYMHLFRYHLPLSSRKPKAOTPIECFFDENTNJNWNPF
797814

798815
`seedqrcode.png`:
799816

800-
![](manual-images/seedqrcode.png)
817+
![](../manual-images/seedqrcode.png)
801818

802819
The payload of a UR is [CBOR](https://tools.ietf.org/html/rfc7049) encoded as [Bytewords](https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-012-bytewords.md). If you wish to examine the CBOR encoding, you can use seedtool to decode the Bytewords payload of a UR. In this example we use the seed above, but only decode the part after the slash as Bytewords.
803820

0 commit comments

Comments
 (0)