> For the complete documentation index, see [llms.txt](https://peerplays.gitbook.io/peerplays-infrastructure-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://peerplays.gitbook.io/peerplays-infrastructure-docs/the-basics/obtaining-private-keys-for-cli_wallet.md).

# Obtaining private keys for cli\_wallet

### Using password generated in GUI wallet in *cli\_wallet*

In the Graphene based blockchains like Peerplays the hierarchical permissions like fund transfer, sending memo etc are separated using different roles and Public-Private key-pairs for each role. We have 3 types of roles OWNER, ACTIVE and MEMO. These keys are generated using a brain key.

The password auto generated by the wallet is a brain key. And the brain key is used to generate various key-pairs in the Wallet Import Format (WIF).

{% hint style="info" %}
***WIF = SHA256( username + role + brain key)***

example:

OWNER WIF = SHA256(peerplays user name + owner + brain key)
{% endhint %}

![](https://102719863-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McxuwdOwK1wrj2xdejn%2Fuploads%2FVbhuF9nI4GfUUw0pJfMR%2Fimage.webp?alt=media\&token=6d95c297-730f-48f2-825c-13ef7d93da2c)

The above brain key belongs to the user *t3st123*

Note that the above password is not the private or public key. So we need to create the key pairs to be used in the `cli_wallet` using the method `get_private_key_from_password`

* To generate the OWNER keypair, use the following command

```cpp
get_private_key_from_password t3st123 owner RAjoOuuSX9N2semIlQOM52iHCQMUrDZPqnpPUDZNpMu2HSYj1gQi
```

**Result:**

*unlocked >>> get\_private\_key\_from\_password t3st123 owner RAjoOuuSX9N2semIlQOM52iHCQMUrDZPqnpPUDZNpMu2HSYj1gQi get\_private\_key\_from\_password t3st123 owner RAjoOuuSX9N2semIlQOM52iHCQMUrDZPqnpPUDZNpMu2HSYj1gQi \[ "PPY5xmkfRJhsG54kxNpoBtWqnEpScGBxczooapTbCpmetFAmzUvJ1", "5KPHKeuqRyNfuc32LGDzc6tqcCPzyLgfguQzN4Xkrys3VfMxtjB" ]*

### &#x20;<a href="#usingpasswordgeneratedinguiwalletincli_wallet-instructions" id="usingpasswordgeneratedinguiwalletincli_wallet-instructions"></a>

ACTIVE & MEMO keys also can be obtained in the same way.
