Complexity of Simon's Problem
A one-way function is a function $f$ such that $f(x)$ is easy to compute, but given $y$ in the range of $f$, it is hard to computer a preimage of $f$. Notice that there is no black-box involved. The idea is that $f$ "looks like" a black box that applies $f$ in the sense that you can apply $f$ but cannot do much more, and in particular cannot invert $f$ (or even learn anything about the inverse).

The goal of cryptography is to come up with cryptographically secure algorithms. There is no place for a black box there. That said, when constructing protocols from primitives, we often treat the primitives as black boxes with certain properties. In some cases we can actually show that this point of view isn't general enough - we show that given one primitive as a black box, another primitive cannot be constructed, though perhaps such a construction is possible given access to the code of the first primitive.