README
¶
pass
This is a password manager run entirely in the terminal.
The password manager stores an encrypted list of entries -- where each entry can store its name and unlimited tags, URLs, usernames, passwords, security questions, and notes. You can search the names, tags, and URLs. You can view and easily copy to your clipboard any field of an entry. You can see a list of entries that have reused passwords.
starting for the first time
- Download the the latest release or use git:
git clone https://github.com/ksharnoff/pass.git. - Run
go mod tidyto install all necessary dependencies. - Use
createEncr.goto create and encrypt your file of passwords the first time,go run createEncr.go. If you forget your password, you cannot decrypt the file later.- If you would like to change your password or the key generation parameters in the future, use
changeKey.gobygo run changeKey.go. You will have to editchangeKey.goandencrypt/encrypt.goto change the key generation parameters.
- If you would like to change your password or the key generation parameters in the future, use
- Now, run the password manager now with
go run pass.go. I recommend compiling it bygo build pass.goto run it quickly as an executable,./pass.
The encrypted passwords will be stored in a file named pass.yaml in the pass directory.
TUI tview
I used the TUI tview. I used four types of primitives: input fields, lists, text boxes, and forms. In order to format them, I used flexes, pages, and grids. I used grids only to add borders around the primitives.
The password manager will scale to work on any sized terminal, with any font. I recommend using a monospaced font, for example, Monaco.
encryption and file writing
All of the entries are marshaled as if they were going to be written to a YAML file. Instead, that list of bytes is entirely encrypted before being written to a file. Then, after reading from the file, the list of bytes is decrypted and turned into the list of entries. The password manager password (the master password) must be inputted before viewing any fields. The program verifies that the correct password was inputted if it can successfully unmarshal the data into a list of entries; the master password is never stored.
Argon2 is used to make the key and the entries are encrypted with AES-256.
This password manager is unsuitable for cloud computing or a shared computer as the decrypted information is stored in the memory. I do not believe this to be a significant risk on a single user computer.
The encryption is done in encrypt.go which must be in a directory called encrypt inside the greater pass directory as encrypt.go is used for several other files.
commands
All of the commands are called through the input field at the bottom. # means any number and str is written to mean any set of characters. The terminal in these photos is 84x28 with the font Monaco, 18pt.
/open #

/open is used to view an entry. It will include time information if it is known. Passwords and security questions have their values printed in black text, one can highlight it to see the values.
/copen #

/copen is also used to view an entry, you select one of the fields and it copies itself to your clipboard.
/new

\new has a form at the top with two input fields for the entry name and its tags. Then there are buttons for making a new field (URL, username, password, or security question), saving, quitting, deleting, and making notes.
You must name the entry in order to save it.
There is no limit to the number of URLS, usernames, passwords, or security questions you can make. They are all encrypted the same, the values for passwords and security questions are blotted out when viewed.
/copy #
/copy is the same as /new except fields are already filled in with the information of entry #.
/edit #

/edit is used for editing an entry already made. It is a list with each field of the entry. You can select a field to edit, delete, or add more fields.
/find str

/find is used to search the name, tags, and URLs of all the entries for an inputted string. It then returns the list of entries that contain that string. The entries are printed out following the same format as /list. The example above is searching for “ak”.
/list

/list is used to list all of the entries. /list is useful to see the index number of an entry to open it. /list prints the entries in three columns of a fixed size, using some string and math trickery.
/pick and /picc

/pick and /picc look mostly identical. They are lists of all the entries, like /list, except you can select and open an entry. /pick will /open an entry while /picc will /copen an entry.
/comp # #

/comp # # looks for duplicate passwords or answers to security questions between two entries.
/reused

/reused shows any duplicate passwords or answers to security questions from all of the entries.
miscellaneous info
mouse usage and clipboard
When the mouse is enabled in tview in order to change the focus or click buttons, you cannot select and copy any text.
For ease of copying, there is /copen #, where you select one of the fields from the list and it copies to your clipboard. Once you quit out of viewing the entry, your clipboard is cleared.
time values
Times are saved for the date created, date last modified, and the date last opened.
Date last modified is only updated if any edits are made and saved in /edit.
Date last opened is modified if the entry is opened by /open # or /copen #.
These dates also work as a security measure in case there are irregularities.
circulation
In each entry there is a boolean named Circulate which determines if the entry shows up in /list, /pick, and /picc. All commands that work on entries still work (/edit, /open, /copy, etc.). This can be used to reduce clutter of old entries without changing the entry numbers of later ones.
Documentation
¶
There is no documentation for this package.