I am looking for a safe method to encrypt a local file on my machine. Let's say I have a file containing my logins and passwords -- how can I make sure that the encryption is reasonably sufficient in case this file falls into the wrong hands? I have a Yubikey that supports PGP application, and on it, I have a signature, encryption, and authentication PGP subkeys. I would like to find a protocol that would protect the file even when someone may get the encrypted file AND the USB token.

Ideally, I would like to find a protocol that would not require a specific program/script to create such encryption. The first thing that came to mind is to encrypt it with a symmetric key using PGP (GPG) and then encrypt the output using my own PGP public key. I know I should not invent the wheel when it comes to cryptography; hence, I am looking for established protocols or the combination thereof that have been tested with time and have all their shortcomings well known.

I am aware of password manager apps, but most of them cannot be used offline. The one that can (KeePass2) is a PITA to set up for a 2FA with Yubikey, especially on Linux which is my primary OS. Any alternative?

  • $\begingroup$ I'm not sure that this is the correct site. Maybe the superuser is better. Have you ever heard VeraCrypt? $\endgroup$ – kelalaka Nov 28 '19 at 8:31
  • 3
    $\begingroup$ I think what @kelalaka is going for is that this site usually handles more the theoretical side of cryptography. That means you probably won't hear us say "use gpg with these parameters to achieve security" but rather "public-key encryption as offered by gpg can securely be stacked with multiple independent keypairs and an adversary (likely?) has to break all schemes to acquire any information about the ciphertext for a CPA model". $\endgroup$ – SEJPM Nov 28 '19 at 14:22
  • $\begingroup$ @SEJPM, I was indeed aware of the fact that I shouldn't ask specific implementation questions on this site, but I figured my question was not specific enough not to be posted here. I will repost it in 'superuser' forum, but I would still like to get crypto experts' opinion on whether doing this 2-step (symmetric + asymmetric) encryption would be strong enough for the states purpose. $\endgroup$ – Proto Ukr Nov 29 '19 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.