This paper presents a construction of Boolean functions with the maximum algebraic immunity on even number of variables. It also gives a construction of balanced rotation symmetric Boolean functions with the maximum algebraic immunity on even number of variables. This paper uses some results of linear algebra and enumerative combinatorics in the constructions. These functions have strong resistance against algebraic attacks. The balanced rotation symmetric Boolean functions constructed can also be used in the construction of safer hashing functions.