Statistics for Classical Authenticated Key Exchange and Quantum Cryptography