We prove the conjectures of Hodge and Tate for any four-dimensional hyper-K\"ahler variety of generalized Kummer type. For an arbitrary variety $X$ of generalized Kummer type, we show that all Hodge classes in the subalgebra of the rational cohomology generated by $H^2(X,\mathbb{Q})$ are algebraic.