Skip to content

"async" argon2 freezes the main event loop #62861

Description

@ChALkeR

Original detect from @deepview-autofix:

Image

To validate:

import { argon2, randomBytes } from 'node:crypto'

const parameters = {
  message: 'password',
  nonce: randomBytes(16),
  parallelism: 4,
  tagLength: 64,
  memory: 65536,
  passes: 1000, // the only thing changed from doc to demonstrate
};

console.log(`Start at ${new Date().toISOString()}`)
argon2('argon2id', parameters, () => {})
console.log(`Unblocked at ${new Date().toISOString()}`) // this takes 10 seconds on my Air

cc @panva perhaps?

Likely too complex for an autofix.

Also does not qualify to be a security bug, hence public.

Activity

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

Metadata

Metadata

Assignees

Labels

cryptoIssues and PRs related to the crypto subsystem.experimentalIssues and PRs related to experimental features.performanceIssues and PRs related to the performance of Node.js.securityIssues and PRs related to security.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions