# exo kms crypto generate-data-key
### Description

Generate a Data Encryption Key from a given KMS Key.

```
exo kms crypto generate-data-key ID [flags]
```

### Options

| Option | Description |
|---------|------------|
|`--bytes-count, -b` | number of bytes for DEK (1 - 1024) |
|`--encryption-context, -e` | encryption context to use for DEK generation |
|`--help, -h` | help for generate-data-key |
|`--key-spec, -s` | key spec for DEK [AES-256] |
|`--zone, -z` | key zone |


### Options inherited from parent commands

| Option | Description |
|---------|------------|
|`--config, -C` | Specify an alternate config file [env EXOSCALE_CONFIG] |
|`--output-format, -O` | Output format (table\|json\|text), see &#34;exo output --help&#34; for more information |
|`--output-template` | Template to use if output format is &#34;text&#34; |
|`--quiet, -Q` | Quiet mode (disable non-essential command output) |
|`--timeout` | Per-zone timeout for list operations; -1s disables timeout [env EXOSCALE_TIMEOUT] |
|`--use-account, -A` | Account to use in config file [env EXOSCALE_ACCOUNT] |


### Related Commands

* [crypto]({{< ref "../crypto">}})	 - KMS key cryptographic operations


