Skip to content

crypto.createDiffieHellman very slow when prime length is big #9379

@Mrpotatosse

Description

@Mrpotatosse

What version of Bun is running?

1.0.30+1424a196f

What platform is your computer?

Linux 5.15.146.1-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

just use this code

import crypto from "crypto";

console.time("prime generate");
const arbitre = crypto.createDiffieHellman(2048);
console.timeEnd("prime generate");

What is the expected behavior?

something like this:

[8.00s] prime generate

What do you see instead?

i do not see nothing, it keeps running forever ( ok not forever i stopped it after 10 minutes )

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnode.jsCompatibility with Node.js APIs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions