Public and Private Keys - How to generate all Steem user's keys from master password, without a Steemit website, being OFFLINE

I had a break in writing technical articles, because I need some time to organize two Steem Meetups (in Wrocław and in Warsaw), and to give a talk about Steem in Łódź.

But finally I am back on track regarding my Steem Security series, so today I am able to publish 3rd articles from this series. If you didn't read my earlier articles about different aspects of security of your steem account, you can find list of those articles on the bottom of this article.

part3.jpg

Real password and keys: demo

So, last time we learnt about why private keys are needed. This time we will learn how they are generated.

You already have seen in my 1st post in a series a demo gif/video, where I showed how to login to an account with a private key instead of a password. During this demo I also showed, that at the time of recording I used password P5KB2ir4BaDTeeBe5SUW16F6NYGeYSVaUBn261kDPLGGCSiNahtm to log in on my noisy3demo account.

Now I want to show you, that you actually don't have to type your master password on Steemit website, to generate all your keys. You can generate them being totally offline!

How to locally generate all Steem users keys from master password

With some help of python code and steem library, we can write something like this:

from steembase.account import PasswordKey

account = 'noisy3'
password = 'P5KB2ir4BaDTeeBe5SUW16F6NYGeYSVaUBn261kDPLGGCSiNahtm'
key_types = [
    'posting',
    'active',
    'owner',
    'memo',
    'foo_bar'
]

for key_type in key_types:
    private_key = PasswordKey(account, password, key_type).get_private_key()
    public_key = private_key.pubkey

    print('Private ' + key_type + ' key: ' + str(private_key))
    print('Public ' + key_type + ' key: ' + str(public_key) + '\n')



This gives us:

Private posting key: 5JLMze1sUVPhUBwTVjZyQhFMGfbN5KB7nqHfKjXuN5GUTYTbYFy
Public posting key: STM6GkXgEKTYc7gNv1GWJ5ZseyESHQnN7nr3rxdo5sBjzWQcdMyKy

Private active key: 5JFfMWjWMjnhu6vJKB2uUwUaLCws9JotHzLB8wkVEZjsZnSzDTv
Public active key: STM5uLTFYpPK4XVLMe16uuQFdW1Vo2MzN9UPqHQKjePwB76NnS9qk

Private owner key: 5JKjBjfRVZaf8H5w8XgiB6HfEH2SFJXUJL3QA6mteg5uQ3qRW9M
Public owner key: STM7iZnny8bvNRd6v6nx25XG6ijAKZs1ANvtuqTN2gjSYWXHC8Jgy

Private memo key: 5JvpThC3DwjHkupj6jnT5pnFW21Bsj3g4GhxhLLtM2WNsV2ynPw
Public memo key: STM5uEy2yYnoqVY9ksfkMbbY3UH4qFygARn2SW7PFJ4cRErHbH7Vh

Private foo_bar key: 5KJQP53B4MPHCWBQ8Xm9ydhKmjqrouRuf8UWWEZjHtkgmrtNCc5
Public foo_bar key: STM7hNqe6DJmXsqaDG8poaDVAvQx59EgWWQUbVLRUfi2Ab7mCvsnJ

So as you can see, private posting key is exactly the same like in my demo gif/video above:

Selection_999(271).png

From technical point of view, from your password can be generated even new type of keys, like Private foo_bar key and Public foo_bar key :)


This article belongs to series of articles which describes security on Steemit:

  1. What is the difference between a password and a private key(s) on Steemit? How to make your account more secure, by using them correctly.
  2. Public and Private Keys - how they are used by Steem, making all of these possible?
  3. How to generate all Steem user's keys from master password, without a Steemit website, being OFFLINE (this article)
  4. How to set own password, which is not generated by Steemit
  5. How passwords are stored by Steemit in your browser, and why it is secure.
  6. How to setup multisig/multiple authorities for your account
  7. ...

Make sure to follow my account, if you don't want to miss any of these :)

PS. This article was live-st(r)eemed.

H2
H3
H4
3 columns
2 columns
1 column
82 Comments