docs: add key generation pseudo code

This commit is contained in:
Zach Ramsay 2018-04-19 12:25:00 -04:00
parent 0fd69d56ee
commit 57b150960c
2 changed files with 20 additions and 1 deletions

View File

@ -18,8 +18,9 @@ SDK
:maxdepth: 1
sdk/install.rst
sdk/key-management.rst
.. sdk/overview.rst # needs to be updated
.. old/glossary.rst # not completely up to date but has good content
.. old/glossary.rst # not completely up to date but has good content
.. Basecoin
.. --------

View File

@ -0,0 +1,18 @@
Key Management
==============
Here we cover many aspects of handling keys within the Cosmos SDK framework.
Pseudo Code
-----------
Generating an address for an ed25519 public key (in pseudo code):
::
const TypeDistinguisher = HexToBytes("1624de6220")
// prepend the TypeDistinguisher as Bytes
SerializedBytes = TypeDistinguisher ++ PubKey.asBytes()
Address = ripemd160(SerializedBytes)