PQMap: Identification and Mapping of Post-Quantum-Relevant Cryptographic Functions in Binaries
Files
dePaulaVinicius_79482400_2026.pdf
Open access - Adobe PDF
- 766.02 KB
Details
- Supervisors
- Faculty
- Degree label
- Abstract
- The transition to post-quantum cryptography requires identifying where classical public-key cryptography is used in existing software. This task is especially difficult for compiled binaries, where source code may be unavailable and function symbols may be incomplete, stripped, or inconsistent across library versions. This work presents PQMap, an embedding-based semantic retrieval tool for mapping post-quantum migration risk in binary cryptographic code. PQMap analyzes binaries with Ghidra, extracts decompiled pseudo-code for individual functions, and embeds each function using a fine-tuned code embedding model. The model is trained with contrastive function pairs built from trusted canonical identifiers across multiple versions and libraries. PQMap embeds a function's pseudo-code and retrieves semantically similar functions from a labeled reference corpus. The retrieved neighbors are then used to support cryptographic function identification and consequently post-quantum migration analysis. On a manually reviewed benchmark, PQMap achieved 95.0% Precision@1 and 95.5% mean reciprocal rank over 1,000 retrieval queries. These results show that decompiler-based semantic embeddings can support practical discovery and prioritization of cryptographic functions relevant to post-quantum migration in compiled binaries. The implementation and supporting scripts are available in the tool's repository.