VES CLI Utility
Overview
VESvault: Simple, Safe and Secure Encryption At-rest
- Simple
- Browser-based PIN entry unlocks the User's cryptographic keychain.
- The User can easily sync the encryption keys among multiple personal devices and browsers/apps.
- Safe
- The user can add redundant key locations for safety from key loss.
- VESrecovery™ for recovering the key chain via friends' assistance without compromising the User's privacy.
- Secure
- Brute force protection with VESlocker hardware-grade PIN security.
- End-to-end encryption using industry standard algorithms with cryptographic grade keys.
VES utility (default command:
ves
) is a platform independent command line tool, an interface to
libVES.c API library.
The latest source code of libVES.c and VES utility can be found in the
GitHub repository.
Pre-build for *nix and exe for win32 are available in the
releases.
VES Utility Usage
ves -A myaccount@gmail.com -a ves://demo/myaccount@gmail.com/ -n -upf my.key
Log in to an existing VESvault account myaccount@gmail.com
(VES utility will prompt to enter the password and the primary VESkey).
Create a new App Vault within an App Domain demo
, assign an external ID myaccount@gmail.com
(If an App Vault with the selected external ID already exists, an error message will be shown).
Generate a random VESkey for the App Vault, save it to a local file my.key
.
ves -A myaccount@gmail.com -l
List all Vault Items stored in the Primary Vault.
ves -A myaccount@gmail.com -a ves://demo/myaccount@gmail.com/ -upf my.key
Output the currently stored VESkey for the App Vault ves://demo/myaccount@gmail.com/
to a file my.key
.
ves -a //demo/myaccount@gmail.com -uf my.key -o myItem1 -i "My Secret" -s "myfriend1@yahoo.com/My Friend <myfriend1@yahoo.com>"
Unlock the App Vault ves://demo/myaccount@gmail.com/
using a VESkey stored in a local file my.key
.
Store a secret text "My Secret" in a User Vault Item ves://demo/myItem1
(the App Domain for the item defaults to the App Vault's domain).
If the item didn't exist, it will be created.
Share the item with an App Vault ves://demo/myfriend1@yahoo.com/
, so the VESkey for ves://demo/myfriend1@yahoo.com/
can be used to decrypt the content of this item.
If this App Vault didn't exist, create a temporary App Vault key belonging to
a VESvault account myfriend1@yahoo.com
.
If this VESvault account didn't exist, create a pending account and send a setup link to an email address myfriend1@yahoo.com
.
ves -a //demo/myaccount@gmail.com/ -uf my.key -l
List all Vault Items stored in the App Vault ves://demo/myaccount@gmail.com/
.
ves -a //demo/myaccount@gmail.com/ -uf my.key -o myItem1 -ip
Print the content of the Vault Item ves://demo/myItem1
. If the item didn't exist, or wasn t shared with App Vault ves://demo/myaccount@gmail.com/
,
an error will be thrown.
ves -a //demo/myaccount@gmail.com/ -uf my.key -o myItem1 -s myfriend2@yahoo.com/
Share the Vault Item ves://demo/myItem1
with an App Vault ves://demo/myfriend2@yahoo.com/
.
If this App Vault doesn't exist, an error will be thrown.
The sharing status of the item with any other App Vaults will remain unchanged.
ves -a //demo/myaccount@gmail.com/ -uf my.key -o myItem1 -S myaccount@gmail.com/,//x-my-domain/myfriend3@yahoo.com/myfriend3@yahoo.com
Share the Vault Item ves://demo/myItem1
with App Vaults ves://demo/myaccount@gmail.com/
and ves://x-my-domain/myfriend3@yahoo.com/
.
The latter App Vault will be automatically created for user myfriend3@yahoo.com
if it didn't exist.
If the item was shared with any other vaults, the sharing will be removed.
ves -a //demo/myaccount@gmail.com/ -uf my.key -o myItem1 -X
Explore the Vault Item ves://demo/myItem1
– display various information about the item in a human readable format.
ves -a //demo/myaccount@gmail.com/ -uf my.key -o myCipher1 -e -Pf test.txt -Cf encrypted.ves -s myfriend1@yahoo.com/
Create a stream cipher with a random key using the default algorithm. Store the cipher key in a User Vault Item ves://demo/myCipher1
.
Encrypt an existing local file test.txt
with the cipher, save the encrypted content to a local file encrypted.ves
.
Share the cipher key with an existing App Vault /demo/myfriend1@yahoo.com
.
ves -a //demo/myaccount@gmail.com/ -uf my.key -o myCipher1 -d -Pf decrypted.txt -Cf encrypted.ves -ipf cipher.key
Decrypt a local file encrypted.ves
using the stream cipher info stored in the Vault Item ves://demo/myCipher1
.
Save the encrypted content to a local file decrypted.txt
.
Save the raw binary cipher key data to a local file cipher.key
.
ves -a //demo/myaccount@gmail.com/ -uf my.key -o myCipher2 -c AES256GCM1K -if cipher.key -e -Pf test.txt -Cf encrypted2.ves
Create a stream cipher with a raw key loaded from a file cipher.key
using algorithm AES256GCM1K
.
Store the cipher info in a User Vault Item ves://demo/myCipher2
.
Encrypt an existing local file test.txt
with the cipher, save the encrypted content to a local file encrypted2.ves
.
ves -a //demo/myaccount@gmail.com/ -uf my.key -o myCipher2 -D
Delete the Vault Item ves://demo/myCipher2
.
ves -a //demo/myaccount@gmail.com/ -uf my.key -l
List all Vault Items stored in the App Vault ves://demo/myaccount@gmail.com/
.
Demo App Vault
The existing App Vault ves://demo/demo/
, with App VESkey demo
, can be used by anyone for test purposes.
Command Line Options
Authentication and Vault Management
-a URI, --account=URI
Select an
App Vault.
REF is an App Vault URI,
[ves:]//domain/externalID/
.
-u VESKEY, --unlock=VESKEY
-uf FILE
Read the VESkey from FILE.
-up, -upf FILE
Print the VESkey that unlocks the
App Vault selected with
-a.
-A LOGIN, --primary=LOGIN
Select a
Primary Vault.
LOGIN is an email address associated with a VESvault account, or a Primary Vault URI (
ves:////userRef
).
-T TOKEN, --token=TOKEN
Authorize the API session using a token created by another session or by delegate login.
-Tp, -Tpf FILE
Print the Session Token assigned to the current API session.
-L, --lock
Authorize the API session but keep the Vault locked.
-n, --new
Create an App Vault identified by -a.
Vault Item Operations:
-o URI, --vault-item=URI
Select a Vault Item for further actions. URI is a VES Vault Item URI,
[ves:][//domain/]externalId
or [ves:]///internalId
.
-i DATA, item=DATA
Set the raw content of the Vault Item
-if FILE
Content for the Vault Item is to be retrieved from FILE.
-ip, -ipf FILE
Print the raw content of the Vault Item
-s URI[, URI...], --share=...
Share the Vault Items with specified Vaults identified by Vault URIs, [ves:][//domain/]externalId/[userRef]
. Any previously existing shares will other vaults will remain intact.
-r URI[, URI...], --unshare=...
Stop sharing the Vault Item with the Vaults identified by URIs. Sharing with any other Vaults will remain intact.
-S URI[, URI...], --set-share=...
Share the Vault Items with the Vaults identified by the URIs, and only with these Vaults. Previously existing shares with any
other Vaults will be removed.
-m JSON, --meta=JSON
Specify plaintext metadata for the Vault Item. 16K size limit applies.
-mp, -mpf FILE
Print JSON plaintext Vault Item metadata.
--delete
Delete the Vault Item
-U, --force
Force the update of the Vault Item. Suppress an error on unsafe operations, such as overwriting a cipher key.
Stream Cipher Operations:
-c ALGO, --cipher ALGO
Create a new stream cipher key for ALGO.
-cp, -cpf FILE
Print the algorithm of the cipher key.
-cl
List supported stream cipher algorithms.
-z JSON, --cipher-meta=JSON
Specify secret metadata for the cipher key.
-zp, -zpf FILE
Print JSON secret cipher metadata.
-e, --encrypt
Encrypt a file or a stream using the stream cipher key.
The plaintext input is specified by -P, defaults to STDIN.
The ciphertext output is specified by -C, defaults to STDOUT.
-d, --decrypt
Decrypt a file or a stream using the stream cipher key.
The ciphertext input is specified by -C, defaults to STDIN.
The plaintext output is specified by -P, defaults to STDOUT.
-P[f] FILE, --plaintext=FILE
Select a plaintext file for -e | -d
-C[f] FILE, --ciphertext=FILE
Select a ciphertext file for -e | -d
Vault Key Operations:
-k URI, --vault-key=URI
Select a Vault Key for further operations. The URI is a Vault URI,
[ves:][//domain/]externalId/[userRef]
.
-l, --list
List all Vault Items shared with the Vault Key.
-v VESKEY, --veskey=VESKEY
Supply a VESkey for any generated Vault Keys, and/or to unlock the key specified with -k.
-vp, -vpf FILE
Print the VESkey that unlocks the Vault Key.
-g, --generate
Force generation of a new Vault Key to replace the selected Vault Key. API restrictions apply.
-y KEY, --private-key=KEY
Supply a PEM private key for the generated Vault Key.
-yf FILE
Private key from the PEM FILE.
-yp, -ypf FILE
Print the PEM private key, non-encrypted if the
Vault Key is unlocked, encrypted otherwise.
-Y[p], --public-key, -Ypf FILE
Print a PEM public key.
-G ALGO, --key-algo=...
Specify an algorithm to generate the Vault Key.
-Gp, -Gpf FILE
Print the name of the selected Vault Key algorithm.
-Gl
List supported Vault Key algorithms.
--delete
Delete the Vault Key. API restrictions apply.
-R, --rekey
Rekey the Vault Key – re-encrypt all Vault Items with the
active key for the matching Vault. Useful for temp keys, and for lost and found keys.
-K, --propagate
Propagate the Vault Key – share the Vault Item that stores the VESkey with the owner of the Vault Key.
-M, --manual
Manual key management – disable automatic propagation and rekeying for
Temporary Vault Keys.
Action Modifiers:
-p, --print
Print the current value of the preceding option.
-f FILE, --flie=...
Read a value from, or write to, a file.
-F FDESC, --fd=...
Read a value from, or write to, a file descriptor.
Miscellaneous:
-x, --debug
Display debugging messages.
-xx
More detailed debugging.
-q, --quiet
Suppress error messages, except for arg errors.
Return error codes only.
-V, --version
Print version information and exit
-h, --help
Print this help screen and exit
Exit Codes
- 0: Success
- 64: Command line argument error
- 65: I/O error
- libVES error code indicating the error