-
Notifications
You must be signed in to change notification settings - Fork 306
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
DAOSSDE-112 Security: Modifications to use of Cryptography #3923
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a1bba2d
DAOSSDE-112 Security: Modifications to use of Cryptography
dpquigl 52c3b90
Regenerate golden files since padding for the RSA signatures will be …
dpquigl 079b443
Fix golden file generation since PSS will create random salts for sig…
dpquigl 7a3a961
Merge branch 'master' into dpquigl/DAOSSDE-112
dpquigl 23baa93
Merge branch 'master' into dpquigl/DAOSSDE-112
dpquigl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,10 +115,10 @@ extendedKeyUsage = clientAuth | |
function generate_ca_cert () { | ||
echo "Generating Private CA Root Certificate" | ||
# Generate Private key and set permissions | ||
openssl genrsa -out "${PRIVATE}/daosCA.key" 4096 | ||
openssl genrsa -out "${PRIVATE}/daosCA.key" 3072 | ||
chmod 0400 "${PRIVATE}/daosCA.key" | ||
# Generate CA Certificate | ||
openssl req -new -x509 -config "${CA_HOME}/ca.cnf" -days 1095 -sha512 \ | ||
openssl req -new -x509 -config "${CA_HOME}/ca.cnf" -days 365 -sha512 \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the CA cert only valid for a year? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this is considered best practice for internally run and managed CAs. |
||
-key "${PRIVATE}/daosCA.key" \ | ||
-out "${CERTS}/daosCA.crt" -batch | ||
# Reset the the CA index | ||
|
@@ -131,7 +131,7 @@ function generate_ca_cert () { | |
function generate_agent_cert () { | ||
echo "Generating Agent Certificate" | ||
# Generate Private key and set its permissions | ||
openssl genrsa -out "${CERTS}/agent.key" 4096 | ||
openssl genrsa -out "${CERTS}/agent.key" 3072 | ||
chmod 0400 "${CERTS}/agent.key" | ||
# Generate a Certificate Signing Request (CRS) | ||
openssl req -new -config "${CONFIGS}/agent.cnf" -key "${CERTS}/agent.key" \ | ||
|
@@ -151,7 +151,7 @@ function generate_agent_cert () { | |
function generate_admin_cert () { | ||
echo "Generating Admin Certificate" | ||
# Generate Private key and set its permissions | ||
openssl genrsa -out "${CERTS}/admin.key" 4096 | ||
openssl genrsa -out "${CERTS}/admin.key" 3072 | ||
chmod 0400 "${CERTS}/admin.key" | ||
# Generate a Certificate Signing Request (CRS) | ||
openssl req -new -config "${CONFIGS}/admin.cnf" -key "${CERTS}/admin.key" \ | ||
|
@@ -171,7 +171,7 @@ function generate_admin_cert () { | |
function generate_server_cert () { | ||
echo "Generating Server Certificate" | ||
# Generate Private key and set its permissions | ||
openssl genrsa -out "${CERTS}/server.key" 4096 | ||
openssl genrsa -out "${CERTS}/server.key" 3072 | ||
chmod 0400 "${CERTS}/server.key" | ||
# Generate a Certificate Signing Request (CRS) | ||
openssl req -new -config "${CONFIGS}/server.cnf" \ | ||
|
@@ -196,7 +196,7 @@ function generate_test_cert () { | |
|
||
echo "Generating Test Certificate" | ||
# Generate Private key and set its permissions | ||
openssl genrsa -out "${CERTS}/test.key" 4096 | ||
openssl genrsa -out "${CERTS}/test.key" 3072 | ||
chmod 0400 "${CERTS}/test.key" | ||
# Generate a Certificate Signing Request (CRS) | ||
openssl req -new -config "${CONFIGS}/test.cnf" -key "${CERTS}/test.key" \ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the drop in key size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I'm not entirely sure. This was the guidance from the crypto team. I'd imagine its due to the fact that 3072 bit keys are computationally difficult enough to break and since its software not hardware that we can update the number if that turns out not to be true in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think probably a balance between performance and security.
This is what I got on boro-59, there is no option for rsa 3072 size, but it shows the CPU time for the key size:
[boro-59:/home/huakuang]$ openssl speed rsa2048 rsa4096
sign verify sign/s verify/s
rsa 2048 bits 0.000791s 0.000033s 1264.8 30152.7
rsa 4096 bits 0.007899s 0.000121s 126.6 8276.1