-
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #527 from Narrat/optim/kdf
Improve KDF handling
- Loading branch information
Showing
6 changed files
with
158 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env zsh | ||
|
||
export test_description="Testing tomb with pbkdf2 KDF key" | ||
|
||
source ./setup | ||
|
||
if test_have_prereq KDF; then | ||
test_export "kdf" | ||
test_expect_success 'Testing pbkdf2 KDF: tomb creation' ' | ||
tt_dig -s 20 && | ||
tt_forge --tomb-pwd $DUMMYPASS --kdf pbkdf2 && | ||
print $DUMMYPASS \ | ||
| gpg --batch --passphrase-fd 0 --no-tty --no-options -d $tomb_key \ | ||
| xxd && | ||
tt_lock --tomb-pwd $DUMMYPASS | ||
' | ||
|
||
test_expect_success 'Testing pbkdf2 KDF: tomb passwd' ' | ||
tt passwd -k $tomb_key \ | ||
--unsafe --tomb-old-pwd $DUMMYPASS --tomb-pwd $DUMMYPASSNEW && | ||
tt passwd -k $tomb_key \ | ||
--unsafe --tomb-old-pwd $DUMMYPASSNEW --tomb-pwd $DUMMYPASS | ||
' | ||
|
||
test_expect_success 'Testing pbkdf2 KDF: tomb open & close' ' | ||
tt_open --tomb-pwd $DUMMYPASS && | ||
tt_close | ||
' | ||
fi | ||
|
||
test_done |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env zsh | ||
|
||
export test_description="Testing tomb with argon2 KDF key" | ||
|
||
source ./setup | ||
|
||
if test_have_prereq ARGON; then | ||
test_export "argon" | ||
test_expect_success 'Testing argon2 KDF: tomb creation' ' | ||
tt_dig -s 20 && | ||
tt_forge --tomb-pwd $DUMMYPASS --kdf argon2 && | ||
print $DUMMYPASS \ | ||
| gpg --batch --passphrase-fd 0 --no-tty --no-options -d $tomb_key \ | ||
| xxd && | ||
tt_lock --tomb-pwd $DUMMYPASS | ||
' | ||
|
||
test_expect_success 'Testing argon2 KDF: tomb passwd' ' | ||
tt passwd -k $tomb_key --kdf argon2 \ | ||
--unsafe --tomb-old-pwd $DUMMYPASS --tomb-pwd $DUMMYPASSNEW && | ||
tt passwd -k $tomb_key --kdf argon2 \ | ||
--unsafe --tomb-old-pwd $DUMMYPASSNEW --tomb-pwd $DUMMYPASS | ||
' | ||
|
||
test_expect_success 'Testing argon2 KDF: tomb open & close' ' | ||
tt_open --tomb-pwd $DUMMYPASS && | ||
tt_close | ||
' | ||
fi | ||
|
||
test_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters