> ## 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.

# Encrypt Data Using PQC

> Encrypt data using the post-quantum public key

## Encrypt Data Using Post-Quantum Cryptography

This endpoint encrypts data using a provided public key and the selected post-quantum cryptographic scheme.

### Request Body

You must provide the data to encrypt and the public key.

```json theme={null}
{
  "raw_data": "data_to_encrypt",
  "public_key": "base64encodedpublickey"
}
```


## OpenAPI

````yaml POST /api/post-quantum/encrypt
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/encrypt:
    post:
      tags:
        - PQC
      summary: Encrypt data using PQC
      description: Encrypt data using the post-quantum public key
      operationId: encryptPQCData
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EncryptString'
      responses:
        '201':
          description: Encrypted data successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EncryptedData'
        '422':
          description: Invalid input data
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
components:
  schemas:
    EncryptString:
      type: object
      required:
        - raw_data
        - public_key
      properties:
        raw_data:
          type: string
        public_key:
          type: string
    EncryptedData:
      type: object
      properties:
        encrypted_data:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````