So, how should the 'locked boxes' analogy be fixed?
"There's just a small problem.
It's not with the box analogy: as another commenter noted, it's a well known example example you'll find in great books like Simon Singh's The Code Book."
The problem is not the analogy, the "locked-box" analogy is fine. The problem is that the math is flawed. The math is not equivalent to the analogy.