Text this: Theory of quantum cryptography