![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Kyber-768 Key Encapsulation Mechanism (NIST FIPS 203 / ML-KEM-768). More...
#include <post_quantum.hpp>
Classes | |
| struct | EncapsulationResult |
| Result of Kyber-768 encapsulation: ciphertext to send + shared secret to keep. More... | |
| struct | KeyPair |
| Kyber-768 keypair: public key for encapsulation, secret key for decapsulation. More... | |
Static Public Member Functions | |
| static expected< KeyPair > | generate_keypair () |
| Generate a Kyber-768 keypair. | |
| static expected< EncapsulationResult > | encapsulate (const uint8_t *public_key, size_t pk_size) |
| Generate a shared secret from a recipient's public key (encapsulation). | |
| static expected< std::vector< uint8_t > > | decapsulate (const uint8_t *ciphertext, size_t ct_size, const uint8_t *secret_key, size_t sk_size) |
| Recover the shared secret from ciphertext + secret key (decapsulation). | |
Static Public Attributes | |
| static constexpr size_t | PUBLIC_KEY_SIZE = 1184 |
| Kyber-768 public key size (stub default). | |
| static constexpr size_t | SECRET_KEY_SIZE = 2400 |
| Kyber-768 secret key size (stub default). | |
| static constexpr size_t | CIPHERTEXT_SIZE = 1088 |
| Kyber-768 ciphertext size (stub default). | |
| static constexpr size_t | SHARED_SECRET_SIZE = 32 |
| Shared secret size (256 bits, for AES-256). | |
Kyber-768 Key Encapsulation Mechanism (NIST FIPS 203 / ML-KEM-768).
Used to establish shared AES-256 keys between Parquet writer and reader. Provides approximately 192-bit post-quantum security.
Two modes of operation:
SIGNET_HAS_LIBOQS): Real NIST-standardized Kyber-768.Definition at line 663 of file post_quantum.hpp.
|
inlinestatic |
Recover the shared secret from ciphertext + secret key (decapsulation).
The recipient calls this with the received ciphertext and their secret key.
| ciphertext | Pointer to the ciphertext from encapsulate(). |
| ct_size | Must equal CIPHERTEXT_SIZE (1088 bytes). |
| secret_key | Pointer to the recipient's Kyber-768 secret key. |
| sk_size | Must equal SECRET_KEY_SIZE (2400 bytes). |
Definition at line 898 of file post_quantum.hpp.
|
inlinestatic |
Generate a shared secret from a recipient's public key (encapsulation).
The sender calls this with the recipient's public key.
| public_key | Pointer to the recipient's Kyber-768 public key. |
| pk_size | Must equal PUBLIC_KEY_SIZE (1184 bytes). |
Definition at line 785 of file post_quantum.hpp.
Generate a Kyber-768 keypair.
Definition at line 715 of file post_quantum.hpp.
|
staticconstexpr |
Kyber-768 ciphertext size (stub default).
Definition at line 678 of file post_quantum.hpp.
|
staticconstexpr |
Kyber-768 public key size (stub default).
Definition at line 676 of file post_quantum.hpp.
|
staticconstexpr |
Kyber-768 secret key size (stub default).
Definition at line 677 of file post_quantum.hpp.
|
staticconstexpr |
Shared secret size (256 bits, for AES-256).
Definition at line 679 of file post_quantum.hpp.