项目作者: alexpods

项目描述 :
Generates secure IOTA seeds
高级语言: JavaScript
项目地址: git://github.com/alexpods/iota-seed.git
创建时间: 2017-12-27T08:08:01Z
项目社区:https://github.com/alexpods/iota-seed

开源协议:MIT License

下载


iota-seed

Build Status

Generates secure IOTA seeds.

This package just uses officially recommended commands to generate a seed. If you don’t trust
this package or npm (and you shouldn’t) you can execute the commands manually (see Security section). If you decided to use this package, check the downloaded source codes after npm install (node_modules/iota-seed). They should be identical to the ones from this github repository.

Usage

You can generate a seed using Command Line Interface:

  1. > npm install -g iota-seed # check node_modules/iota-seed source codes after this
  2. > iota-seed
  3. YOURIOTASEED9999999999999999999999999 <- This is your IOTA seed
  4. >

Or you can generate a seed inside of your program:

  1. const iotaSeed = require('iota-seed')
  2. let seed = iotaSeed() // <- This is you IOTA seed

Security

This package uses the next commands for seed generation:

Linux

  1. cat /dev/urandom | tr -dc A-Z9 | head -c${1:-81}

Mac

  1. cat /dev/urandom | LC_ALL=C tr -dc 'A-Z9' | fold -w 81 | head -n 1

Windows

It’s not implemented and an error will be thrown if you try to generate a seed on Windows OS.

Unfortunately I don’t know a really secure way to generate a seed on Windows OS.
crypto.randomBytes is preudo random and powershell has it’s own flaws.