Project

General

Profile

Actions

Feature #91554

open

Refactor SHA1 dependent components

Added by Tizian Schmidlin over 4 years ago. Updated almost 4 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Security
Start date:
2020-06-02
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Hello there,

as lined out in this article, SHA1 will soon be dropped from SSH since the standard is considered prone to collisions.

I think, since we are in an early phase of TYPO3 11 developments, it would be good to deprecate all methods and classes related to sha1 (or even md5 for that matter) that are still available in core.

Challenges:
  1. TYPO3 uses the sha1 built-in PHP function 32 times, mentions "sha1" 35 as separate string (either array hash, value or function argument) thoughout the core (that's 10 more instances of sha1 being called and two instances less as a string mention than back in TYPO3 9.5)
  2. TYPO3 also still uses md5 functions around 169 times (!) in the core
  3. Cryptographically safer functions might create quite a strain on the servers running the new code (on my benchmarks, using hash('sha256' instead of sha1 was approximately 0.6% slower).
Chances:
  1. Ensure more cryptographically safe software
  2. Get rid of really old code
  3. (Bragging rights for being the first CMS to throw out all old and cryptographically unsafe functions from its core?)

Best Regards
Tizian

Actions #1

Updated by Oliver Hader over 4 years ago

Thanks for bringing up this topic - in general I'd agree switching to more collision resistant cryptographic hashing algorithm.

  • of course for everything that is exposed/transported in public (e.g. signatures for HTTP actions, cache hash, ...)
  • probably okay for internal identifiers (caching, file-names, etc. - storage requirements for e.g. database fields would have to be extended)
  • careful consider for functionality affecting multiple versions, e.g. export file from TYPO3 v8 (using md5) to be imported in TYPO3 v11 (new hash algo) - probably we have to use/introduce/raise some "API version" for those purposes
Actions #2

Updated by Oliver Hader over 4 years ago

  • Category set to Security
Actions #3

Updated by Oliver Hader over 4 years ago

Concerning digest signatures (currently HMAC based on SHA1) we might consider

  • either changing from encryptionKey to PKI signatures, e.g. based on ed25519
  • or switching to SHA3-512
Actions #4

Updated by Benni Mack almost 4 years ago

  • Target version changed from 11.0 to Candidate for Major Version
Actions

Also available in: Atom PDF