Skip to content

Commit

Permalink
docs: better doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
eightfilms committed Jul 8, 2024
1 parent dfdcd05 commit 37725b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/encryption/symmetric/aes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,11 @@ struct State([[u8; 4]; 4]);
/// 2) The resulting polynomial is reduced modulo the following fixed polynomial: m(x) = x^8 + x^4 +
/// x^3 + x + 1
///
/// Note that you do not see this done here, this is implemented in [`AESFieldExtension`], within
/// the operation traits.
/// The above steps are implemented in [`AESFieldExtension`], within the operation traits.
///
/// Note that in most AES implementations, this is done using "carry-less" multiplication -
/// to see how this works in more concretely in field arithmetic, this implementation uses an actual
/// polynomial implementation (a [`Polynomial`] of [`BinaryField`]s).
/// polynomial implementation.
fn galois_multiplication(mut col: u8, mut multiplicand: u8) -> u8 {
// Decompose bits into degree-7 polynomials.
let mut col_bits: [AESField; 8] = [AESField::ZERO; 8];
Expand Down
2 changes: 1 addition & 1 deletion src/field/extension/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub type PlutoBaseFieldExtension = GaloisField<2, 101>;

/// The [`AESFieldExtension`] is a specific instance of the [`GaloisField`] struct with the
/// order set to the number `2^8`. This is the quadratic extension field over the
/// [`PlutoBaseField`] used in the Pluto `ronkathon` system.
/// [`AESField`][crate::field::prime::AESField] used in the Pluto `ronkathon` system.
pub type AESFieldExtension = GaloisField<8, 2>;

/// The [`PlutoScalarFieldExtension`] is a specific instance of the [`GaloisField`] struct with the
Expand Down

0 comments on commit 37725b0

Please sign in to comment.