Giter Site home page Giter Site logo

core-ed448's Introduction

core-ed448

MODIFIED TO FETCH CORE BLOCKCHAIN!

NOT THE CLASSICAL ED448!

PLEASE DO NOT USE OUTSIDE CORE BLOCKCHAIN

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.

core-ed448's People

Contributors

todesstille avatar iskander508 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.