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

eciesjs

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eciesjs

Elliptic Curve Integrated Encryption Scheme for secp256k1

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
357K
increased by4.45%
Maintainers
1
Weekly downloads
 
Created

What is eciesjs?

The eciesjs npm package provides functionalities for Elliptic Curve Integrated Encryption Scheme (ECIES) using the secp256k1 curve. It allows for secure encryption and decryption of messages using elliptic curve cryptography.

What are eciesjs's main functionalities?

Key Generation

This feature allows you to generate a new private key and derive the corresponding public key using the secp256k1 curve.

const ecies = require('eciesjs');
const privateKey = ecies.generatePrivateKey();
const publicKey = ecies.getPublicKey(privateKey);
console.log('Private Key:', privateKey.toString('hex'));
console.log('Public Key:', publicKey.toString('hex'));

Encryption

This feature allows you to encrypt a message using a given public key. The encrypted message is returned as a Buffer.

const ecies = require('eciesjs');
const publicKey = '04bfcab2...'; // Replace with actual public key
const message = Buffer.from('Hello, world!');
const encrypted = ecies.encrypt(publicKey, message);
console.log('Encrypted Message:', encrypted.toString('hex'));

Decryption

This feature allows you to decrypt an encrypted message using a given private key. The decrypted message is returned as a Buffer.

const ecies = require('eciesjs');
const privateKey = 'c87509a1...'; // Replace with actual private key
const encryptedMessage = Buffer.from('...'); // Replace with actual encrypted message
const decrypted = ecies.decrypt(privateKey, encryptedMessage);
console.log('Decrypted Message:', decrypted.toString());

Other packages similar to eciesjs

Keywords

FAQs

Package last updated on 28 Nov 2018

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