Let Γ be a d-bounded distance-regular graph with diameter d≥2.In this paper, we give some counting formulas of subspaces in Γ and construct an authentication code with perfect. secrecy.