Skip to main content
Challenge

Build a Crypto-Agile PQC Migration Agent with OpenAI Agents SDK

With the rise of quantum computing threats, organizations must transition from classical RSA/ECC to NIST-standardized Post-Quantum Cryptography (PQC). This challenge involves building an autonomous migration agent using the OpenAI Agents SDK and Gemini 2.5 Flash to identify vulnerable cryptographic implementations in legacy codebases and refactor them into a crypto-agile architecture. You will implement a 'Wrapper-First' approach, allowing applications to switch between ML-KEM (Kyber) and classical algorithms without redeploying the entire service. The agent must perform static analysis to detect hardcoded primitives, suggest library replacements using `liboqs`, and generate unit tests that verify both security and performance. The system will leverage OpenAI's tool-calling capabilities to interface with Git repositories and static analysis tools, ensuring that the migration preserves the application's functional integrity while mitigating 'Harvest Now, Decrypt Later' risks.

Special Purpose AgentsHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Develop an autonomous agent that refactors legacy Python/C++ code to use NIST PQC standards through a crypto-agile wrapper using OpenAI Agents SDK and Gemini 2.5 Flash.

Delivery guide

How work is evaluated

Evaluation

The evaluation measures the agent's ability to refactor a vulnerable codebase to be PQC-ready and crypto-agile.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
3 scoring checks
Binary
3 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

Functional Integrity

Refactored code must pass existing unit tests for the application logic.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

Crypto-Agility Test

Changing the configuration must successfully switch the algorithm from ML-KEM to a classic fallback.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 3

PQC Coverage

Percentage of legacy crypto calls successfully migrated to the agile wrapper. • target: 100 • range: 0-100

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Master the OpenAI Agents SDK for multi-turn code refactoring tasks

  • Implement NIST Post-Quantum Cryptography standards (ML-KEM, ML-DSA)

  • Design crypto-agile software architectures that support algorithm hot-swapping

  • Configure Gemini 2.5 Flash for high-speed, cost-effective code analysis and generation

  • Integrate liboqs for standardized PQC implementations in legacy environments

Resources and assets

Reference links and supporting material

Dataset notes

Synthetic codebase containing 20+ Python files with varied cryptographic implementations (RSA, ECDSA, AES-GCM) and associated mock unit tests.

Challenge setup

The evaluation measures the agent's ability to refactor a vulnerable codebase to be PQC-ready and crypto-agile.

Challenge input

Legacy source code with embedded RSA-2048 signing/encryption.

OpenAI Agents SDK

Required framework for agentic multi-turn logic.

Gemini 2.5 Flash

Provides fast and accurate code analysis.

liboqs

Industry standard for PQC algorithm implementations.

Evaluated output

Refactored code using a generic 'AgileCrypto' class and liboqs backends.

Evaluation checks
  • Refactored code must pass existing unit tests for the application logic.
  • Changing the configuration must successfully switch the algorithm from ML-KEM to a classic fallback.
  • Percentage of legacy crypto calls successfully migrated to the agile wrapper. • target: 100 • range: 0-100
Configured evaluation evidence
  • Benchmark: CyberMetric-PQC
  • PQC Coverage target: 100
  • 1 public reference case
Configured runtime
  • Python execution harness
  • Python sandbox (unavailable on Versalist)

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Action Space
  • OpenAI · Required
  • Azure OpenAI Service · Optional
  • OpenAI o3 · Optional

Evaluation contract

  • Functional Integrity · Weight 1
  • Crypto-Agility Test · Weight 1
  • PQC Coverage · Weight 1

Metrics

  • PQC Coverage · Target 100

Benchmarks

  • CyberMetric-PQC
  • security

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: Legacy source code with embedded RSA-2048 signing/encryption.

    Output: Refactored code using a generic 'AgileCrypto' class and liboqs backends.

    Execution harness: Python

Evaluation tools

  • OpenAI Agents SDK · agent-orchestrator
  • Gemini 2.5 Flash · reasoning-model
  • liboqs · crypto-library

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Build a Crypto-Agile PQC Migration Agent with OpenAI Agents SDK