racket / racket/web-server

Cryptographic hash function security

Open
#68 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
99
Forks
48
PR merge metrics
No merged PRs in 30d

Description

A few places in the web server use cryptographic hash functions, specifically MD5 and SHA1:

Neither MD5 nor SHA1 are recommended anymore for general use as cryptographic hash functions. IIUC, the vulnerabilities in both cases are (so far) only with collisions, not preimages, which I think means some or all of these uses are still ok—but "I think" is not something I like to rely on when it comes to crypto.

I propose that:

  1. We should document the security considerations applicable to each use of cryptographic hash functions.
  2. If MD5 or SHA1 are insecure in any of these applications, we should replace them with better hash functions. Conveniently, racket/base now provides sha256-bytes and sha254-bytes.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing md5-stuffer, web-server/stuffers/hmac-sha1, and web-server/http/id-cookie, then compare their uses with Racket's SHA reference. Determine the security considerations for each use; done means documenting those considerations and replacing any unsafe MD5 or SHA1 use with an appropriate supported hash function.

Written by the indexing model from the issue text.

Assessment

Domain
cryptography, security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.