---
title: Encrypting and Decrypting logs
slug: dmg-android/guide/encrypting-and-decrypting-logs
createdAt: 2026-10-06T07:46:36.188Z
---

To encrypt logs.

**Procedure**

1. Navigate to **Core** > **Config** > **Add New** > **LogEncryption**.
   Add the certificate for encryption.
2. Save and apply the config to the devices.
   The client logs are encrypted with the given certificate.

### Decrypting logs

To decrypt logs:

**Prerequisite**

Ensure OpenSSL is installed.

**Procedure**

1. Run the following command in terminal
   Openssl version LibreSSL 2.8.3
   openssl smime -decrypt -in logs-encrypted.pc7 -inform DER -inkey privatekey.p12 -recip c.crt -out decrypted\_file.zip
2. Enter pass phrase for privatekey.p12: \<enter the password here to decrypt if any>

:::Paragraph{indent="1"}
-decrypt: This option tells OpenSSL that you want to decrypt a file.
:::

:::Paragraph{indent="1"}
-in logs-encrypted.pc7: Specifies the input encrypted file.
:::

:::Paragraph{indent="1"}
-inform DER: Specifies the input format of the encrypted file (DER format).
:::

:::Paragraph{indent="1"}
-inkey privatekey.p12: Specifies the private key file to use for decryption.
:::

:::Paragraph{indent="1"}
-recip c.crt : Specifies the recipient's certificate file.
:::

:::Paragraph{indent="1"}
-out decrypted\_file.zip: Specifies the output file where the decrypted content is available.
:::
