├── README.md ├── ecc.js ├── index.css ├── index.html ├── index.js └── lib.js /README.md: -------------------------------------------------------------------------------- 1 | # Offline tool to verify your EOS private key and mapping to public key 2 | 3 | Simple tool to verify your EOS key and find out the public key. This was requested by several users and something we created while waiting for EOS Dawn 3.0. This tool is brought to you by the [EOS block producer candidate - EOS Authority](https://eosauthority.com). Should take no more than 2 minutes to check your key offline & securely. 4 | 5 | ## Using the tool 6 | 7 | 1) Click on clone or download on this Github page. Then download zip. 8 | [![Offline EOS private key tool](https://i.imgur.com/uv59i9G.png)](https://i.imgur.com/uv59i9G.png) 9 | 2) Extract the zip file 10 | 3) Turn your computer offline 11 | 4) Open index.html on any browser (preferably incognito mode or private browsing). It will look like the screenshot below 12 | [![Offline EOS private key tool](https://i.imgur.com/WwniEpW.png)](https://i.imgur.com/WwniEpW.png) 13 | 5) Enter your private key and click "Map to EOS public key" 14 | 6) Verify your private & public key. Close this page and resume internet connection. 15 | 16 | ### Important info 17 | 18 | - Contributions / any bug fixes are welcome. 19 | - All code is available for review and runs offline. 20 | - You just need your browser and do not have to install any software on your computer 21 | - No guarantees or accuracy on using this tool. 22 | - Maintained by [Webdigi in London](https://www.webdigi.co.uk) & [EOS Block producer candidate - EOS Authority](https://eosauthority.com) 23 | 24 | ### Test EOS public & private keys 25 | **Public key**: EOS8HuvjfQeUS7tMdHPPrkTFMnEP7nr6oivvuJyNcvW9Sx5MxJSkZ 26 | **Private key**: 5JS9bTWMc52HWmMC8v58hdfePTxPV5dd5fcxq92xUzbfmafeeRo 27 | 28 | **Public key**: EOS7pscBeDbJTNn5SNxxowmWwoM7hGj3jDmgxp5KTv7gR89Ny5ii3 29 | **Private key**: 5KgKxmnm8oh5WbHC4jmLARNFdkkgVdZ389rdxwGEiBdAJHkubBH 30 | 31 | **Public key**: EOS833HgCT3egUJRDnW5k3BQGqXAEDmoYo6q1s7wWnovn6B9Mb1pd 32 | **Private key**: 5JFLPVygcZZdEno2WWWkf3fPriuxnvjtVpkThifYM5HwcKg6ndu 33 | -------------------------------------------------------------------------------- /index.css: -------------------------------------------------------------------------------- 1 | * { box-sizing: border-box; } 2 | html { font: 12pt/1.5 "Open Sans", sans-serif; } 3 | body { display: flex; justify-content: center; } 4 | body > * { width: 1200px; position: relative; } 5 | body { overflow-y: scroll; } 6 | .pane { border: 1px solid #ccc; padding: 1.5rem 2rem; } 7 | .pane { margin: 1.5rem 0; border-left: none; border-right: none; } 8 | .pane + .pane { border-top: none; margin-top: 0; padding-top: 0; } 9 | .active { background: #ffd; font-weight: bold; } 10 | .closed { color: gray; } 11 | button, input, select { font: inherit; padding: 0rem .25rem; } 12 | .hidden { display: none; } 13 | button { padding-left: 1rem; padding-right: 1rem; } 14 | h3 { margin: 0 0 .75rem; } 15 | table { text-align: right; border-collapse: collapse; } 16 | td, th { padding: .25rem 1rem; } 17 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | EOS verify your private key 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |

Offline tool to verify your EOS private key and map to public key

13 |

Steps to running this tool with peace of mind!
14 | 1. Turn your device offline. This page will work without an internet connection.
15 | 2. Paste your EOS private key and then click on "Map to EOS public key"
16 | 3. Your EOS private key and corresponding public key will show up. All done! You can close this page and then turn on internet connection :) 17 |

