aegisvault 0.4.8
Convert otpauth URI file to Encrypted Aegis vault JSON file
- Documentation for the Aegis vault format can be found here
- The codebase was initially imported from the Gnome Authenticator project.
- This repo is after https://github.com/louib/aegis-vault-rs
- The Encrypted Aegis vault JSON files produced are Vault version 1, Database version 3.
- The included decrypt.py (decrypts an encrypted Aegis JSON file into plain JSON) is from: https://github.com/beemdevelopment/Aegis/raw/refs/heads/master/docs/decrypt.py
- The included
showdb.pyshows the JSON content of thedbfield of an encrypted Aegis JSON file.
Documentation
Overall JSON structure for Vault version 1 (current):
The db field stores the vault contents, either as a base64-encoded string of the encrypted content, or as an object with a version field, a list of entries, and a list of groups (this object gets encrypted and base64-encoded).
The JSON header field:
JSON header for unencrypted db:
JSON entry:
If a uuid is not provided, it will be generated on import. Other fields in database version 4: note (""), favorite (false), icon_mime (null), icon_hash (null).
JSON groups (db version 3 onwards):
Install
Install standalone single-binary
Install with cargo
If not installed yet, install a Rust toolchain, see https://www.rust-lang.org/tools/install
Direct from crates.io
cargo install aegisvault
Direct from repo
cargo install --git https://github.com/pepa65/aegisvault
Static build (avoiding GLIBC incompatibilities)
The binary will be at target/x86_64-unknown-linux-musl/release/aegisvault
Install with cargo-binstall
Even without a full Rust toolchain, rust binaries can be installed with the static binary cargo-binstall:
# Install cargo-binstall for Linux x86_64
# (Other versions are available at <https://crates.io/crates/cargo-binstall>)
Only a linux-x86_64 (musl) binary available: cargo-binstall aegisvault
It will be installed in ~/.cargo/bin/ which will need to be added to PATH!
Usage
aegisvault 0.4.8 - Convert otpauth-URI file to Encrypted Aegis JSON on stdout
Usage: aegisvault <URI_FILE>
Arguments:
<URI_FILE> The otpauth-URI input
Options:
-h, --help Print help
-V, --version Print version
- Unencrypted otpauth-URI files consist of lines with this format (the position of the parameters can be changed):
otpauth://TYPE/NAME?secret=SECRET&algorithm=HMAC_ALGORITHM&digits=LENGTH&period=PERIOD&issuer=ISSUERTYPEcan betotp/hotp/steam/motp/yandex.NAMEshould not contain a:(colon) or%(percent), as it messes with URI encoding.SECRETis the base32 RFC3548 seed (without the=padding!) for the OTPs.TYPE,NAMEandSECRETare mandatory.HMAC_ALGORITHMis one of:SHA1(the default),SHA256orSHA512(orMD5for MOTP, withperiod10).LENGTHfordigitsis most often6(default), but can be set to5(for Steam),7(Twitch) or8(Microsoft).PERIODis almost always30(the default).HMAC_ALGORITHM,LENGTHandPERIODshould be given but are optional (if not given will be set to their default values).
- The otpauth URI RFC: https://www.ietf.org/archive/id/draft-linuxgemini-otpauth-uri-02.html
License
GPLv3