@@ -12,62 +12,8 @@ This implementation is binary compatible with the reference implementation found
1212This crate does not require the standard library (i.e. no_std capable) and can be easily used for bare-metal programming.
1313
1414## Demo
15- A demo application is located in the ` examples ` folder to demonstrate the use of the library.
16- This demo application can be used in the console as follows:
17-
18- ```
19- # Key generation
20- # Generates `mykey.prv`, `mykey.pub` with merkle tree height 10 and winternitz parameter 2
21- cargo run --release --example lms-demo -- genkey mykey 10/2 --seed 0123456701234567012345670123456701234567012345670123456701234567
22-
23- # Signing
24- # Generates `message.txt.sig`
25- cargo run --release --example lms-demo -- sign mykey message.txt
26-
27- # Signing (fast_verification)
28- # Generates `message.txt_mut`, `message.txt_mut.sig`
29- HBS_LMS_MAX_HASH_OPTIMIZATIONS=1000 HBS_LMS_THREADS=2 cargo run --release --example lms-demo \
30- --features fast_verify -- sign_mut mykey message.txt
31-
32- # Verification
33- # Verifies `message.txt` with `message.txt.sig` against `mykey.pub`
34- cargo run --release --example lms-demo -- verify mykey message.txt
35- ```
36-
37- The SST extension can be used as follows:
38-
39- ```
40- # Key generation: prepare
41- # Generates intermediate node, generates or reads the tree identifier (init_tree_ident 1/0), and uses "mykey" as filename base.
42- # One dedicated signing entity has to create the common L-0 tree identifier (--init_tree_ident=1) before other signing entities
43- # can generate their subtrees.
44- #
45- # The following example uses two HSS levels, first with tree height = 10 / Winternitz = 8, second with 5 / 2.
46- # First, a signing entity (here: 1 of 8) creates the tree identifier
47- cargo run --release --example sst-demo -- prepare_keygen mykey 10/8,5/2 --ssts=1/8 --auxsize=2048 \
48- --seed=c912a74bc8c5fc1b2a73b96e6ce1eb2317dc9aa49806b30e --init_tree_ident
49- # The signing instance index is 3 of total 8, and this signing entity will use the tree identifier and use another secret seed.
50- # This will use "mykey.5.prv" and "mykey.5.aux" for private key and aux data, and "mykey_treeident.bin" to write the tree identifier
51- seq 2 8 | xargs -i{} cargo run --release --example sst-demo -- prepare_keygen mykey 10/8,5/2 --ssts={}/8 --auxsize=2048 \
52- --seed=1eb2317dc9aa49806b30e578436d0f659b1f5c912a74bc8c
53-
54- # Key generation: finalize
55- # After all signing entities have created their intermediate node values, the public key can be generated.
56- # This will use mykey.5.pub to write the public key for signing entity index 5.
57- cargo run --release --example sst-demo -- finalize_keygen mykey 5
58-
59- # Signing
60- # Generates `message.txt.sig` using mykey.5.prv
61- cargo run --release --example sst-demo -- sign mykey.5 message.txt
62-
63- # Verification
64- # Verifies `message.txt` with `message.txt.sig` against `mykey.5.pub`
65- cargo run --release --example sst-demo -- verify mykey.5 message.txt
66-
67- # Verification can as well performed with lms-demo
68- # Verifies `message.txt` with `message.txt.sig` against `mykey.5.pub`
69- cargo run --release --example lms-demo -- verify mykey.5 message.txt
70- ```
15+ Two demo applications are located in the ` examples ` folder to demonstrate the use of the library.
16+ The examples are the [ lms-demo] ( scripts/lms-demo.sh ) and the [ sst-demo] ( scripts/sst-demo.sh ) .
7117
7218## Naming conventions wrt to the IETF RFC
7319The naming in the RFC is done by using a single character.
0 commit comments