Let be a -bounded distance-regular graph with diameter . For , let be the set of all subspaces containing in . Suppose that , and suppose that and are subspaces with diameter and diameter in , respectively. Let ; we give the number of subspaces with diameter and in such that and . Using the subspaces in , we construct a new Cartesian authentication code. We also compute its size parameters and its probabilities of successful impersonation attack and of successful substitution attack.