Skip to main content

canonicalize_g2

Function canonicalize_g2 

Source
pub fn canonicalize_g2<const N: usize>(
    left: &KappaLabel<N>,
    right: &KappaLabel<N>,
) -> Vec<u8> 
Expand description

CS-G2 canonicalize discipline: the commutative binary product of two operand κ-labels. Per wiki ADR-061 §(3) the framework names the algebraic structure (commutativity at the C-level per ADR-059); the realization commits lex-min-first ordering as the byte-level rule realizing that algebra.

Returns the concatenation lo || hi of the two operand byte representations, where (lo, hi) = (min(a, b), max(a, b)) under bytewise lexicographic order. Commutativity is structural: canonicalize_g2(a, b) and canonicalize_g2(b, a) produce byte-identical canonical forms.