Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

fix: use node crypto for ed25519 signing and verification #289

Merged
merged 5 commits into from
Dec 1, 2022

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Dec 1, 2022

In node, use the node crypto module for ed25519 signing/verification now that it's in all LTS releases.

Browsers still use the pure-js @noble/ed25519 implementation.

Running the ed25519 benchmark:

Before:

@libp2p/crypto x 484 ops/sec ±0.34% (90 runs sampled)

After:

@libp2p/crypto x 4,706 ops/sec ±0.81% (84 runs sampled)

In node, use the node crypto module for ed25519 signing/verification
now that it's in all LTS releases.

Browsers still use the pure-js `@noble/ed25519` implementation.

Before:

```
@libp2p/crypto x 484 ops/sec ±0.34% (90 runs sampled)
```

After:

```
@libp2p/crypto x 4,706 ops/sec ±0.81% (84 runs sampled)
```
Copy link
Member

@mpetrunic mpetrunic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

src/keys/ed25519.ts Outdated Show resolved Hide resolved
src/keys/ed25519.ts Outdated Show resolved Hide resolved
src/keys/ed25519.ts Outdated Show resolved Hide resolved
achingbrain and others added 2 commits December 1, 2022 11:55
Co-authored-by: Marin Petrunić <mpetrunic@users.noreply.github.com>
src/keys/ed25519.ts Outdated Show resolved Hide resolved
src/keys/ed25519.ts Outdated Show resolved Hide resolved
@mpetrunic
Copy link
Member

🎉

@mpetrunic mpetrunic merged commit 1c623e7 into master Dec 1, 2022
@mpetrunic mpetrunic deleted the fix/use-node-crypto-for-ed25119 branch December 1, 2022 12:29
github-actions bot pushed a commit that referenced this pull request Dec 1, 2022
## [1.0.9](v1.0.8...v1.0.9) (2022-12-01)

### Bug Fixes

* use node crypto for ed25519 signing and verification ([#289](#289)) ([1c623e7](1c623e7))
@github-actions
Copy link

github-actions bot commented Dec 1, 2022

🎉 This PR is included in version 1.0.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants