# Encryption extension

This extension allows to configure the commercial encryption features of DMR. Almost all DMR radios implement means for encrypting the traffic. This feature however, is usually illegal when used within amateur radio.

##

    commercial:
      encryptionKeys:
        - dmr:
          id: key1
          name: Example key 1
          key: ABCD
        - rc4:
          id: key2
          name: Example key 2
          key: 0123456789
        - aes:
          id: key3
          name: Example key 3
          key: 0123456789ABCDEF0123456789ABCDEF

This extension is a simple list of keys held in the global commercial extension. Each key must either be a DMR (basic), RC4 (enhanced) or AES (advanced) key. To differentiate these key types, each list entry must be a mapping with a single entry. The name specifies the type (i.e., either dmr, rc4 or aes). The value then specifies the properties of the key.

As only the key size differs between the different key types, there are common attributes. Specifically, the ID and name of the key.

## Common key fields

id

- Specifies the ID of the key. This ID can then be used to reference the key within the commercial digital channel extension. See extComChannel.

name

- Specifies the name of the key. This property is usually not encoded in the binary codeplug.

## DMR key fields

key

- Specifies the key as a HEX string. It must be at least 8bit but can be of variable size. The actual size depends on the device. Usually, a fixed size of 16 or 32bit is supported. Some devices, however, support variable sized keys.

## RC4 key fields

key

- Specifies the key as a HEX string. This key is fixed to a size of 40bit. That is, the hex string must be of length 10.

## AES key fields

key

- Specifies the key as a HEX string. Also this key can be of variable size. Usually, these keys are 128 or 256bit. The actual size depends on the device.