@@ -19,10 +19,10 @@ SMALL_MEM_LIMIT_KBYTES=4194304
1919
2020
2121echo " Generating first preimage/key"
22- first_key=$( ./target/release/wskdf-cli output-random-key -n $FIRST_PREIMAGE_NBITS --preimage-output first-preimage --key-output - --salt-input salt --ops-limit $MONTHS_LONG_OPS --mem-limit-kbytes $LARGE_MEM_LIMIT_KBYTES --params-output first-key-params.json)
22+ first_key=$( ./target/* / release/wskdf-cli output-random-key -n $FIRST_PREIMAGE_NBITS --preimage-output first-preimage --key-output - --salt-input salt --ops-limit $MONTHS_LONG_OPS --mem-limit-kbytes $LARGE_MEM_LIMIT_KBYTES --params-output first-key-params.json)
2323
2424echo " Generating second preimage/key"
25- second_key=$( ./target/release/wskdf-cli output-random-key -n $SECOND_PREIMAGE_NBITS --preimage-output second-preimage --key-output - --salt-input salt --ops-limit $SECONDS_LONG_OPS --mem-limit-kbytes $SMALL_MEM_LIMIT_KBYTES --params-output second-key-params.json)
25+ second_key=$( ./target/* / release/wskdf-cli output-random-key -n $SECOND_PREIMAGE_NBITS --preimage-output second-preimage --key-output - --salt-input salt --ops-limit $SECONDS_LONG_OPS --mem-limit-kbytes $SMALL_MEM_LIMIT_KBYTES --params-output second-key-params.json)
2626
2727echo " Encrypting second preimage"
2828gpg --symmetric --batch --passphrase-fd 0 --cipher-algo AES256 --output encrypted-second-preimage.gpg " second-preimage" <<< " $first_key"
@@ -31,7 +31,7 @@ echo "Generating final keyfile"
3131./scripts/encrypted-keyfile-generate.sh 10M encrypted-final-keyfile.gpg <<< " $second_key"
3232
3333echo " Deriving again second key (sanity check)"
34- second_key=$( ./target/release/wskdf-cli derive-key --preimage-input second-preimage --key-output - --salt-input salt --ops-limit $SECONDS_LONG_OPS --mem-limit-kbytes $SMALL_MEM_LIMIT_KBYTES )
34+ second_key=$( ./target/* / release/wskdf-cli derive-key --preimage-input second-preimage --key-output - --salt-input salt --ops-limit $SECONDS_LONG_OPS --mem-limit-kbytes $SMALL_MEM_LIMIT_KBYTES )
3535
3636echo " Decrypting final keyfile"
3737gpg --decrypt --batch --passphrase-fd 0 --cipher-algo AES256 " encrypted-final-keyfile.gpg" <<< " $second_key" > final-keyfile
@@ -40,10 +40,10 @@ echo "Done"
4040
4141# To decrypt the second-preimage, use:
4242
43- # first_key=$(./target/release/wskdf-cli derive-key --preimage-input first-preimage --key-output - --salt-input salt --ops-limit $MONTHS_LONG_OPS --mem-limit-kbytes $LARGE_MEM_LIMIT_KBYTES)
43+ # first_key=$(./target/*/ release/wskdf-cli derive-key --preimage-input first-preimage --key-output - --salt-input salt --ops-limit $MONTHS_LONG_OPS --mem-limit-kbytes $LARGE_MEM_LIMIT_KBYTES)
4444# gpg --decrypt --batch --passphrase-fd 0 --cipher-algo AES256 "encrypted-second-preimage.gpg" <<< "$first_key" > second-preimage-recovered
4545
4646
4747# To brute force the second preimage, use:
4848
49- # INPUT_FILE="encrypted-final-keyfile.gpg" OUTPUT_FILE="final-keyfile-recovered" ./target/release/wskdf-cli find-key --command ./scripts/gpg_decrypt.sh --preimage-output second-preimage-recovered --n-bits $SECOND_PREIMAGE_NBITS --threads 16 --salt-input salt --ops-limit $SECONDS_LONG_OPS --mem-limit-kbytes $SMALL_MEM_LIMIT_KBYTES
49+ # INPUT_FILE="encrypted-final-keyfile.gpg" OUTPUT_FILE="final-keyfile-recovered" ./target/*/ release/wskdf-cli find-key --command ./scripts/gpg_decrypt.sh --preimage-output second-preimage-recovered --n-bits $SECOND_PREIMAGE_NBITS --threads 16 --salt-input salt --ops-limit $SECONDS_LONG_OPS --mem-limit-kbytes $SMALL_MEM_LIMIT_KBYTES
0 commit comments