Securely Generating an EOS Public / Private Key Pair Using Official EOS.IO Code

in #eos7 years ago (edited)

There are many ways to generate an EOS public / private key pair. Even though there are many third-party options, it is understandable that to be extra cautious about using something not provided by the official EOS.IO team.

The method described in this video relies only on code and commands sourced from the EOS.IO GitHub organization. While it does require having to execute some JavaScript code, our Lead Software Engineer, Mike Haggerty, meticulously walks through each step to allow non-programmers to perform this important function.

The code used in this video: https://github.com/EOSIO/eosjs-ecc

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Step 1. Open command prompt / terminal
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Windows: https://www.wikihow.com/Open-the-Command-Prompt-in-Windows

Mac: https://www.wikihow.com/Open-a-Terminal-Window-in-Mac

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Step 2. Check if Node.js is installed
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

$ node -v
$ npm -v

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Step 3. Download Node.js (if needed)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

https://nodejs.org

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Step 4. Setup workspace
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

$ mkdir eos_keypair
$ cd eos_keypair

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Step 5. Download eosjs-ecc NPM package then turn off Wi-Fi
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

$ npm i eosjs-ecc

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Step 6. Start Node.js interactive shell
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

$ node

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Step 7. Execute "four commands"
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

The "four commands" listed on the eosjs-ecc README: https://github.com/EOSIO/eosjs-ecc#usage-object-api

let {PrivateKey, PublicKey, Signature, Aes, key_utils, config} = require('eosjs-ecc')

let privateWif

PrivateKey.randomKey().then(privateKey => privateWif = privateKey.toWif())

pubkey = PrivateKey.fromWif(privateWif).toPublic().toString()

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Step 8. Output private key
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

' > privateWif

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Step 9. Register public key
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Link Here

Special thank you to @eosdac for helping us ensure our work is 100%.


EOS New York is a Block Producer Candidate. Always Adding Value. Everything a Block Away.

DQmeq31UKokuoyvBCrxYhNfinkz5ihNmeTbLUVH9j323cP7.png

Website
Twitter
Medium
STEEM
Meetup
Youtube

Sort:  

EOS's lack of standard key generation tool and offline registration instructions this close to launch is an embarassment and a disgrace. Key generation is the absolute base of any crypto system and underpines the entire future security model. With the current confusion around EOS registration and its near entire reliance on third party tools and instructions, for all we know most EOS registered wallets could already be compromised due to third party tools eavesdropping on keys, generating them with too little entropy or using a pseudo-random, reproductible key generation process.

As a very early supporter of Dan's work, I'm deeply disappointed by the careless approach taken by EOS.

We share some of your sentiment. We can't speak for Block.One but we can do what we think is best by creating tutorials like these. Thank you for your feedback.

Keygen utility is provided by EOSIO project here https://github.com/EOSIO/genesis/tree/master/tools/keys and you can download pre-built executables (OSX only currently, Windows and Linux coming soon) here https://github.com/EOSIO/genesis/releases

Note that the executables are signed by Block.one.

@eosnewyork, information is very valuable, success for eos movers, greetings from Aceh women

Thanks @eosnewyork for this helpful post. Checkout and claim your free airdropped carmel tokens against the EOS you are holding carmel.io/SkZND4LiM

very informative and very safe method!!
thanks a lot for this great quality video. I'm looking at you for your BP campaign!! I am an enthusiastic French EOS!!

Very important stuff. Feeling safe with my current MEW wallet for registering my EOS. @eosnewyork got my vote for block producer for sure! Nice walk through from MH. Well done.

Terminal black on white? Fail :D

Good stuff!! Follow this, you don't want a repeat of the IOTA generator theft. https://cryptovest.com/news/4m-iota-stolen-from-wallets-which-used-online-seed-generation-websites/

Hi, I'm getting an error on my command prompt window: " '$' is not recognized as an internal or external command, operable program or batch file".

Any idea how to solve this issue?

Thanks!

You can reach out to us at [email protected] with more details and we can help solve this with you.

Great video!!! Really helped even though I used an air gapped Linux machine to generate my keys.

I love Eos, I have to move it all off the exchange tho soon I think. is this what this is helping with ?

Coin Marketplace

STEEM 0.21
TRX 0.26
JST 0.040
BTC 96627.81
ETH 3416.66
USDT 1.00
SBD 3.09