Skip to content

crypto: 100,000 iterations of PBKDF2 is insecure #1346

Description

Hello,

workerd (and Cloudflare Workers) limits the number of PBKDF2 iterations to 100,000 to avoid DoS.

We can see the code here: https://github.com/cloudflare/workerd/blob/d1a3c89716591753406923e177b54da3475dd01c/src/workerd/api/crypto-impl-pbkdf2.c%2B%2B#L45C31-L45C37

While I understand the reason, especially in a multi-tenant environment like Cloudflare Workers, 100,000 iterations is far from secure, as per OWASP guidelines, which, in 2023, recommends at least 210,000 iterations for PBKDF2-SHA-512 and 600,000 iterations for PBKDF2-SHA-256, making any application hashing passwords from Cloudflare Workers insecure.

This is why I'm requesting an increase to at least 400,000 iterations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions