You are viewing a single comment's thread from:

RE: Little lost bees - Reveal Public/Private keys from Password

in #dev4 years ago (edited)

IIRC in sepk elliptic cryptographic protocol any signature can be reversed to obtain public key. Now, it'd be interesting to know what "PasswordKey()" method specifically does. Thanks in advance!

Sort:  

@lightproject, It's actually rather short and to the point:

        """ Derive private key from the brain key and the current sequence
            number
        """
        a = py23_bytes(self.account + self.role + self.password, 'utf8')
        s = hashlib.sha256(a).digest()
        return PrivateKey(hexlify(s).decode('ascii'), prefix=self.prefix)

specifically, that's get_private from the method other than that it just sets the public function

Unless you meant you wanted me to step through that too :)

So If I understand correctly, password = brainkey? Thanks in advance!

yes sir, you got it right :)

I tried to clear that up, maybe i should have worded it better, steemit used to give passwords that started with "P" and were basically a key, but that is generated from suggest_brain_key i guess they didn't think people would understand an actual brain key, which most modern generators use now. (such as hiveinvite, which started this whole conversation)