Finite differences does not give gradients easily - you would need to have many evaluations (1 base + 1 per input size) of your black box function to compute the derivative. Then, of course, it could work.