Skip to content

Feature request: Crypto APIs should optionally return bigints #23071

@no2chem

Description

@no2chem

Now that bigint support is part of V8, the crypto APIs should be updated to optionally return bigints instead of buffers.

I've done a bit of testing with N-API and get significantly increased performance, something like 3-4x depending on the algorithm involved, even though I'm using OpenSSL just as Node is to do the hashing: https://github.com/no2chem/bigint-hash

It also seems that providing a one-shot hashing implementation (which just hashes a buffer instead of allocating a Hash object) would improve hashing performance as well.

I'm happy to take a look at submitting a PR for this if this is something that makes sense for node.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.feature requestIssues that request new features to be added to Node.js.stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions