An Algebraic Approach for Reasoning About Information Flow