-
Notifications
You must be signed in to change notification settings - Fork 808
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
[Bug]: E2EE uses deprecated SHA-1 algorithm for it's CSR, breaking RHEL 9 compat #5989
Comments
I guess I found the offending line, in desktop/src/libsync/clientsideencryption.cpp Line 1380 in e83c2c8
I'm not a C++ guy, but I've seen that evp_sha1() and evp_sha256() functions both exist in the source code.
Mind having a look at this ? Also, I've seen in desktop/src/libsync/clientsideencryption.cpp Line 1284 in e83c2c8
Since the certificates are signed for 7300 days in NC server, that gives us certificate validity until 2030. Security specialsts say that 2048 bits keys won't be secure anymore by those dates. Here's a quick speed test between 2048, 3072 and 4096 bit keys on a Xeon 6338 hosted VM:
As you can see, signature is really slower between various RSA keys (factor 6 up to 13), but verification speed isn't that highly impacted (factor 2 to 3). So I'm advocating to higher the default RSA key size to at least 3072 bits to be future proof. [EDIT] Both algorithm are secure AFAIK in 2023. Changing the RSA key size shouldn't have any implications as it would only be used for new encryption setups. |
@deajan thanks for reporting this |
@mgallien Thanks for your kind reply. I've actually had a look at the other E2EE branches of the desktop client, still using SHA-1, but then again there might be branches out of the nextcloud git ;) I am just puzzled that not more users ran into this specific issue, since RHEL 9 has been released 15 months ago. The whole Redhat ecosystem (RHEL/CentOS Stream/Oracle/Alma/Rocky/Fedora) won't sign SHA-1 CSRs anymore. Bonne continuation Matthieu ;) |
@mgallien I just saw your work for better e2ee init in 3.10-rc3. |
Quite surprised that this bug has been up for more than a half year (orignal bug first reported in april nextcloud/end_to_end_encryption#424). Do none of the nextcloud customers run RHEL 9 or other distros with good security standards ? |
Any news about this ? |
Really ? SHA-1 in 2024 ? This was reported back in August 2023, so it's been one year and still no way to use E2EE on RHEL 9 and alikes unless one doesn't care about security. |
Bug description
I've been trying to activate E2EE for a couple of weeks now on a fresh NC 27 setup, without luck.
After fidling around, I extracted the CSR sent by NC desktop app, and realized it uses SHA-1 algorithm.
Since my Nextcloud server is RHEL 9, it doesn't allow SHA-1 usage since Redhat deprecated it because of collision attacks (beginning with 2011, more viable attacks succeed in 2019).
So far, I cannot get E2EE to work unless I reconfigure my server to allow legacy crypto algorithms, which I obviously won't.
Steps to reproduce
Expected behavior
NC Desktop client should generate a 2048 bits (or 4096) private key, and create a CSR based on that key, using SHA-256 hashing algorithm.
This CSR can be signed by current versions of openssl.
Which files are affected by this bug
Operating system
Windows
Which version of the operating system you are running.
Windows 10 22H2
Package
MSI installer
Nextcloud Server version
27.0.2.1
Nextcloud Desktop Client version
3.9.3
Is this bug present after an update or on a fresh install?
Fresh desktop client install
Are you using the Nextcloud Server Encryption module?
Encryption is Enabled
Are you using an external user-backend?
Nextcloud Server logs
Additional info
Original issue I worked on I'll link to the earlier bug reports I've documented: nextcloud/end_to_end_encryption#424
Original issue on NC desktop: #5910
No response
The text was updated successfully, but these errors were encountered: