Skip to main content

pft_compute_both

Function pft_compute_both 

Source
pub fn pft_compute_both(u: &[u8], u_star: &[u8]) -> (Vec<u8>, Vec<u8>)
Expand description

PFT: Pairwise Forward Transform (U-plane → C-plane)

Computes both C and C* from U and U*:

[C ]   [1  γ]⁻¹ [U ]
[C*] = [γ  1]   [U*]

The inverse matrix is: (1/(1-γ²)) × [1, -γ; -γ, 1] In GF(2^8), subtraction = addition, so: (1/(1+γ²)) × [1, γ; γ, 1]

§Arguments

  • u - U values (primary)
  • u_star - U* values (companion)

§Returns

Tuple of (C, C*) vectors