Hi, I was planning to encrypt my files with GPG for safety before uploading them to the cloud. However, from what I understand GPG doesn’t pad files/do much to prevent file fingerprinting. I was looking around for a way to reliably pad files and encrypt metadata for them but couldn’t find anything. Haven’t found any recommendations on the privacyguides website either. Any help would be appreciated!

Thanks

  • solrize@lemmy.world
    link
    fedilink
    arrow-up
    17
    ·
    edit-2
    6 months ago

    Yes GPG should add appropriate padding (random initialization vector) to not reveal whether two ciphertexts have the same plaintext. It makes no real attempt to conceal that the two plaintexts have the same length. If you want that, best bet is to make all ciphertexts the same length, by padding plaintexts out to 1MB or whatever, and turning off compression. Actually you might first check the manual to see if there is already an option for that. There are a lot, and I no longer keep track.

    Cryptographer’s saying (Silvio Micali, I think): “A good disguise does not reveal the person’s height”. So you are on the right track.

    • MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      arrow-up
      4
      ·
      6 months ago

      I also have media and other binary blobs which I’d like to archive in an encrypted fashion, will GPG suffice? ChatGPT mentioned OpenSSL for this but I’m not sure where that’s taking me.

      • solrize@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        6 months ago

        Openssl really isn’t the right thing for that. GPG is fine for individual files if you don’t mind leaking the approximate length. You may be better off with borg backup depending on your exact use case.

        • MigratingtoLemmy@lemmy.worldOP
          link
          fedilink
          arrow-up
          3
          ·
          6 months ago

          I’m using rclone, do you recommend I run borg on top of it to encrypt said files? And does borg explicitly do what I’m trying to achieve? I’m going to take a look at the documentation, thanks

          • solrize@lemmy.world
            link
            fedilink
            arrow-up
            3
            ·
            6 months ago

            I’m not really familiar with rclone. I just use Borg and it does about everything I could want. You can even ssh mount a Borg repo as a file system and browse the files, though it is read only (you can’t modify anything that way). Obvs you need the decryption key to do that.

            • MigratingtoLemmy@lemmy.worldOP
              link
              fedilink
              arrow-up
              3
              ·
              6 months ago

              I see. I’m using Cryptomator, but I was recently linked to rclone’s in-built encryption, which is probably what I’ll use next. Thanks

              • solrize@lemmy.world
                link
                fedilink
                arrow-up
                3
                ·
                6 months ago

                I will check into rclone again. People keep mentioning it. I think I may have considered it before deciding on borg. But my use case is primarily backup rather than archiving. The two aren’t quite the same.