KeePassX Storing Passwords and KeePassX Merging and Syncing Databases

SIDENOTE: My favorite way to store a Keepass file. Only have 1 file (and use whatever password or cert you feel is secure). Store the keepass file in any folder on your Dropbox account (or similar cloud storage – a common one that is supported by K2A, I like dropbox best as its syncing algorithm has never failed me – ever). Then for PC use simply access the keepass file thru there. On an Android phone (sorry I dont use IOS/Iphone, but im sure similar app exists) download the Dropbox App and login to it then exit it, then download an app called Keepass2Android 0.9.6 (or the newer version ) – ill call it K2A for short. All of these are in the Google PlayStore. Then tell it open your file thru dropbox. Then to get the latest version of the database file in the K2A app, simply click on the settings button at the top right (or wherever) and select Sync Database.

TIP/IMPORTANT NOTE NOT TO MESS THINGS UP: You might have keepass installed on multiple devices and phones etc… Never ever try to edit them at the same time and save them at the same time. Open one, edit it, save it. Open the other. But never Open one Keepass on a PC, and on another PC. Then edit both and save both. If you accidentally did that – it should warn you that the save location is different then when you opened it, and it should save to a new file… So now you will have 2 files, with small differences… The fix if you did that: Merge – Read below on merging.

How I store/remember my passwords

Download links:

How I store/remember my passwords (Yah I dont mind sharing with you. Nor do I care if I tell you my method, why? good luck hacking my Master Key & if you do congrats! Ill feel pretty stupid if you do though 🙂 )

First off I recommend KeePass for Anyone for password storage (saving it all in human memory is impossible now adays – and keeping little sticky notes of your passwords is unsecure)

Keepass stores everything in one super encrypted file using a single master key (a password/passphrase or a key file)

So my recommendation, is have a keepass file on your Dropbox. That way you can have your passwords always available. Dropbox has features that will always update to make sure the file on your computer/android device/iphone are always up to date. Also keepass exists as an app for every platform from PC to Linux to MAC to Android to iPhone. Keepass stores passwords as enteries (so you can add many notes to your keepass enteries, username, password, other notes, even attachments).

Good keyshortcuts:
Control-I – Insert new entry
Control-E – Search
Control-R – Merge/Sync
Control-S – Save

NOTE: When making an entry, a good shortcut so you dont have to enter your password twice, is this. Enter it once, then press the little box that shows your password, hit it two times. The first click reveals your password. The second click copies what you had in first field to second field (where you have to renter your password), all this automatically. Why does it do it? Simple… IF you seen it already, who cares if you need to reenter it again. Philosophy is key with Cryptography.

About Syncing/Merging:

The key is a merging algo that will try to combine 2 databases (or more) to have the same contents using a complex algorithm.

Before Syncronizing/Merging Databases: Make sure the passwords/Master Keys are the same to each database file you want to sync up.
Understand that the syncs are time based.

Lets say you have out of sync databases. But you need to conserve all of the notes.
Just use the built in Feature

DB.kdbx is in sync on PC1 and PC2 (they are both saved on dropbox)
Then PC2 drops off network.
You add new enteries to PC1 and PC2 DB.kdbx

First (optional):
Make a new folder called “PreMerge”
Put DB.kdbx from PC1 and call it DB-1.kdbx
Put DB.kdbx from PC2 and call it DB-2.kdbx
Copy the folder “PreMerge” to a new folder called “Merge”
Why? So that PreMerge will contain the original ones (you also have the original ones on each PCs dropbox saved as DB.kdbx files)

Open up either DB-1 or DB-2 via Keepass (lets say you open up DB-1)
Then go to File->Syncronize->With File (Or just Press Control-R)
Now select the other file that you didnt open. Now since you opened up DB-1 just select DB-2.
Or to get equally the same results, just do a Control Select (or shift select) to select both DB-1 and DB-2

NOTE: you can select more then 2 files to sync, and it will sync all the files

Notes about the sync:
1. If you did a mass delete (or a delete) in any of the synced up databased, the delete will show up in the end result
2. Its time based, so if you did a mass delete, then manually readded each entry in another. The end result will be that you have everything
3. Keep a copy of the originals before the merge (Thats why I made a “PreMerge” folder)

More details about Sync and Merge (Straight from the Dev

* After synchronizing two files A and B, both A and B are up-to-date (i.e. KeePass saves the merged data to both locations when performing a synchronization).

The synchronization algorithm is rather complex and it would take many pages to describe in detail how it’s working. Developers interested in this can have a look into the KeePass source code. Here are the most important properties of the synchronization algorithm:

* In order to decide which copy of an object is the latest one, KeePass mainly uses the last modification time of the object (which KeePass updates automatically each time the object is changed).
* The synchronization is performed on entry level. This e.g. means that a combination of user name / password is always consistent (synchronization on field level will not be implemented, because combinations could become inconsistent with this).
* In case of parallel updates and collisions, KeePass tries to store all information in an appropriate place. For example, when you have an entry E in a database A, make a copy B of A, change E in B, change E in A, and synchronize A and B, then E in A is treated as current and the changes made to E in B are stored as a history version of E (see tab ‘History’ in the entry dialog), i.e. the changes made in B aren’t lost.

3 thoughts on “KeePassX Storing Passwords and KeePassX Merging and Syncing Databases – Favorite Android App

Leave a Reply

Your email address will not be published. Required fields are marked *