Password protected files raising FIPS validation error

Hi,

When we try to load a password protected word document file, ASPOSE throws the following error.
The local policy setting - System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing is enabled. Same error is observed for other objects (CELLS, PDF, etc) as well. Please look into this and provide a solution as soon as possible as we need to provide this solution to a customer immediately.

I am attaching sample word and excel files with password - dharma.

Thanks,
Suresh

Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded. —> System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
at System.Security.Cryptography.RijndaelManaged…ctor()
at xcf014befd8b52c3b.xd855f141beac193d.x4ff197cb52a94cdf(Stream x2fe2b17d7bd979f2)
at xcf014befd8b52c3b.xd855f141beac193d.xcc381ffa3ede662f(String xe8e4b5871d71a79a)
at Aspose.Words.Document.x5d4db34d48fb3129(Stream xcf18e5243f8d5fd3, LoadOptions x27aceb70372bde46)
— End of inner exception stack trace —
at Aspose.Words.Document.x5d4db34d48fb3129(Stream xcf18e5243f8d5fd3, LoadOptions x27aceb70372bde46)
at Aspose.Words.Document.x5d95f5f98c940295(Stream xcf18e5243f8d5fd3, LoadOptions x27aceb70372bde46)
at Aspose.Words.Document…ctor(Stream stream, LoadOptions loadOptions)
Hi Suresh,

Thanks for your inquiry. Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v13.6.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.6.0 and let us know how it goes on your side. I hope, this will help.

LoadOptions option = new LoadOptions();

option.LoadFormat = LoadFormat.Docx;

option.Password = "dharma";

Document doc = new Document(MyDir + "PW+File.docx", option);


I am moving this thread to Aspose.Total forum. My colleagues from Aspose.Cells team will reply you shortly about your query related to Excel document.

Thanks tahir. Have you checked this with the following setting enabled?


The local policy setting - System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing is enabled.
bsuresh:
Thanks tahir. Have you checked this with the following setting enabled?

The local policy setting - System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing is enabled.
Hi,

Thanks for your posting and using Aspose.Cells for .NET

When the above policy is enabled, the following code throws the exception.

C#
string filePath = @"F:\Shak-Data-RW\Downloads\Excel+Password+File.xlsx";

LoadOptions opts = new LoadOptions();
opts.Password = "dharma";
Workbook wb = new Workbook(filePath, opts);


Exception:
An unhandled exception of type 'System.InvalidOperationException' occurred in AsposeProject.exe

Additional information: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.

We have logged this issue in our database for investigation. We will look into it and resolve this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-41840.

Thanks for the update Shakeel. Please let me know as soon as there is an update.

Thanks,
Suresh
Hi Suresh,
bsuresh:
Thanks tahir. Have you checked this with the following setting enabled?

The local policy setting - System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing is enabled.
Please accept my apologies for your inconvenience.

I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-8566 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

Thanks Tahir. Please update me as soon as possible as we need to provide a fix/patch to users.


Suresh
Hi Suresh,

Sure, we will update you via this forum thread once this issue is resolved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

Hi,


Any Update on this problem? How soon can I expect a fix for this? We are having the problem with Word, Excel, PPT and PDF files. Please let me know as our customer env. is configured with FIPS enabled.

Thanks,
Suresh

Hi Suresh,


Thanks for your inquiry.

Regarding WORDSNET-8566, this issue is pending for analysis and is in the queue. Since, the new monthly release of Aspose.Words is about to come out, it could be that our development team is simply too busy in the new release which contains many other important issues. I am afraid, I can’t provide you any reliable estimate at the moment. After the new release, we might be able to schedule your issue for detailed investigation. Rest assured, we will keep you informed of any developments and let you know once your problem is resolved. We apologize for any inconvenience.

Best regards,

Hi,


Regarding CELLSNET-41840, I am afraid, your issue is not resolved yet. However, I have logged your concerns against your issue into our database. I have also asked the concerned developer to provide an update on it or an eta (if possible) for your issue.

Once we have an update on it, we will let you know here.

Thank you.

Hi Suresh,


It is to inform you that our development team has completed the work on the issue (WORDSNET-8566) and has come to a conclusion that this issue and the undesired behavior you’re observing is actually not a bug in Aspose.Words. So, we have closed this issue as ‘Not a Bug’. I am quoting developer’s comment here for your reference:


First thing that FIPS relates to not algorithm itself but rather to algorithm implementation as far as I can understood. I haven’t find MSDN article containing list FIPS compliant algorithm but here few links:

http://blogs.msdn.com/b/icumove/archive/2009/01/31/working-with-fips-in-net-c.aspx

So according to these links (and to my test of exception is thrown) we can’t use RijndaelManaged class which is implementation for AES ciphering, which is used in docx encryption/decryption. Access to not FIPS compliant classes causes exception when FIPS security policy is turned on.

Hi,


The AesCryptoServiceProvider class should be used instead of the RijndaelManaged class for AES encryption algorithm. RijndaelManaged class is not FIPS compliant while AesCryptoServiceProvider is FIPS compliant. Please let me know. If an implementation of AES algorithm is not working in FIPS enabled mode, then it is a bug only. The AesCryptoServiceProvider has been available since .NET 3.5.

Also, please this blog regarding FIPS compliance of AesCryptoServiceProvider:
http://blogs.msdn.com/b/winsdk/archive/2010/05/28/behaviour-of-aescryptoserviceprovider-class-with-fips-policy-set-unset.aspx

Please update me as most of our users use this setting enabled. I expected a positive response after waiting for so many days … :frowning:

Thanks,
Suresh

Hi Suresh,


Please accept my apologies for late response.

Thanks for your inquiry and sharing the detail. We are in communication with our development team and will update you as soon as we have information on this.

Hi Tahir,


Thanks for the update. Please let me know once it has been reviewed.

Thanks,
Suresh

Hi Suresh,


Thanks for your patience. I updated the issue (WORDSNET-8566) with the shared information at this post.

I am afraid your issue has now been postponed till a later date due to some other important issues and new features. We will inform you as soon as there are any further developments.

We apologize for your inconvenience.

Hi,


As I mentioned before, our users use the library in fips setting enabled environment and this issue needs to be resolved in order to open password protected files. Please look into this and let me know as soon as possible.

Thanks,
Suresh

Hi Suresh,


Thanks for your patience. We do understand your situation, however I am afraid, at the moment we can’t provide you the ETA for this issue. I have spoken to the development team about your issue and I am afraid they are unable to commit any ETA at the moment. Our development team is busy with some other important issues and new features. We will inform you as soon as there are any further developments on your issue.

We appreciate your patience and apologize for your inconvenience.

Hi,


Is there any update? Please let me know.

Also, how can these issues be escalated? I think around 3 to 4 issues submitted by me are pending since more than a month.

Thanks,
Suresh

Hi Suresh,


bsuresh:
Is there any update? Please let me know.
Thanks for your patience. I am afraid your issue has now been postponed till a later date due to some other important issues and new features. We will inform you as soon as there are any further developments.

We apologize for your inconvenience.
bsuresh:
Also, how can these issues be escalated?
I am in communication with the development team about escalation of this issue. I will update you as soon as I have information on this.
bsuresh:
I think around 3 to 4 issues submitted by me are pending since more than a month.
I would like to share with you that issues are addressed and resolved based on first come first serve basis. You have reported another issue related to Aspose.Words that is WORDSNET-8671. Please check my reply at following forum link.