Quantum cryptography is a topic of considerable interest. A simple and robust experiment and theory for a senior level undergraduate investigation of quantum key distribution are described. In the proposed experiment, key principles from the BB84 protocol, used in quantum cryptography, are emulated using an optical apparatus and computational scripts independently.