> For the complete documentation index, see [llms.txt](https://docs.0xpass.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0xpass.io/appendix/generating-doa-keys.md).

# Generating DOA Keys

In order to use DOA, you need to pass the base64 encoded private key. Here is how you generate your private key:

## Generate the PEM Key

### Using Passport SDK

Install `passport-scope-cli`

{% tabs %}
{% tab title="npm" %}

<pre class="language-bash"><code class="lang-bash"><strong>npm install -g passport-scope-cli
</strong></code></pre>

{% endtab %}

{% tab title="yarn" %}

```bash
yarn global add passport-scope-cli
```

{% endtab %}

{% tab title="pnpm" %}

```bash
pnpm install -g passport-scope-cli
```

{% endtab %}
{% endtabs %}

Run the generate key command

```bash
passport-scope generate-keys --name passport
```

Post this, your private key file will be created in the same directory with name passport\_priv.der

### Using OpenSSL

```sh
openssl ecparam -name prime256v1 -genkey -noout -out private_key.pem
openssl pkcs8 -topk8 -inform PEM -outform DER -in private_key.pem -out passport_priv.der -nocrypt
```

## Base64 encode the Key

```shell
base64 -i passport_priv.der -o pasport_priv_base64.txt
```

And you are done, you may copy this value directly to your environment variable
