Re: [CODE4LIB] Encrypting jpg, png or PDF

2023-04-04 Thread ross-spencer
Just one more thing!

Of course, it may be difficult to find a user-experience that works well for 
yourselves and your users. 

An even more generic approach is to ZIP the files with encryption. This has an 
added benefit of allowing you to send packets of data, not just individual 
files. I don't know how many software clients offer this, but 7-zip (7z) for 
Windows on the desktop makes encryption easy enough: https://www.7-zip.org/

You can:

- Add file to archive -> Select "Encryption" -> Provide a password -> Save

And like the previous example send the zip and send your password securely 
another way. Your user may need 7z - my default Windows client doesn't play 
well with the encrypted zip but maybe others have a better experience?

More info: 
https://hilfe.uni-paderborn.de/Dateiverschluesselung_mit_7-ZIP_unter_Windows_10/en

A word of warning about ZIP is that you will likely want ensure your filenames 
don't contain sensitive information as the file lists within the zip remain 
visible even when encrypted: https://superuser.com/a/70325

NB. You may also want to look for a password generator to generate randomized 
passwords you send to anyone to increase security further.

All the best,
Ross


Re: [CODE4LIB] Encrypting jpg, png or PDF

2023-04-04 Thread Joe Hourclé
PDF actually has encryption as part of the standard, so I would recommend 
searching in the help for whatever PDF tool you’re using, as it’s more likely 
that whomever you send it to will be able to unencrypt it.  They should be 
prompted for a password when trying to open the file, rather than converting it 
to an unencrypted form (which might defeat the purpose of encrypting it, unless 
you only cared about while it’s in transit)

It might also be called ‘protect with password’ or ‘security’.

There’s also a concept of an ‘PDF envelope’ in which the document is just an 
encrypted collection of other documents to be protected, but after having sent 
those to doctors and their not being able to access the individual files, I’d 
have to recommend instead encrypting each one individually.

-Joe

Sent from a mobile device with a crappy on screen keyboard and obnoxious 
"autocorrect"

> On Apr 3, 2023, at 9:06 PM, charles meyer  wrote:
> 


Re: [CODE4LIB] Encrypting jpg, png or PDF

2023-04-04 Thread ross-spencer
Hi Charles,

You're likely using in-built features of Word to encrypt those documents; this 
tends to encrypt the payload inside the Word file format wrapper. With JPG or 
PNG at least, you're going to need a generic approach to encryption, so using 
openssl or gpg to encrypt the entire file stream and then transmitting that. 
Pro-PDF tools may have a similar option to Word.

One generic approach that works from Stack Overflow here is to use gpg: 
https://stackoverflow.com/a/31552829/21120938

* Input/encryption (file to send that needs encryption): gpg --output 
encrypted.data --symmetric --cipher-algo AES256 image_data.jpg
* Output/decryption (file to decode): gpg --output image_data.jpg.unencrypted 
--decrypt encrypted.data

You'll be prompted for a password for encrypting the data which you will then 
find a secure way to transmit to your user who will be prompted for that when 
they decrypt the file. 

I have tried it on Linux and Windows, and the experience is roughly the same. 
For Windows installers: https://gnupg.org/download/

I find the subject of encryption really fascinating and its something I want to 
learn more about and form a habit of doing. That being said I don't use it 
regularly at work right now and so I am interested to hear about other's 
processes, and from any corrections/improvements to the above. 

Best,
Ross


[CODE4LIB] Encrypting jpg, png or PDF

2023-04-03 Thread charles meyer
I'm in a bit of a time crunch, but does anyone now how to encrypt a jpg,
png or PDF which contains confidential info?



You can encrypt an MS Word file but I’ve never done that with any of the
above listed formats.



If you are kind enough to post to the list would you also please BCC your
post to me?



Thank you ever so much.



Best,



Charles.



Charles Meyer

Charlotte County Public Library