Coder Social home page Coder Social logo

ecdsa-signatures's Introduction

Installation

Install all dependencies using npm i or yarn install.

Scripts

This repository has three scripts:

  • node generate Generates a private and public key, exports them in hex (with both the X and Y coordinates of the public key)
  • node sign Signs a message with a private key
  • node verify Verifies a message given a public key was signed with the corresponding private key

Setting Up

To setup, first generate yourself a public key and a private key by running node generate. Keep your private key to yourself and provide your public key to anyone who would like to verify your signatures.

Signing Messages

In the sign.js file, fill in your private key and the message you would like to sign. Run this script using node sign to get the r and s components of your signature.

Decrypting Messages

In the verify.js, fill in the public key X and Y coordinates corresponding to the person who signed the original message. Change the message variable to be the same message they initially signed. Finally, fill in the r and s components of their signature. Run node verify to determine if they actually signed this message.

ecdsa-signatures's People

Contributors

dan-nolan avatar

Watchers

James Cloos 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.