Skip to content

Commit

Permalink
WIP tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aewag committed Sep 12, 2024
1 parent 17819d1 commit b3ee873
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/lms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,27 @@ jobs:
package: ${{ github.workflow }}
target: ${{ matrix.target }}
features: ${{ matrix.features }}

# Demo scripts
demos:
needs: set-msrv
strategy:
matrix:
rust:
- stable
features:
- default

runs-on: ubuntu-latest
defaults:
run:
# Cross mounts only current package, i.e. by default it ignores workspace's Cargo.toml
working-directory: .
steps:
- uses: actions/checkout@v4
- uses: RustCrypto/actions/cargo-cache@master
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- run: sh lms-demo.sh
- run: sh sst-demo.sh
5 changes: 5 additions & 0 deletions scripts/lms-demo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
touch message.txt

cargo run --release --example lms-demo -- genkey mykey 10/2 --seed 012345670123456701234567012345670123456701234567
cargo run --release --example lms-demo -- sign mykey message.txt
cargo run --release --example lms-demo -- verify mykey message.txt
10 changes: 10 additions & 0 deletions scripts/sst-demo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# touch message.txt

cargo run --release --example sst-demo -- prepare_keygen mykey 10/8,5/2 --ssts=1/8 --auxsize=2048 \
--seed=c912a74bc8c5fc1b2a73b96e6ce1eb2317dc9aa49806b30e --init_tree_ident
seq 2 8 | xargs -i{} cargo run --release --example sst-demo -- prepare_keygen mykey 10/8,5/2 --ssts={}/8 --auxsize=2048 \
--seed=1eb2317dc9aa49806b30e578436d0f659b1f5c912a74bc8c
cargo run --release --example sst-demo -- finalize_keygen mykey 5

cargo run --release --example sst-demo -- sign mykey.5 message.txt
cargo run --release --example sst-demo -- verify mykey.5 message.txt

0 comments on commit b3ee873

Please sign in to comment.