vault
is a basic password vault that stores encrypted keys and values.
This library demonstrates the basics of storing the encrypted data.
The encryption process includes the following steps to ensure the security of data:
- Generate unique
Salt
and create a hashed key usingArgon2
Hasher - Generate unique
Nonce
- Create an encrypted
cypher
with the hashedkey
andnonce
so that thedata
can not be reverse engineered even if same password is used to encrypt same data multiple times. - Encode the
cypher
as a hex string to store in a file. (demo only)
to run the project, you can run the following command:
cargo run --bin vault
to build and use, you can run the following command:
cargo build --release --bin vault
+------------------------------------------------------------------------------+ | open | create | exit | +------------------------------------------------------------------------------+ 🔒: create Vault Name: default Enter password [hidden]:
Confirm password [hidden]:
() ✅ The vault "default" has been successfully created
+------------------------------------------------------------------------------+
| open | create | exit |
+------------------------------------------------------------------------------+
🔒: open
Enter Vault Name: default
Enter Password [hidden]:
()
✅ The vault is unlocked
+------------------------------------------------------------------------------+
| list | get <key> | push <key> <val> | pop <key> | lock |
+------------------------------------------------------------------------------+
[ default ] 🔓: list
| test1@example.com | ***** |
| test@example.com | ***** |