We explore the relationship between de Rham and Lie algebra cohomologies in the finite dimensional and affine settings. In particular, given a g ˆ κ -module that arises as the global sections of a twisted D-module on the affine flag manifold, we show how to compute its untwisted BRST reduction modulo n ( K ) using the de Rham cohomology of the restrictions to N ( K ) orbits. A similar relationship holds between the regular cohomology and the Iwahori orbits on the affine flag manifold. As an application of the above, we describe the BRST reduction of the chiral Hecke algebra as a vertex super algebra.