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

ed448-js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ed448-js

Pure JS/TS library with Ed448 for EdDSA

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ed448-js GitHub license Tests npm version Coverage Status Monthly Downloads

Pure JavaScript/TypeScript implementation of the Ed448 elliptic curve (RFC 8032) for EdDSA signature. Uses the jsbn library for big integer operations. Uses jssha for SHAKE256 hash calculation.

Installation

Using npm:

npm install ed448-js

or yarn:

yarn add ed448-js

Then include it in your code:

import createEd448 from "ed448-js";

Usage

const Ed448 = createEd448();

getPublicKey(privateKey)

Calculate public key from a provided private key

const privateKey = crypto.randomFillSync(new Uint8Array(57));
const publicKey = Ed448.getPublicKey(privateKey);

The private key can be any random generated byte-array of length 57

sign(privateKey, message, context?): number[]

Calculate the EdDSA signature. The result is represented as plain number array (length: 114). It can be converted using Buffer.from, or Uint8Array.from.

verify(publicKey, message, signature, context?): boolean

Verify the EdDSA signature.

Keywords

FAQs

Package last updated on 25 Jan 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