Skip to content

Commit

Permalink
feat: add npm deployment workflow and update package files
Browse files Browse the repository at this point in the history
  • Loading branch information
isakruas committed Oct 25, 2024
1 parent 3010122 commit 2ce5aee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ecutils
# js-ecutils

**JavaScript Library for Elliptic Curve Cryptography**

`ecutils` is a JavaScript library designed for implementing Elliptic Curve Cryptography (ECC) algorithms, including key exchanges (Diffie-Hellman, Massey-Omura), ECDSA signatures, and Koblitz encoding. This library is suitable for educational purposes in cryptography and for use in secure systems.
`js-ecutils` is a JavaScript library designed for implementing Elliptic Curve Cryptography (ECC) algorithms, including key exchanges (Diffie-Hellman, Massey-Omura), ECDSA signatures, and Koblitz encoding. This library is suitable for educational purposes in cryptography and for use in secure systems.

## Features

Expand All @@ -22,18 +22,18 @@

## Installation

To install `ecutils`, you can use npm:
To install `js-ecutils`, you can use npm:

```bash
npm install ecutils
npm install js-ecutils
```

## Usage

After installing, you can import the library into your JavaScript project:

```javascript
const { core: { Point, EllipticCurve } } = require('ecutils');
const { core: { Point, EllipticCurve } } = require('js-ecutils');

// Example parameters
let p = 23n; // The prime number defining the finite field's order
Expand Down Expand Up @@ -247,7 +247,7 @@ Here are some examples of using the key exchange protocols and other features of
### Encoding and Decoding Messages with Koblitz

```js
const { algorithms: { Koblitz } } = require('ecutils');
const { algorithms: { Koblitz } } = require('js-ecutils');

// Initialize Koblitz with a specific curve
const koblitz = new Koblitz('secp521r1');
Expand All @@ -264,7 +264,7 @@ console.log(decoded_message);
### Digital Signatures with ECDSA

```js
const { algorithms: { DigitalSignature } } = require('ecutils');
const { algorithms: { DigitalSignature } } = require('js-ecutils');

// Create a DigitalSignature instance with your private key
const privateKey = BigInt(123456);
Expand All @@ -285,7 +285,7 @@ console.log(`Is the signature valid? ${isValid}`);
### Diffie-Hellman Key Exchange

```js
const { protocols: { DiffieHellman } } = require('ecutils');
const { protocols: { DiffieHellman } } = require('js-ecutils');

// Alice's side
const alice = new DiffieHellman(12345n);
Expand All @@ -308,7 +308,7 @@ console.log(`Are the shared secrets equal? ${isSharedSecretEqual}`);
### Massey-Omura Key Exchange

```js
const { algorithms: { Koblitz }, protocols: { MasseyOmura } } = require('ecutils');
const { algorithms: { Koblitz }, protocols: { MasseyOmura } } = require('js-ecutils');

// Initialize the Koblitz instance for the elliptic curve 'secp192k1'
const koblitz = new Koblitz('secp192k1');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ecutils",
"name": "js-ecutils",
"version": "0.0.1-alpha.1",
"description": "JavaScript library for Elliptic Curve Cryptography: key exchanges (Diffie-Hellman, Massey-Omura), ECDSA signatures, and Koblitz encoding. Suitable for crypto education and secure systems.",
"keywords": [
Expand Down

0 comments on commit 2ce5aee

Please sign in to comment.