docs(cipher-factory): document public API types

Add doc comments to OutputFormat, OperationMode enums and their methods.
Add crate-level documentation describing the factory's purpose.
This commit is contained in:
2025-12-31 00:26:31 +02:00
parent dd07a1d29b
commit 220baa09ad
7 changed files with 21 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
use crate::Block128;
/// Mixes each column using matrix multiplication in GF(2^8) (MixColumns step).
/// Mixes each column using matrix multiplication in GF(2^8) ([`MixColumns`] step).
///
/// Each column is treated as a polynomial and multiplied by a fixed polynomial
/// modulo x^4 + 1. This provides diffusion across the rows.

View File

@@ -1,6 +1,6 @@
use crate::{Block128, key::Subkey};
/// XORs the state with a round key (AddRoundKey step).
/// XORs the state with a round key ([`AddRoundKey`] step).
///
/// Each round of AES combines the current state with a derived subkey
/// using bitwise XOR. This operation is its own inverse.

View File

@@ -1,6 +1,6 @@
use crate::Block128;
/// Cyclically shifts rows of the state matrix (ShiftRows step).
/// Cyclically shifts rows of the state matrix ([`ShiftRows`] step).
///
/// Row 0: no shift, Row 1: shift left 1, Row 2: shift left 2, Row 3: shift left 3.
/// This provides diffusion across the columns.

View File

@@ -1,6 +1,6 @@
use crate::{Block128, sbox::SboxLookup};
/// Substitutes each byte using the AES S-box (SubBytes step).
/// Substitutes each byte using the AES S-box ([`SubBytes`] step).
///
/// Provides non-linearity by replacing each byte with its S-box lookup value.
/// The S-box is derived from the multiplicative inverse in GF(2^8).