> ## Documentation Index
> Fetch the complete documentation index at: https://qg.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Decrypt Data Using PQC

> Decrypt data using the post-quantum private key

## Decrypt Data Using Post-Quantum Cryptography

This endpoint decrypts previously encrypted data using the private key corresponding to the public key that was used for encryption.

### Request Body

You must provide the encrypted data and the private key.

```json theme={null}
{
  "encrypted_data": "base64encrypteddata",
  "private_key": "base64encodedprivatekey"
}
```


## OpenAPI

````yaml POST /api/post-quantum/decrypt
openapi: 3.0.1
info:
  title: Post-Quantum Cryptography API
  description: >-
    API for post-quantum cryptographic operations, including key generation and
    encryption
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: http://localhost:8000
security:
  - bearerAuth: []
paths:
  /api/post-quantum/decrypt:
    post:
      tags:
        - PQC
      summary: Decrypt data using PQC
      description: Decrypt data using the post-quantum private key
      operationId: decryptPQCData
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecryptString'
      responses:
        '200':
          description: Decrypted data successfully returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecryptedData'
        '422':
          description: Invalid input data
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
components:
  schemas:
    DecryptString:
      type: object
      required:
        - encrypted_data
        - private_key
      properties:
        encrypted_data:
          type: string
        private_key:
          type: string
    DecryptedData:
      type: object
      properties:
        decrypted_data:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````