buttercup/buttercup-core

Upgrade vault format for improved compression

perry-mitchell opened this issue ยท 4 comments

Currently the vault format is just a list of lines of history, detailing what's happened in the vault. This doesn't compress very well - or rather, it grows very quickly. Larger vaults take much longer to decrypt/encrypt.

Find a new way to format vaults so that some history is maintained whilst not keeping thousands of lines.

May I ask some questions? Where can we have a look at the vault format? What is the advantage of saving the vault entries as a list of lines of history? I thought the vault format would just be some kind of encrypted JSON string or something like that...

The vault format uses lines of history for a number of reasons:

  • Merging between different change sets is possible (and practical)
  • Records of old passwords and values are still possible to retrieve
  • Potential time-travel feature for the whole vault

That being said, we're considering moving to a more normalised format.. It may in fact become JSON, let's see. Too early to tell right now. We thought it might be easiest going forward to have it that way, but you still end up writing complex logic so why not just program merging of JSON vaults etc.. ๐Ÿ˜…

Hi there! The vault has grown in size 50MB+ after six month of use, and after export all data and import to new vault getting new 350KB vault. That is not useful now, on android I getting "out of memory" error. I think the best way would be to keep only a certain period of history, or give the user the choice not to store history.

Done, as VaultFormatB is now available. Not set to default yet, but will be soon.