Orthogonal-state-based cryptography in quantum mechanics and local post-quantum theories