Module ffi

Module ffi 

Source
Expand description

C/C++ FFI bindings for PQC Binary Format

This module provides C-compatible foreign function interface (FFI) for use in C/C++ applications and Go (via cgo).

Structs§

ByteBuffer
C-compatible byte buffer
PqcFormatHandle
Opaque handle to PqcBinaryFormat

Statics§

PQC_ALGORITHM_CLASSICAL
Algorithm ID for Classical (X25519 + Ed25519 + AES-256-GCM)
PQC_ALGORITHM_HQC_128
Algorithm ID for HQC-128 (NIST Level 1, 128-bit security)
PQC_ALGORITHM_HQC_192
Algorithm ID for HQC-192 (NIST Level 3, 192-bit security)
PQC_ALGORITHM_HQC_256
Algorithm ID for HQC-256 (NIST Level 5, 256-bit security)
PQC_ALGORITHM_HYBRID
Algorithm ID for Hybrid (ML-KEM-1024 + X25519 + ML-DSA-87 + Ed25519)
PQC_ALGORITHM_LATTICE_CODE_HYBRID
Algorithm ID for Lattice-Code Hybrid Stack
PQC_ALGORITHM_ML_KEM_1024
Algorithm ID for ML-KEM-1024 pure implementation
PQC_ALGORITHM_MULTI_KEM
Algorithm ID for Multi-KEM (multiple key encapsulation layers)
PQC_ALGORITHM_MULTI_KEM_TRIPLE
Algorithm ID for Multi-KEM Triple Layer
PQC_ALGORITHM_PASSWORD_CLASSICAL
Algorithm ID for Password-based Classical encryption
PQC_ALGORITHM_POST_QUANTUM
Algorithm ID for Post-Quantum (ML-KEM-1024 + ML-DSA-87)
PQC_ALGORITHM_PQ3_STACK
Algorithm ID for PQ3-Stack with forward secrecy
PQC_ALGORITHM_QUAD_LAYER
Algorithm ID for Quad-Layer redundant encryption

Functions§

pqc_format_free
Free a PqcBinaryFormat handle
pqc_format_from_bytes
Deserialize PQC Binary Format from bytes
pqc_format_get_algorithm_id
Get algorithm ID from format
pqc_format_get_algorithm_name
Get algorithm name from format
pqc_format_get_data
Get encrypted data from format
pqc_format_get_total_size
Get total size of serialized format
pqc_format_new
Create a new PQC Binary Format structure
pqc_format_new_with_kem
Create PQC Binary Format with KEM parameters
pqc_format_to_bytes
Serialize PQC Binary Format to bytes
pqc_format_validate
Validate format structure
pqc_free_buffer
Free a byte buffer allocated by this library
pqc_free_string
Free a string allocated by this library
pqc_get_binary_version
Get binary format version
pqc_get_version
Get library version string