MODULE m6 · 8.0 HOURS

Performance Evaluation and Benchmarking

0% complete

LEARNING OBJECTIVES

Module objectives

  1. Understand the performance evaluation indicators (time, memory, throughput) for post-quantum cryptographic algorithms (ML-KEM).
  2. Analyze the impact of KEM operations on performance in the TLS 1.3 handshake process.
  3. Benchmark the performance of hybrid cryptographic modes utilizing the Liboqs and oqs-provider framework.

Performance Evaluation and Benchmarking

Migration to Post-Quantum Cryptography (PQC) is not just about algorithm replacement, but a problem directly linked to the performance of existing network protocols (e.g., TLS 1.3). In particular, KEM (Key Encapsulation Mechanism) operations directly impact the handshake latency and server connection processing throughput (handshakes per second) [S2].

Performance Indicators

  1. Computation Time: CPU cycles or time (ms) spent on key generation (KeyGen), encapsulation (Encaps), and decapsulation (Decaps).
  2. Data Size: Size of public keys and encapsulated text (ciphertext). This determines network bandwidth consumption and potential for fragmentation.
  3. Throughput: Number of handshakes processable per second. Optimized implementations (e.g., utilizing AVX-512) increase polynomial multiplication and modular operation speed, greatly improving throughput [S2].

Hybrid Mode

During migration, a hybrid approach using traditional algorithms (ECDH) together with PQC (ML-KEM) is recommended. This is to secure PQC’s security benefits while preparing for PQC’s potential vulnerabilities. Hybrid modes have increased computational complexity, so performance degradation must be closely evaluated [S2].

WORKED EXAMPLES

Worked examples

  1. Example 1: Benchmarking a single KEM operation using Liboqs A method to measure the operation times of `keypair`, `encaps`, and `decaps` for `ML-KEM-768` using the Python `timeit` module and saving results to CSV.
  2. Example 2: Measuring Hybrid TLS 1.3 handshake throughput An analysis procedure for calculating Handshakes Per Second (TPS) by measuring the total time taken for 100 connections using `s_client` and `s_server` in a local server/client environment with oqs-provider applied.

LAB PROTOCOL

PQC Performance Benchmarking Lab

  1. 1

    Install liboqs and oqs-provider in an isolated development environment and verify environment settings.

  2. 2

    Write a benchmarking Python script to measure the operation time of the ML-KEM algorithm.

  3. 3

    Execute Wireshark to capture TLS handshake packets and analyze data size changes in hybrid mode.

  4. 4

    Graph operation time and throughput indicators based on measured data.

Safety check
  • Experiments must be performed only within a local isolated environment, and certificates or keys from actual operational environments must never be used.
  • Monitor system resources as high CPU load may occur during the benchmarking process.
  • Be careful not to include actual secret values or key data in capture files.

Lab deliverables

  • Operation performance measurement script (.py).
  • Measured result CSV data.
  • Performance comparison analysis report by algorithm (.md or .ipynb).

ASSIGNMENT

Performance Evaluation Report Based on Cryptographic Agility

Deliverables

Rubric

  • Is benchmarking data measurable in a reproducible and independent environment?
  • Did you accurately analyze the technical causes of performance degradation (key size, operation complexity)?
  • Did you discuss the benefits and costs of hybrid mode in a balanced way?

KNOWLEDGE CHECK

Knowledge check

1Which factor related to PQC algorithms is most important for TLS 1.3 handshake performance?
2Why is hybrid mode used during performance evaluation?

FIELD CHECK

Completion criteria

  • Secure benchmarking script execution and result data.
  • Submission and passing of performance evaluation report.
  • Completion of TLS hybrid mode performance analysis.

MODULE SOURCES

Module sources

  1. Faster Post-Quantum TLS 1.3 Based on ML-KEM: Implementation ...arxiv.org · paper