46#include <StormByte/expected.hxx>
47#include <StormByte/safe/pointers.hxx>
48#include <StormByte/safe/vector.hxx>
88 enum class Group: std::uint16_t {
friend ExpectedPolicy Validate(const Configuration &configuration)
Permit snapshot construction only after designated-profile validation.
Policy(Policy &&other) noexcept
Retain the immutable snapshot without invalidating the source.
Policy(const Policy &other)
Share the immutable validated snapshot.
~Policy() noexcept
Release this snapshot reference; the last owner releases Base storage.
Policy()
Construct the validated default TLS 1.3 profile.
const Configuration & Preferences() const noexcept
Read the exact validated preferences; no mutable access.
STORMBYTE_DECLARE_MAYBE_SAFE(class StormByte::System::Device::Access)
Algorithm
Supported raw-key authenticated encryption algorithms.
Definition aead.hxx:57
Algorithm
Supported HKDF hash functions.
Definition hkdf.hxx:54
TLS 1.3 policy and buffer-driven session engine.
CipherSuite
TLS 1.3 suites supported by the buffer-driven session engine.
Definition policy.hxx:79
@ TLS_AES_256_GCM_SHA384
AES-256-GCM with SHA-384 transcript and HKDF.
Definition policy.hxx:81
@ TLS_AES_128_GCM_SHA256
AES-128-GCM with SHA-256 transcript and HKDF.
Definition policy.hxx:80
Version
Protocol versions designated for policy configuration.
Definition policy.hxx:71
@ TLS13
TLS 1.3 supported_versions identifier, not the record legacy version.
Definition policy.hxx:72
ExpectedCipherSuiteDefinition DescribeCipherSuite(CipherSuite suite)
Describe a registered suite's fixed AEAD and HKDF/transcript hash.
Error
Configuration failures; no connection or backend is exercised.
Definition policy.hxx:106
@ EmptyCipherSuites
No allowed cipher suite was specified.
Definition policy.hxx:108
@ UnsupportedVersion
Version is not exactly TLS 1.3.
Definition policy.hxx:107
@ EmptySignatureSchemes
No allowed signature scheme was specified.
Definition policy.hxx:114
@ DuplicateCipherSuite
A suite appears more than once.
Definition policy.hxx:110
@ EmptyGroups
No allowed group was specified.
Definition policy.hxx:111
@ DuplicateSignatureScheme
A scheme appears more than once.
Definition policy.hxx:116
@ DuplicateGroup
A group appears more than once.
Definition policy.hxx:113
@ UnsupportedGroup
A group is outside the designated initial profile.
Definition policy.hxx:112
@ UnsupportedCipherSuite
A suite is outside the designated initial profile.
Definition policy.hxx:109
@ UnsupportedSignatureScheme
A scheme is outside the supported TLS 1.3 profile.
Definition policy.hxx:115
Group
Named groups supported by the initial TLS 1.3 profile.
Definition policy.hxx:88
@ Secp256r1
NIST P-256 key agreement.
Definition policy.hxx:90
@ X25519
Curve25519 key agreement.
Definition policy.hxx:89
StormByte::Expected< Policy, Error > ExpectedPolicy
Validated policy or Base-owned typed configuration error.
Definition policy.hxx:229
SignatureScheme
TLS 1.3 signature schemes supported by the session engine.
Definition policy.hxx:97
@ ECDSA_SECP256R1_SHA256
P-256 ECDSA/SHA-256.
Definition policy.hxx:98
@ RSA_PSS_RSAE_SHA256
RSA-PSS/SHA-256 with an rsaEncryption certificate key.
Definition policy.hxx:99
StormByte::Expected< CipherSuiteDefinition, Error > ExpectedCipherSuiteDefinition
Fixed suite definition or Base-owned unsupported-suite error.
Definition policy.hxx:234
ExpectedPolicy Validate(const Configuration &configuration)
Validate only membership, nonempty lists and uniqueness for the profile.
Configuration InitialProfile()
All designated initial-profile entries in default preference order.
Crypto module of the StormByte suite.
Definition aead.hxx:53
Root namespace of the StormByte suite.
std::conditional_t< Type::Reference< T >, std::expected< std::reference_wrapper< std::remove_reference_t< T > >, Safe::Shared< E > >, std::expected< T, Safe::Shared< E > > > Expected
Fixed primitive mapping, not an independently selectable pair.
Definition policy.hxx:194
HKDF::Algorithm hash
Inseparable HKDF and TLS transcript hash designation.
Definition policy.hxx:197
AEAD::Algorithm aead
Raw-key authenticated encryption primitive.
Definition policy.hxx:195
Mutable input with independent ordered preference lists.
Definition policy.hxx:128
~Configuration() noexcept=default
Release the Base-owned preference lists.
StormByte::Safe::Vector< CipherSuite > cipher_suites
Allowed suites in descending preference order.
Definition policy.hxx:173
StormByte::Safe::Vector< Group > groups
Allowed groups in descending preference order, independent of suites.
Definition policy.hxx:180
StormByte::Safe::Vector< SignatureScheme > signature_schemes
Allowed signature schemes in descending preference order.
Definition policy.hxx:185
Configuration(const Configuration &other)=default
Independently copy the mutable preference lists.
Configuration()=default
Construct the mutable default TLS 1.3 profile.
Configuration(Configuration &&other) noexcept=default
Transfer the mutable lists, leaving the source lists empty.
Version version
Only TLS 1.3 is accepted.
Definition policy.hxx:168
#define STORMBYTE_CRYPTO_PUBLIC
Definition visibility.h:53