digitalbazaar / ed25519-verification-key-2020

Javascript library for generating and working with Ed25519VerificationKey2020 key pairs, for use with crypto-ld.
BSD 3-Clause "New" or "Revised" License
3 stars 10 forks source link

Use native node crypto #3

Closed aljones15 closed 3 years ago

aljones15 commented 3 years ago

Features in this PR:

  1. adds a node and browser specific ed25519 file.
  2. the node specific ed25519 file uses node's crypto sign, verify, createPrivateKey and createPublicKey
  3. the browser specific ed25519 uses @stablelib/ed25519
  4. the node specific ed25519 is able to turn Uint8Arrays and or Buffers into DER encoded keys for node

Addresses: https://github.com/digitalbazaar/ed25519-verification-key-2020/issues/2

Suggestions:

We really should create a test suite that ensures that the node ed25519 keys, can in turn verify stablelib's keys, and possibly node-forge's keys.

A sister PR removes webpack's node utils reducing the library's size to 33kb.