tomb

the crypto undertaker
git clone git://parazyd.org/tomb.git
Log | Files | Refs | README | LICENSE

30_kdf.sh (905B)


      1 #!/usr/bin/env zsh
      2 
      3 export test_description="Testing tomb with KDF key"
      4 
      5 source ./setup
      6 
      7 if test_have_prereq KDF; then
      8     test_export "kdf"
      9     test_expect_success 'Testing KDF: tomb creation' '
     10         tt_dig -s 20 &&
     11         tt_forge --tomb-pwd $DUMMYPASS --kdf 1 &&
     12         print $DUMMYPASS \
     13             | gpg --batch --passphrase-fd 0 --no-tty --no-options -d $tomb_key \
     14             | hexdump -C &&
     15         tt_lock --tomb-pwd $DUMMYPASS --kdf 1
     16         '
     17 
     18     test_expect_success 'Testing KDF: tomb passwd' '
     19         tt passwd -k $tomb_key --kdf 1 \
     20             --unsafe --tomb-old-pwd $DUMMYPASS --tomb-pwd $DUMMYPASSNEW &&
     21         tt passwd -k $tomb_key --kdf 1 \
     22             --unsafe --tomb-old-pwd $DUMMYPASSNEW --tomb-pwd $DUMMYPASS
     23         '
     24 
     25     test_expect_success 'Testing KDF: tomb open & close' '
     26         tt_open --tomb-pwd $DUMMYPASS --kdf 1 &&
     27         tt_close
     28         '
     29 fi
     30 
     31 test_done