upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/Cargo.toml
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2023-09-01 00:00:00 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2023-09-01 00:00:00 +0000
commit96660a90e4cd296a2922d7a547de4cd9d0b1928b (patch)
treee5216e22ee1a3e1653d8d1ecd856f4f03615d6a1 /Cargo.toml
parent6423baebd92e45c9be85157c443dff42e65d8d14 (diff)
feat(login) password login using encrypted nsec
Enables the user to only handle the nsec upon first use of the tool by encrypting it with a password and storing it on disk in an application cache. The approach to encryption draws heavily from that used by the gossip nostr client. - unencrypted nsec is zeroed from memory - a salt is used to defend against rainbow tables - computationally expensive key stretching defends against brute-force attacks of passwords with low entropy. There is UX trade-off between decryption speed and key-stretching computation. This UX challenge is exacerbated in a cli tool as decryption must take place more regularly. Thought was put into the selected n_log and a heavily reduced value is provided for long passwords where security benefits are smaller. A more granular reducing in computation was also considered by rejected to avoided to revealing just how weak a password is as most weak passwords are reused.
Diffstat (limited to 'Cargo.toml')
-rw-r--r--Cargo.toml8
1 files changed, 8 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index e745441..6d8ebaf 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,16 +13,24 @@ categories = ["command-line-utilities","git"]
13 13
14[dependencies] 14[dependencies]
15anyhow = "1.0.75" 15anyhow = "1.0.75"
16chacha20poly1305 = "0.10.1"
16clap = { version = "4.3.19", features = ["derive"] } 17clap = { version = "4.3.19", features = ["derive"] }
17dialoguer = "0.10.4" 18dialoguer = "0.10.4"
18directories = "5.0.1" 19directories = "5.0.1"
20keyring = "2.0.5"
21nostr = "0.23.0"
22passwords = "3.1.13"
23scrypt = "0.11.0"
19serde = { version = "1.0.181", features = ["derive"] } 24serde = { version = "1.0.181", features = ["derive"] }
20serde_json = "1.0.105" 25serde_json = "1.0.105"
26zeroize = "1.6.0"
21 27
22[dev-dependencies] 28[dev-dependencies]
23assert_cmd = "2.0.12" 29assert_cmd = "2.0.12"
24duplicate = "1.0.0" 30duplicate = "1.0.0"
25mockall = "0.11.4" 31mockall = "0.11.4"
32once_cell = "1.18.0"
33rexpect = "0.5.0"
26serial_test = "2.0.0" 34serial_test = "2.0.0"
27test_utils = { path = "test_utils" } 35test_utils = { path = "test_utils" }
28 36