A theoretical result relating the maximum achievable security of the family of biometric template protection systems known as key-binding systems to the recognition performance of a biometric recognition system that is optimal in Neyman-Pearson sense is derived. The relation allows for the computation of the maximum achievable key length from the Receiver Operating Characteristic (ROC) of the optimal biometric recognition system. Illustrative examples that demonstrate how the shape of the ROC impacts the security of a template protection system are presented and discussed.