pub enum Suite {
Aes128Gcm,
Aes256Gcm,
HmacSha256,
}Expand description
Verfuegbare Crypto-Suites im AesGcmCryptoPlugin.
Default (AesGcmCryptoPlugin::new()) ist Aes128Gcm — leichtgewichtig,
ausreichend fuer < 10-Jahres-Vertraulichkeit. Fuer hoehere Stufen
AesGcmCryptoPlugin::with_suite(Suite::Aes256Gcm) waehlen.
HmacSha256 ist Auth-only (keine Confidentiality). Wird
eingesetzt wenn Governance-XML metadata_protection_kind=SIGN
vorgibt — die Payload bleibt plain, aber per HMAC-Tag
authentifiziert.
Variants§
Aes128Gcm
AES-128 im GCM-Mode. 16-byte Master-Key. Auth+Encrypt.
Aes256Gcm
AES-256 im GCM-Mode. 32-byte Master-Key. Auth+Encrypt.
HmacSha256
HMAC-SHA256 Auth-only. 32-byte Master-Key. Payload bleibt
plain; 32-byte-HMAC wird angehaengt (Spec-Kind
NONE + HMAC_SHA256 — “SIGN” im Governance-XML).
Implementations§
Source§impl Suite
impl Suite
Sourcepub const fn is_aead(self) -> bool
pub const fn is_aead(self) -> bool
true wenn die Suite Confidentiality liefert (sonst Auth-only).
Sourcepub fn transform_kind_id(self) -> u8
pub fn transform_kind_id(self) -> u8
Ein-Byte-Transform-Kind-Id fuers Wire-Format (SEC_PREFIX).
Spec DDS-Security 1.2 §10.5 Tab.79 — wir liefern den Low-Byte-
Anteil; der Wire-Codec packt das in [0, 0, 0, id] BE.
HmacSha256 belegt den AES128_GMAC-Slot (0x01) — die
ZeroDDS-Implementation laeuft mit HMAC-SHA256 statt AES-GMAC,
d.h. fuer SIGN-only-Topics ist der Cyclone-Interop noch nicht
gegeben (siehe C3.7). GCM-Varianten sind voll spec-konform.
Sourcepub fn transform_kind(self) -> [u8; 4]
pub fn transform_kind(self) -> [u8; 4]
4-byte CryptoTransformKind Big-Endian-Wire-Repraesentation
(Spec §10.5 Tab.79).
Sourcepub fn from_transform_kind_id(id: u8) -> Option<Self>
pub fn from_transform_kind_id(id: u8) -> Option<Self>
Inverse von Self::transform_kind_id. Liefert None fuer
Spec-Werte die ZeroDDS nicht als Suite anbietet (z.B.
AES256_GMAC = 0x03).
Sourcepub const fn max_encrypts(self) -> u64
pub const fn max_encrypts(self) -> u64
Maximum Encrypts pro Key, bevor Key-Refresh noetig wird. Spec §9.5.3.3.4 empfiehlt ≤ 2^32 fuer GCM — wir cappen bei 2^48 (konservativ unter Soft-Limit, viel unter harter Nonce-Bound).