FoxPro Programming
.pdf file Encryption
Gravatar is a globally recognized avatar based on your email address. .pdf file Encryption
  Kathy
  All
  May 28, 2020 @ 10:45am

Hello there,
I would appreciate your confirmation or suggestion on this.
I have to encrypt my .pdf files and there are so many of them.
I just did a test using wwEncryption and it works perfectly but the size of the encrypted file is almost twice the original so I was wondering if that's the way it should be or if I should take a different approach and what you'd suggest.
Thank you in advance,
Kathy

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Tore Bleken
  Kathy
  May 28, 2020 @ 10:52am

Why don't you zip them with a password?

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Kathy
  Tore Bleken
  May 28, 2020 @ 11:22am

Do you mean using .zip + pw instead of encryption?
Or, zipping the encrypted files and assigning password to them?

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Tore Bleken
  Kathy
  May 28, 2020 @ 11:46am

The first. Using a password implies that the files are encrypted. You will typically end up with smaller files, plus they are encrypted.

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Kathy
  Tore Bleken
  May 29, 2020 @ 06:59am

Thank you Tore,
I've just started looking at Chilkat tools for doing what you suggested.
But would you have any suggestion on how to do it? Any tool or .Net library for instance? Thanks.

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Tore Bleken
  Kathy
  May 29, 2020 @ 07:37am

Personally I prefer VFPCompression. And you can't beat the price. 😃

However, compression is a trivial operation, so if you are familiar with Chilkat, I see no reason why you should not use it.

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Rick Strahl
  Tore Bleken
  May 30, 2020 @ 06:04pm

Depends on how secure you need it.

Stock Zip compression that works universally can be easily broken easily by various tools so it's not much of a deterrant. So unless you either use higher encryption (which doesn't work with built in Zip tools like the Explorer support) it's not going to be very secure.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Tore Bleken
  Rick Strahl
  May 31, 2020 @ 12:23am

So one can claim that the security level for a password protected zip and a password protected pdf is roughly the same.

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Jeff L
  Tore Bleken
  May 31, 2020 @ 08:56am

Looking at Chilkat I see that it can use AES encryption. 7Zip has either ZipCrypto or AES256.

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Rick Strahl
  Jeff L
  May 31, 2020 @ 02:33pm

Yup... But Windows does recognize the AES encryption so if you just try to open the archive in Explorer you'll get a corrupt archive notice which is confusing.

I think the 7Zip self extractor is a good choice to build a self-extracting installer. But that comes with its own set of challenges if there's a policy to not allow external EXEs to run.

No easy straight forward secure solutions for this unless specific tools are mandated or you use an application to handle the compression/encryption on both ends.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Kathy
  Rick Strahl
  Jun 1, 2020 @ 07:45am

Thank you so much for the notes.

For this specific case, Encryption and Decryption are both on my application, so I think I can freely choose the tool I pick.
Still not sure if there is any .NET library out there or no but after Tore's note for VFPCompression and reading Doug's paper on encryption, I took a look at: VFPEncryption and did some quick tests and it looks like using AES, the size of the file won't be increased. But I have not tested the other types yet and after reading your posts, I have an assumption like AES is not a strong choice, is that right?
So, first question is, could VFPEncryption be a good choice for this case?
And if yes, which of its encryption types would you pick for .pdf encryption (below)?
Rijndael\AES 128
Rijndael\AES 192
Rijndael\AES 256
Blowfish
TEA
RC4

And if not, what else you would suggest?
Thanks again,
Kathy

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Rick Strahl
  Kathy
  Jun 1, 2020 @ 01:45pm

AES encryption is fine. You probably want the 256 variants of any encryption you use.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: .pdf file Encryption
  Kathy
  Rick Strahl
  Jun 1, 2020 @ 04:31pm

Thank you so much for your help,
Kathy

© 1996-2024