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

Support OpenSSL FIPS-140 mode by replacing MD5 with SHA256 #878

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

D1plo1d
Copy link

@D1plo1d D1plo1d commented May 19, 2020

Using esm with NodeJS 9.11 compiled against OpenSSL FIPS-140 Module causes this error:

Error: error:060A80A3:digital envelope routines:FIPS_DIGESTINIT:disabled for fips
    at new Hash (internal/crypto/hash.js:28:18)

This can be fixed by using SHA256 instead of MD5 per the OpenSSL FIPS Object Module User Guide:

Other non-FIPS approved algorithms such a Blowfish, MD5, IDEA, RC4, etc. aredisabled in FIPS mode.

Adding FIPS support will allow US government organizations to easily use esm in their node servers.

It is expected that this will cause some performance regression but I'm unclear on whether it will be a noticable difference or not.

For reference regarding the performance question here are some benchmark numbers on sha256 vs md5 in nodejs: https://github.com/hex7c0/nodejs-hash-performance

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

Successfully merging this pull request may close these issues.

None yet

1 participant