Skip to content

crypto: random value issues v15 #35722

@panva

Description

@panva
  • Version: v15.0.0
  • Platform: Darwin C02CX0K5MD6V 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
  • Subsystem: crypto

What steps will reproduce the bug?

const crypto = require('crypto')

console.log(crypto.randomFillSync(Buffer.allocUnsafe(16)));

How often does it reproduce? Is there a required condition?

What is the expected behavior?

Buffer gets logged with random values

What do you see instead?

Buffer gets logged with only zeroes

Additional information

Screenshot 2020-10-20 at 18 19 54

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.securityIssues and PRs related to security.

    Type

    No type
    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