Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow hashing files for checksums with FIPS compliant algorithms #446

Closed
ferventcoder opened this issue Oct 2, 2015 · 5 comments
Closed

Comments

@ferventcoder
Copy link
Member

https://groups.google.com/d/msgid/chocolatey/b5ce3f6e-228e-4947-be17-0dd201e05716%40googlegroups.com?utm_medium=email&utm_source=footer

I'm encountering errors using chocolatey on systems with FIPS Algorithm Policy enabled. The setting can be found in the registry if:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\fipsalgorithmpolicy
is set to 1

It can also be configured via the Policy Editor at:
Local Policies > Security Options > System Cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing

It appears that chocolatey is attempting to use MD5 for some operation which isn't allowed in this configuration.

You may see this with the error: Error deserializing response of type chocolatey.infrastructure.app.configuration.ConfigFileSettings.

@ferventcoder ferventcoder added this to the 0.9.10.x milestone Oct 2, 2015
@ferventcoder ferventcoder changed the title Allow hashing files for checksums with different algorithms Allow hashing files for checksums with FIPS compliant algorithms Oct 2, 2015
@ferventcoder ferventcoder modified the milestones: 0.9.10, 0.9.10.x Oct 11, 2015
@ferventcoder ferventcoder self-assigned this Jan 18, 2016
@octaviandum
Copy link

Hi there,

We are having this issue at our organization. Is there any chance that this will be fixed to be a FIPS compliant hashing algorithm in the future?

@ferventcoder
Copy link
Member Author

Note the milestone on the right. Note that is the next version. :)

@ferventcoder
Copy link
Member Author

ferventcoder commented Jun 4, 2016

In 0.9.10, set feature flag useFipsCompliantChecksums.

choco feature enable -n useFipsCompliantChecksums.

@ferventcoder
Copy link
Member Author

ferventcoder commented Jun 4, 2016

This was not made a default as it could have undesirable effects. Since everything choco is doing is related to setting and verifying checksums, it really isn't part of what FIPS was meant to combat and isn't out of compliance in doing what it does. However, it's still a good idea to allow folks to have a stronger checksum algorithm. https://blogs.technet.microsoft.com/secguide/2014/04/07/why-were-not-recommending-fips-mode-anymore/

Finally, the .NET Framework’s enforcement of FIPS mode cannot tell whether any particular use of a cryptographic class is not for security purposes and thus not in violation of standards.

ferventcoder added a commit that referenced this issue Jun 5, 2016
Opt out the checksum.exe tool from FIPS algorithm policy because it is
not in violation of the standard - because it doesn't do anything with
encryption or crypto, other than hash a file to determine a way to
uniquely identify it. Unfortunately the .NET Framework doesn't have a
good way to verify this is the case and the Managed cryptos
(SHA256Managed vs SHA256Cng) were never submitted to NIST, so they are
not considered compliant. That's somewhat beside the point - it
doesn't matter what is used for checksumming, it doesn't violate FIPS
because it is only checksumming.

"The .NET Framework's enforcement of FIPS mode cannot tell whether any
particular use of a cryptographic class is not for security purposes
and thus not in violation of standards." - Aaron Margosis, MSFT, "Why
We're Not Recommending 'FIPS Mode' Anymore" -
https://blogs.technet.microsoft.com/secguide/2014/04/07/why-were-not-recommending-fips-mode-anymore/
ferventcoder added a commit that referenced this issue Jun 5, 2016
Chocolatey should function in organizations that require FIPS
compliant algorithms. Although most of what Chocolatey does with the
Crytpo provider is about hashing files and checksums, in the future
that could change, so choco needs to have a feature flip to use a
compliant algorithm.

Provide a helpful warning and error message when the exception
detected is about FIPS. This will help folks running into this error
have a helpful path forward to getting it enabled.

Unfortunately, enabling it by default could have unintended side
effects for existing choco installs that have been tracking current
package files, plus it does have a bit more of a performance
consideration (although still really fast) because it needs to use
P/Invoke methods to use the native Windows systems calls.

To turn it on, run the following command in 0.9.10+:
`choco feature enable -n useFipsCompliantChecksums`
ferventcoder added a commit that referenced this issue Jun 5, 2016
* stable:
  (GH-446) Enable FIPS Compliant Algorithms
  (GH-446) Opt out checksum tool from FIPS policy
ferventcoder added a commit that referenced this issue Jun 6, 2016
ferventcoder added a commit that referenced this issue Jun 6, 2016
* stable:
  (GH-446) fix specs
@arinzemomife
Copy link

Please how can I fix this error: "The registered delegate for type IXmlService threw an exception. The registered delegate for type IHashProvider threw an exce
ption. Exception has been thrown by the target of an invocation."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants