Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ed25519_dalek
Advanced tools
WebAssembly port of Ed25519_dalek, a Rust implementation of Ed25519 signatures
Readme
WebAssembly port of Ed25519_dalek, a Rust implementation of Ed25519 signatures.
npm i ed25519_dalek
deno run --allow-net https://deno.land/x/ed25519_dalek/test/deno/test.ts
About 6x to 8x faster than @noble/ed25519
git clone https://github.com/hazae41/ed25519-dalek-wasm && cd ed25519-dalek-wasm/bench/deno && npm run bench
cpu: Apple M1 Max
runtime: deno 1.26.0 (aarch64-apple-darwin)
benchmark time (avg) (min … max) p75 p99 p995
--------------------------------------------------------------------------- -----------------------------
ed25519_dalek 1.1.11 (unserialized) 289.94 µs/iter (281.71 µs … 370.79 µs) 290.75 µs 311.5 µs 320.08 µs
@noble/ed25519 1.7.1 2.1 ms/iter (1.95 ms … 2.77 ms) 2.14 ms 2.3 ms 2.39 ms
summary
ed25519_dalek 1.1.11 (unserialized)
7.25x faster than @noble/ed25519 1.7.1
ed25519_dalek 1.1.11 (serialized) 332.09 µs/iter (323.17 µs … 474 µs) 332.38 µs 361.46 µs 368.25 µs
@noble/ed25519 1.7.1 2.07 ms/iter (1.95 ms … 2.32 ms) 2.12 ms 2.26 ms 2.26 ms
summary
ed25519_dalek 1.1.11 (serialized)
6.23x faster than @noble/ed25519 1.7.1
Not as fast as supercop.wasm (Emscripten port of @orlp/ed25519, a C implementation of Ed25519)
git clone https://github.com/hazae41/ed25519-dalek-wasm && cd ed25519-dalek-wasm/bench/node && npm i && npm run bench
ed25519_dalek 1.1.12 (unserialized) 4,072 ops/sec ±0.06% (12215 samples)
ed25519_dalek 1.1.12 (serialized) 3,544 ops/sec ±0.09% (10638 samples)
@noble/ed25519 1.7.1 485 ops/sec ±0.23% (1447 samples)
supercop.wasm 5.0.1 5,902 ops/sec ±0.2% (17698 samples)
node:crypto (unserialized) 7,102 ops/sec ±1.6% (21228 samples)
node:crypto (serialized) 5,648 ops/sec ±0.52% (16914 samples)
import * as Ed25519 from "ed25519_dalek";
import {
Ed25519Keypair,
Ed25519PublicKey,
Ed25519Signature,
} from "ed25519_dalek";
// -- Wait for WASM to load --
Ed25519.initSyncBundledOnce();
// -- Generating an identity --
const keypair = new Ed25519Keypair();
const identity = keypair.public(); // Ed25519PublicKey
// -- Signing & Verifying --
const bytes = new TextEncoder().encode("hello world"); // Uint8Array
const proof = keypair.sign(bytes); // Ed25519Signature
const verified = identity.verify(bytes, proof); // boolean
const bytes = new Ed25519Keypair().to_bytes();
const keypair = Ed25519Keypair.from_bytes(bytes);
const bytes = keypair.public().to_bytes();
const identity = Ed25519PublicKey.from_bytes(bytes);
const bytes = keypair.sign(input).to_bytes();
const proof = Ed25519Signature.from_bytes(bytes);
https://github.com/WebAssembly/binaryen/releases
cargo install wasm-pack
npm install
npm run build
FAQs
WebAssembly port of Ed25519_dalek, a Rust implementation of Ed25519 signatures
The npm package ed25519_dalek receives a total of 0 weekly downloads. As such, ed25519_dalek popularity was classified as not popular.
We found that ed25519_dalek demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.