paper-key-backup

1.0.0 • Public • Published

Paper key export

For backing up cryptographic keys on paper. Takes a array of keys with names and creates a PDF.

  • mnemonics using BIP 39 (keys must be between 16 and 32 bytes)
  • QR codes
  • Removes files securely using skrub

Example:

const paperKeys = require('.')
const crypto = require('crypto')
const keys = [
  {
    name: 'My important key',
    data: crypto.randomBytes(32)
  },
  {
    name: 'Another important key',
    data: crypto.randomBytes(32)
  }
]
 
paperKeys.createPdf('./key-backup.pdf', keys, (err) => {
  if (err) throw err
})

Example PDF output:

example

API

createPdf (outputFile, keys, callback)

creates a pdf outputFile.

  • keys should be an array of objects of the form:
    • name - a string describing the key (may contain markdown formatting).
    • data - the key as a buffer or hex encoded string.
    • comment - an optional comment string to include (may contain markdown formatting).

removePdf (filePath)

Securely removes the given file. Returns a promise.

mnemonicToKey (mnemonic)

Turn a mnemonic back into a key. Takes a string, returns a buffer.

Readme

Keywords

none

Package Sidebar

Install

npm i paper-key-backup

Weekly Downloads

0

Version

1.0.0

License

AGPL-3.0-or-later

Unpacked Size

197 kB

Total Files

8

Last publish

Collaborators

  • ameba23