rsconnect icon indicating copy to clipboard operation
rsconnect copied to clipboard

Deprecate MD5 as a checksum algorithm

Open jmcphers opened this issue 6 years ago • 3 comments

We currently use OpenSSL's MD5 algorithm to add content checksums in several places. Generally we use this wrapper:

https://github.com/rstudio/rsconnect/blob/e6a7248acfb76d81e2ffff0837c43c34c70bf959/R/utils.R#L218-L219

However, some systems, most notably RHEL, can be placed into a FIPS compliant mode. The version of OpenSSL on these systems does not include MD5 since it's not considered a secure hash algorithm. Consequently, enabling FIPS mode on these systems removes the content checksums and with them the ability to publish content to Connect.

We should deprecate MD5 as a hash algorithm for content checksums; SHA-256 would be a better choice.

(Internal note: see support ticket 36904)

jmcphers avatar Jun 11 '19 22:06 jmcphers

(Internal note: also see support ticket 38544)

aronatkins avatar Sep 17 '19 13:09 aronatkins

rsconnect shifted to openssl::md5 from digest::digest here (along with other changes): https://github.com/rstudio/rsconnect/pull/116

The digest::digest MD5 algorithm is not bound to the FIPS mode in OpenSSL.

aronatkins avatar Sep 17 '19 15:09 aronatkins

Just a note from the linked PR that when we come to tackle this seriously, some MD5 uses can simply be ripped out in favour of assuming https.

hadley avatar May 08 '23 14:05 hadley