npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ecc-messaging-scheme-package

v1.0.12

Published

A system that encrypts and decrypts data packets with the elliptic curve cryptography (ECC) for others to utilize and download.

Readme

ECC-Messaging-Scheme-Package

A system that encrypts and decrypts data packets with the elliptic curve cryptography (ECC) for others to utilize and download.

Where to download:

typescript/javascript

https://www.npmjs.com/package/ecc-messaging-scheme-package

Python

https://pypi.org/project/ecc-messaging-scheme-package/

Classes

We have one main class, ECCM class, which combines our ECC class and our Encrypt/Decrypt, and curve initialization(initializePublicEnv) functions.

The ECC Class:

  • Responsible for generating/loading private key
  • Get current users public key from cookies or create a new one and save
  • Gets shared key using diffie hellman when given another users public key
  • Clear cookies containing private key for current instance.

Encrypt/Decrypt:

  • Given a key and text it encrypts/decrypts text using AES

initializePublicEnv function:

  • Inizalites a point and an ecc curve: secp256k1

ECCM class:

  • Main interface for users
  • Users can initialize curve
  • Get shared keys
  • Run encryption/decryption using ECCDH

Examples:

How to instaciate a ECC object. This creates a randomly generate private key for each user and is store in their cookies. The main param is a uuid string.

let ecc1 = new ECCM("1");
let ecc2 = new ECCM("2");

This is how you get a users public key and access the x coordinate.

ecc1.ECC.getPublicKey();
console.log(ecc1.ECC.getPublicKey()['x'])

This is how you create a point, when you already have a previsouly generated external keys

let randomKey = new ecc_math.ModPoint(
  58245954963044076335222193032419637688317373475605757277584156718458924469103n,
  12764036181290433088658499435961200322530176588733628912045896254235383420282n
);

Given another key this is how you generate a shared key

ecc2.generateSharedKey(randomKey);
console.log(ecc2.ECC.getSharedKey())

Finally once the shared key is set you can encrypt and decrypt as follows:

const cipher = ecc2.encrypt("It's working")
console.log(cipher);
console.log(ecc2.decrypt(cipher));

Disclaimer

Use at Your Own Risk.