Skip to content

crypto.scrypt throw error with N = 262144 (logN = 18) #29686

Description

@atom-yang
  • Version: v12.8.0, v10.9.0
  • Platform: Darwin bogon 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
  • Subsystem: crypto

With N = 262144 (logN = 18), crypto.scrypt throw a memory limit exceeded error, even I have increased the maxmem

⇒  node
Welcome to Node.js v12.8.0.
Type ".help" for more information.
> crypto.scryptSync('pw', crypto.randomBytes(32), 32, { N: 262144, r: 1, p: 8, maxmem: 64 * 1024 * 1024 })
Thrown:
Error: error:060B50AC:digital envelope routines:EVP_PBE_scrypt:memory limit exceeded
    at Object.scryptSync (internal/crypto/scrypt.js:55:15)
>
>
> crypto.scryptSync('pw', crypto.randomBytes(32), 32, { N: 262144, r: 1, p: 8, maxmem: 128 * 1024 * 1024 })
Thrown:
Error: error:060B50AC:digital envelope routines:EVP_PBE_scrypt:memory limit exceeded
    at Object.scryptSync (internal/crypto/scrypt.js:55:15)
>
>
>
> crypto.scryptSync('pw', crypto.randomBytes(32), 32, { N: 262144, r: 1, p: 8, maxmem: 256 * 1024 * 1024 })
Thrown:
Error: error:060B50AC:digital envelope routines:EVP_PBE_scrypt:memory limit exceeded
    at Object.scryptSync (internal/crypto/scrypt.js:55:15)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.opensslIssues and PRs related to the OpenSSL dependency.wontfixIssues that will not be fixed.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions