Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 561 Bytes

File metadata and controls

25 lines (17 loc) · 561 Bytes

rsa-pow-js-project

This project demonstrates generating an RSA keypair, performing a simple Proof-of-Work (POW) to find a nonce so that sha256(nickname+nonce) starts with a number of zeros, signing the resulting message with the private key and verifying with the public key.

Notes:

  • Default POW difficulty is 4 leading zeros (i.e. 0000...).
  • For unit tests we reduce difficulty to keep tests fast; production/demo run uses difficulty 4.

Install

npm install

Run demo

npm start

Run tests

npm test