Algebraic Structure of Chiral Anomalies