18 |

Other info and resources
19 | - Register your EOS public key before EOS mainnet launch. You can use EOSauthority to check
20 | - Review code for this tool on github. Contact us at eos@webdigi.co.uk 21 |

22 |
23 |
24 | 25 | 26 | 27 | 31 | 32 |
EOS private key 28 |   29 | Map to EOS public key 30 |
33 |
34 | 69 |
70 |
71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | let privateKeyPair = null 2 | 3 | function generate() { 4 | showPane('generate') 5 | 6 | setTimeout(() => { 7 | var privKey = byId('privKey').value; 8 | privateKeyPair = webdigiKeyPair(privKey) 9 | console.log(privateKeyPair); 10 | hide("generate-progress") 11 | byId("generate-pubkey").innerHTML = privateKeyPair.pubkey 12 | byId("generate-pubkey-error").innerHTML = privateKeyPair.pubkeyError 13 | byId("generate-privkey").innerHTML = privateKeyPair.privkey 14 | byId("generate-privkey-error").innerHTML = privateKeyPair.privkeyError 15 | show("generate-confirm") 16 | show("generate-link") 17 | }, 1000) 18 | } 19 | 20 | 21 | 22 | function webdigiKeyPair(privKeyInput) { 23 | var {PrivateKey, PublicKey} = eos_ecc 24 | 25 | var privkeyError = '' 26 | var pubkeyError = '' 27 | 28 | try{ 29 | var abc = PrivateKey.fromWif(privKeyInput); 30 | var privkey = abc.toWif() 31 | var pubkey = abc.toPublic().toString() 32 | } catch(error){ 33 | privkeyError = 'Private key in invalid, please try again.' 34 | } 35 | 36 | if(privkey && pubkey){ 37 | 38 | try { 39 | var pub2 = PrivateKey.fromWif(privkey).toPublic().toString() 40 | if(pubkey !== pub2) { 41 | throw {message: 'public key miss-match: ' + pubkey + ' !== ' + pub2} 42 | } 43 | } catch(error) { 44 | //console.log('privkeyError', error, privkey) 45 | privkeyError = error.message + ' => ' + privkey 46 | } 47 | 48 | 49 | 50 | try { 51 | PublicKey.fromStringOrThrow(pubkey) 52 | } catch(error) { 53 | // console.log('pubkeyError', error, pubkey) 54 | pubkeyError = error.message + ' => ' + pubkey 55 | } 56 | 57 | } 58 | 59 | 60 | if(privkeyError || pubkeyError) { 61 | privkey = 'DO NOT USE' 62 | pubkey = 'DO NOT USE' 63 | } 64 | 65 | return {pubkey, privkey, pubkeyError, privkeyError} 66 | } 67 | 68 | function showPane(name) { 69 | //hidePanes() 70 | show(`${name}-pane`) 71 | show(`${name}-progress`) 72 | hide(`${name}-confirm`) 73 | hide(`${name}-link`) 74 | } 75 | 76 | //function hidePanes() { 77 | // for (var x of "generate transfer buy register".split(" ")) { 78 | // try { 79 | // show(`${x}-link`) 80 | // hide(`${x}-pane`) 81 | // } catch (error) {} 82 | // } 83 | //} 84 | 85 | -------------------------------------------------------------------------------- /lib.js: -------------------------------------------------------------------------------- 1 | var byId = id => document.getElementById(id) 2 | var formatWad = wad => String(wad).replace(/\..*/, "") 3 | var formatEOS = wad => wad.toFormat(4) 4 | var formatETH = wad => wad.toFormat(2) 5 | var getValue = id => byId(id).value 6 | var show = id => byId(id).classList.remove("hidden") 7 | var hide = id => byId(id).classList.add("hidden") 8 | var iota = n => repeat("x", n).split("").map((_, i) => i) 9 | var repeat = (x, n) => new Array(n + 1).join("x") 10 | --------------------------------------------------------------------------------