Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@noble/ed25519

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@noble/ed25519

Fastest JS implementation of ed25519. Independently audited, high-security, 0-dependency EDDSA, X25519 ECDH, ristretto255 & scalarmult

  • 1.6.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @noble/ed25519?

@noble/ed25519 is a JavaScript library for the Ed25519 public-key signature system. It provides functionalities for key generation, signing, and verification using the Ed25519 algorithm, which is known for its high performance and security.

What are @noble/ed25519's main functionalities?

Key Generation

This feature allows you to generate a new pair of public and private keys using the Ed25519 algorithm.

const { generateKeyPair } = require('@noble/ed25519');

(async () => {
  const { publicKey, privateKey } = await generateKeyPair();
  console.log('Public Key:', publicKey);
  console.log('Private Key:', privateKey);
})();

Signing

This feature allows you to sign a message using a private key. The resulting signature can be used to verify the authenticity of the message.

const { sign, generateKeyPair } = require('@noble/ed25519');

(async () => {
  const { privateKey } = await generateKeyPair();
  const message = new TextEncoder().encode('Hello, world!');
  const signature = await sign(message, privateKey);
  console.log('Signature:', signature);
})();

Verification

This feature allows you to verify a signature using the corresponding public key. It ensures that the message was signed by the holder of the private key.

const { verify, generateKeyPair, sign } = require('@noble/ed25519');

(async () => {
  const { publicKey, privateKey } = await generateKeyPair();
  const message = new TextEncoder().encode('Hello, world!');
  const signature = await sign(message, privateKey);
  const isValid = await verify(signature, message, publicKey);
  console.log('Is the signature valid?', isValid);
})();

Other packages similar to @noble/ed25519

Keywords

FAQs

Package last updated on 14 Feb 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc