Skip to content

Node crypto blocks the event loop #77

Description

@ChadKillingsworth

Is your feature proposal related to a problem? Please describe.
Unfortunately node crypto operations block the event loop. We use signed JWTs for internal service authentication and end up signing thousands of JWTs. For performance, we've had to fork and write our own JWT library simply to offload the crypto operations to separate threads in Node JS using https://github.com/ronomon/crypto-async.

To assist this work I contributed back the RSA sign and verify functions to the crypto-async library: ronomon/crypto-async#7

Describe the solution you'd like
A library such as crypto-async is definitely not something ready for every use case. However, I'd like the option to utilize it with this library. Specifically, I'm simply looking for extension points so that I can use a custom crypto library.

Describe alternatives you've considered
Because the node native crypto operations are blocking, there are very few options. I'd rather contribute to a standards based open source library that supports this than maintain my own.

Additional context
While guidance would be needed on the correct approach, I'd be willing to do the work to add this feature.

  • i have searched the configuration section for this feature and couldn't find it
  • i have searched the issues tracker on github for similar requests and couldn't find anything related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions