empira / PDFsharp-1.5

A .NET library for processing PDF
MIT License
1.28k stars 588 forks source link

SHA1 is now used in place of MD5 to be FIPS complaint. #115

Closed jaredglaser closed 1 year ago

jaredglaser commented 4 years ago

PDFSharp does not work when the Local Security Policy is set in certain configurations. Specifically when "System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing" is set to "Enabled".

rjdunnill-atwork commented 1 year ago

We find that with this fix applied, password-encrypted PDF documents cannot be opened.

ThomasHoevel commented 1 year ago

We find that with this fix applied, password-encrypted PDF documents cannot be opened.

I expected that. MD5 is needed to open existing documents, even if better methods are used to encrypt new files.

Set Local Security Policies with care. Use this patch only when MD5 is not needed for old documents.

rjdunnill-atwork commented 1 year ago

Even documents encrypted with the patch will not open.

ThomasHoevel commented 1 year ago

It seems the PR is incomplete and not thoroughly tested, so I close it for now.