New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

curve25519-js

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

curve25519-js

Javascript implementation of Curve25519

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
215K
decreased by-12.45%
Maintainers
1
Weekly downloads
 
Created

What is curve25519-js?

The curve25519-js npm package provides JavaScript implementations of the Curve25519 elliptic curve cryptography functions. It is primarily used for key exchange and digital signatures, offering a high level of security and performance.

What are curve25519-js's main functionalities?

Key Pair Generation

This feature allows you to generate a public and private key pair using the Curve25519 algorithm. The generated keys can be used for secure communication.

const curve = require('curve25519-js');
const keyPair = curve.generateKeyPair();
console.log(keyPair);

Shared Secret Computation

This feature allows you to compute a shared secret between two parties using their private and public keys. This shared secret can be used for encrypted communication.

const curve = require('curve25519-js');
const aliceKeyPair = curve.generateKeyPair();
const bobKeyPair = curve.generateKeyPair();
const sharedSecret = curve.sharedKey(aliceKeyPair.private, bobKeyPair.public);
console.log(sharedSecret);

Signature Generation

This feature allows you to generate a digital signature for a given message using a private key. The signature can be used to verify the authenticity of the message.

const curve = require('curve25519-js');
const keyPair = curve.generateKeyPair();
const message = 'Hello, World!';
const signature = curve.sign(keyPair.private, message);
console.log(signature);

Signature Verification

This feature allows you to verify a digital signature using the corresponding public key. It ensures that the message has not been tampered with and is from the expected sender.

const curve = require('curve25519-js');
const keyPair = curve.generateKeyPair();
const message = 'Hello, World!';
const signature = curve.sign(keyPair.private, message);
const isValid = curve.verify(keyPair.public, message, signature);
console.log(isValid);

Other packages similar to curve25519-js

Keywords

FAQs

Package last updated on 02 Aug 2019

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