<commit_before><commit_msg>[Docs] New doc for keys and identities.<commit_after>---
title: "Keys and Identities"
slug: "keys-and-identities"
---

import ThemedImage from '@theme/ThemedImage';
import useBaseUrl from '@docusaurus/useBaseUrl';


# Keys and Identities

This document explains the following key and identity YAML files that are generated during the deployment of a validator node:

- `public-keys.yaml`.
- `private-keys.yaml`.
- `validator-identity.yaml`.
- `validator-full-node-identity.yaml`.

The following command is executed to generate the above key and identity YAMLs. See, for example, [Step 10 while using AWS to deploy the validator node](validator-node/operator/running-validator-node/run-validator-node-using-aws), or in [Step 10 while using GCP](validator-node/operator/running-validator-node/run-validator-node-using-gcp). 

```bash
aptos genesis generate-keys --output-dir ~/$WORKSPACE/keys
```

## public-keys.yaml

### Example

Click below to see an example YAML configuration:
<details>
<summary>public-keys.yaml</summary>

```yaml
---
account_address: a5a643aa695fc5f34927386c8d767cddcc0607933f40c89a7ad78de7804965b8
account_public_key: "<KEY>"
consensus_public_key: "<KEY>"
consensus_proof_of_possession: "0xa51dfd1734e581df99c4c637324ee38c3e48e51c61c1e1dd03bd5a84cf1cd5b2fa00e976b9a9ea0e0908f0d53085318c03f24de3ebf86b07ff883effe0142e0d3f24c7c1e36dd198ea4d8eb6f5c5a2f3a188de22720bd1914a9effa6f595de38"
full_node_network_public_key: "<KEY>"
validator_network_public_key: "<KEY>"
```
 
</details>

### Description

| public-keys.yaml | Description |
| --- | --- |
| account_address |  |
| account_public_key |  |
| consensus_public_key |  |
| consensus_proof_of_possession |  |
| full_node_network_public_key |  |
| validator_network_public_key |  |

## private-keys.yaml

### Example

Click below to see an example YAML configuration:
<details>
<summary>private-keys.yaml</summary>

    
```yaml
---
account_address: a5a643aa695fc5f34927386c8d767cddcc0607933f40c89a7ad78de7804965b8
account_private_key: "<KEY>"
consensus_private_key: "0x4aedda33ef3fd71243eb2a926307d8826c95b9939f88e753d62d9bc577e99916"
full_node_network_private_key: "0x689c11c6e5405219b5eae1312086c801e3a044946afc74429e5157b46fb65b61"
validator_network_private_key: "<KEY>"
```

</details>

### Description

| private-keys.yaml | Description |
| --- | --- |
| account_address |  |
| account_private_key |  |
| consensus_private_key |  |
| full_node_network_private_key |  |
| validator_network_private_key |  |

## validator-identity.yaml

### Example

Click below to see an example YAML configuration:

<details>
<summary>validator-identity.yaml</summary>
    

```yaml
---
account_address: a5a643aa695fc5f34927386c8d767cddcc0607933f40c89a7ad78de7804965b8
account_private_key: "<KEY>"
consensus_private_key: "0x4aedda33ef3fd71243eb2a926307d8826c95b9939f88e753d62d9bc577e99916"
network_private_key: "<KEY>"
```

</details>

### Description

| validator-identity.yaml | Description |
| --- | --- |
| account_address |  |
| account_private_key |  |
| consensus_private_key |  |
| network_private_key |  |


## validator-full-node-identity.yaml

### Example

Click below to see an example YAML configuration:

<details>
<summary>validator-full-node-identity.yaml</summary>

    
```yaml
---
account_address: a5a643aa695fc5f34927386c8d767cddcc0607933f40c89a7ad78de7804965b8
network_private_key: "0x689c11c6e5405219b5eae1312086c801e3a044946afc74429e5157b46fb65b61"
```

</details>
    

### Description

| validator-full-node-identity.yaml | Description |
| --- | --- |
| account_address |  |
| network_private_key |  |

## Identity vs keys

See below a diagram that shows how the identities for the validator node and validator fullnode are derived from the private and public keys:

<ThemedImage
alt="Signed Transaction Flow"
sources={{
    light: useBaseUrl('/img/docs/key-yamls.svg'),
    dark: useBaseUrl('/img/docs/key-yamls-dark.svg'),
  }}
/>
{'fraction_non_alphanumeric': 0.11282961460446247, 'fraction_numerical': 0.11764705882352941, 'mean_word_length': 5.709183673469388, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1558488', 'n_tokens_mistral': 1707, 'n_tokens_neox': 1465, 'n_words': 242}